Skip to content

docs: Update TgpuResolveOptions JSDoc with up-to-date defaults - #2761

Open
iwoplaza wants to merge 1 commit into
mainfrom
docs/update-tgpuresolve-jsdoc
Open

docs: Update TgpuResolveOptions JSDoc with up-to-date defaults#2761
iwoplaza wants to merge 1 commit into
mainfrom
docs/update-tgpuresolve-jsdoc

Conversation

@iwoplaza

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 27, 2026 12:22
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

pkg.pr.new

packages
Ready to be installed by your favorite package manager ⬇️

https://pkg.pr.new/software-mansion/TypeGPU/eslint-plugin-typegpu@25898426f69256d451392eb6a0048888f91aaa0b
https://pkg.pr.new/software-mansion/TypeGPU/tgpu-gen@25898426f69256d451392eb6a0048888f91aaa0b
https://pkg.pr.new/software-mansion/TypeGPU/tinyest-for-wgsl@25898426f69256d451392eb6a0048888f91aaa0b
https://pkg.pr.new/software-mansion/TypeGPU/typegpu@25898426f69256d451392eb6a0048888f91aaa0b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/cli@25898426f69256d451392eb6a0048888f91aaa0b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/color@25898426f69256d451392eb6a0048888f91aaa0b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/gl@25898426f69256d451392eb6a0048888f91aaa0b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/noise@25898426f69256d451392eb6a0048888f91aaa0b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/radiance-cascades@25898426f69256d451392eb6a0048888f91aaa0b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/react@25898426f69256d451392eb6a0048888f91aaa0b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/sdf@25898426f69256d451392eb6a0048888f91aaa0b
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/three@25898426f69256d451392eb6a0048888f91aaa0b
https://pkg.pr.new/software-mansion/TypeGPU/unplugin-typegpu@25898426f69256d451392eb6a0048888f91aaa0b

benchmark
view benchmark

commit
view commit

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the TgpuResolveOptions.names JSDoc in the resolver API to reflect the current public surface and runtime defaults for namespace/naming behavior.

Changes:

  • Fixes grammar (“it’s” → “its”) in the namespaces explanation.
  • Updates the documented namespace factory reference to tgpu['~unstable'].namespace.
  • Updates the documented default naming strategy from 'random' to 'strict'.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown

Bundle size comparison (import * as ... in PR vs import * as ... in target):

🟢 Decreased ➖ Unchanged 🔴 Increased ❔ Unknown
0 322 0 0

import { ... } in PR vs import * as ... in PR (is the library tree-Shakeable?):

Test tsdown
tgpu_init.ts 258.90 kB ($${\color{green}-3.2\%}$$)
tgpu_initFromDevice.ts 258.39 kB ($${\color{green}-3.4\%}$$)
tgpu_resolve.ts 164.59 kB ($${\color{green}-38.5\%}$$)
tgpu_resolveWithContext.ts 164.53 kB ($${\color{green}-38.5\%}$$)
tgpu_bindGroupLayout.ts 68.97 kB ($${\color{green}-74.2\%}$$)
tgpu_mutableAccessor.ts 65.97 kB ($${\color{green}-75.3\%}$$)
tgpu_accessor.ts 65.96 kB ($${\color{green}-75.3\%}$$)
tgpu_privateVar.ts 65.31 kB ($${\color{green}-75.6\%}$$)
tgpu_workgroupVar.ts 65.30 kB ($${\color{green}-75.6\%}$$)
tgpu_const.ts 64.55 kB ($${\color{green}-75.9\%}$$)
tgpu_fn.ts 38.14 kB ($${\color{green}-85.7\%}$$)
tgpu_fragmentFn.ts 38.14 kB ($${\color{green}-85.7\%}$$)
tgpu_vertexFn.ts 37.96 kB ($${\color{green}-85.8\%}$$)
tgpu_computeFn.ts 37.66 kB ($${\color{green}-85.9\%}$$)
tgpu_vertexLayout.ts 26.79 kB ($${\color{green}-90.0\%}$$)
tgpu_comptime.ts 14.48 kB ($${\color{green}-94.6\%}$$)
tgpu_unroll.ts 1.66 kB ($${\color{green}-99.4\%}$$)
tgpu_slot.ts 1.54 kB ($${\color{green}-99.4\%}$$)
tgpu_lazy.ts 1.19 kB ($${\color{green}-99.6\%}$$)

If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

Resolution Time Benchmark

---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.93, 1.92, 4.34, 6.50, 7.35, 13.30, 22.45, 24.97]
  line [0.94, 1.98, 4.27, 6.29, 7.39, 12.38, 22.22, 25.24]
  line [0.89, 1.81, 4.47, 6.41, 7.67, 11.30, 21.95, 26.20]
Loading
---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.36, 0.54, 0.69, 0.87, 1.16, 1.16, 1.38, 1.61]
  line [0.36, 0.58, 0.74, 0.83, 1.18, 1.26, 1.46, 1.60]
  line [0.30, 0.56, 0.69, 0.82, 1.16, 1.27, 1.50, 1.55]
Loading
---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.73, 2.15, 4.13, 6.60, 12.54, 26.57, 54.31, 110.30]
  line [0.76, 2.14, 4.09, 6.96, 12.70, 26.84, 55.35, 112.29]
  line [0.81, 1.97, 4.08, 6.60, 13.00, 28.45, 55.84, 115.23]
Loading

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — Updates TgpuResolveOptions.names JSDoc to match reality: fixes a grammar typo, corrects the API reference path, and aligns the @default with the actual implementation.

  • Correct @default from 'random' to 'strict' — both resolveFromTemplate and resolveFromArray default names to 'strict'.
  • Fix grammar: it'sits — possessive form, not a contraction.
  • Update API reference: tgpu.namespacetgpu['~unstable'].namespacenamespace is exported from tgpuUnstable.ts and re-exported as '~unstable' from tgpu.ts.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏

@reczkok reczkok left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@iwoplaza
iwoplaza force-pushed the docs/update-tgpuresolve-jsdoc branch from b4060fa to 2589842 Compare July 27, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants