Skip to content

fix(defineProps): register type bindings before compile template + props destructure work with vapor #12545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

edison1105
Copy link
Member

No description provided.

this changes make sure that props.foo will be overwritten as __props.foo instead of _ctx.foo
@@ -79,6 +79,15 @@ export function processDefineProps(
)
}
ctx.propsTypeDecl = node.typeParameters.params[0]
// register bindings
const { props } = resolveTypeElements(ctx, ctx.propsTypeDecl)
Copy link
Member Author

@edison1105 edison1105 Dec 13, 2024

Choose a reason for hiding this comment

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

this changes make sure that foo will be overwritten as __props.foo instead of _ctx.foo
see Playground

@yyx990803 yyx990803 merged commit e79a6df into vapor Dec 16, 2024
6 of 7 checks passed
@yyx990803 yyx990803 deleted the edison/fix/propsDestructure branch December 16, 2024 06:18
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