Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (349 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
1abc665 to
f7acb4f
Compare
f7acb4f to
ef8ae95
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces type aliases AutoInEmpty to the TgpuVertexFn and TgpuFragmentFn namespaces, providing a cleaner way to annotate entry functions that have no custom attributes or varyings. This addresses a TypeScript convention where using {} directly as a type is discouraged, offering developers a named alternative via AutoInEmpty which is an alias for AutoIn<{}>.
Changes:
- Added
TgpuVertexFn.AutoInEmptytype alias for_AutoVertexIn<{}> - Added
TgpuFragmentFn.AutoInEmptytype alias forAutoFragmentIn<{}> - Added test case demonstrating the use of the new type aliases for entry functions with no custom inputs
- Added necessary type imports to test file
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
packages/typegpu/src/core/function/tgpuVertexFn.ts |
Introduces AutoInEmpty type alias for vertex functions |
packages/typegpu/src/core/function/tgpuFragmentFn.ts |
Introduces AutoInEmpty type alias for fragment functions |
packages/typegpu/tests/renderPipeline.test.ts |
Adds imports and comprehensive test case demonstrating the new type aliases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Using
{}as a type is discouraged by TypeScript, but it seems likeTgpuVertexFn.AutoIn<Record<string, never>>doesn't have the behavior we expect, soTgpuVertexFn.AutoInEmptyis an alias forTgpuVertexFn.AutoIn<{}>which we can adjust if we ever find out how to makeRecord<string, never>behave properly.