docs: Update TgpuResolveOptions JSDoc with up-to-date defaults - #2761
docs: Update TgpuResolveOptions JSDoc with up-to-date defaults#2761iwoplaza wants to merge 1 commit into
Conversation
|
pkg.pr.new packages benchmark commit |
There was a problem hiding this comment.
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.
Bundle size comparison (
|
| 🟢 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 ( |
| tgpu_initFromDevice.ts | 258.39 kB ( |
| tgpu_resolve.ts | 164.59 kB ( |
| tgpu_resolveWithContext.ts | 164.53 kB ( |
| tgpu_bindGroupLayout.ts | 68.97 kB ( |
| tgpu_mutableAccessor.ts | 65.97 kB ( |
| tgpu_accessor.ts | 65.96 kB ( |
| tgpu_privateVar.ts | 65.31 kB ( |
| tgpu_workgroupVar.ts | 65.30 kB ( |
| tgpu_const.ts | 64.55 kB ( |
| tgpu_fn.ts | 38.14 kB ( |
| tgpu_fragmentFn.ts | 38.14 kB ( |
| tgpu_vertexFn.ts | 37.96 kB ( |
| tgpu_computeFn.ts | 37.66 kB ( |
| tgpu_vertexLayout.ts | 26.79 kB ( |
| tgpu_comptime.ts | 14.48 kB ( |
| tgpu_unroll.ts | 1.66 kB ( |
| tgpu_slot.ts | 1.54 kB ( |
| tgpu_lazy.ts | 1.19 kB ( |
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.
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]
---
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]
---
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]
|
There was a problem hiding this comment.
✅ 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
@defaultfrom'random'to'strict'— bothresolveFromTemplateandresolveFromArraydefaultnamesto'strict'. - Fix grammar:
it's→its— possessive form, not a contraction. - Update API reference:
tgpu.namespace→tgpu['~unstable'].namespace—namespaceis exported fromtgpuUnstable.tsand re-exported as'~unstable'fromtgpu.ts.
DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏
b4060fa to
2589842
Compare

No description provided.