Skip to content

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Oct 9, 2025

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
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