Skip to content

feat: generate static schema#1739

Merged
kuhe merged 1 commit intomainfrom
codegen/schema
Oct 10, 2025
Merged

feat: generate static schema#1739
kuhe merged 1 commit intomainfrom
codegen/schema

Conversation

@kuhe
Copy link
Copy Markdown
Contributor

@kuhe kuhe commented Oct 9, 2025

#1600

Due to tree-shaking optimization, the module level generated schema should be generated as static objects instead of factory function calls:

new

// the leading number is a type enum that tells the NormalizedSchema wrapper 
// how to rehydrate this into a schema class object.
export var ValidationExceptionField: StaticStructureSchema = [3, n0, _VEF, 0, [_p, _m], [0, 0]];

old

// this factory function call causes tree shaking bail out
export var ValidationExceptionField = err(n0, _VEF, 0, [_p, _m], [0, 0]]);

@kuhe kuhe requested a review from a team as a code owner October 9, 2025 19:37
@kuhe kuhe merged commit 7f8af58 into main Oct 10, 2025
13 checks passed
@kuhe kuhe deleted the codegen/schema branch October 10, 2025 14:33
aBurmeseDev pushed a commit to aBurmeseDev/smithy-typescript that referenced this pull request Oct 10, 2025
@kuhe kuhe mentioned this pull request Dec 23, 2025
2 tasks
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.

2 participants