Replies: 1 comment
-
The syntax has to conform to TS/JS so existing tooling continues to work. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
current $props() syntax to export as is the same as type syntax used for Typescript. So this creates a lot of extra boilerplate when using Typescript. Exporting as isn't as common as suppling types, so I propose we change the export as syntax to something like this:
let { myprop1 : number, { myprop2 as Prop2 } : string, myProp3 : boolean } = $props();
or if the curly brackets cause issue, maybe like this:
let { myProp1 : number, myProp2 as prop2 : string, myProp3 : boolean } = $props();
Beta Was this translation helpful? Give feedback.
All reactions