-
Notifications
You must be signed in to change notification settings - Fork 148
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the bug
When a function is used in a component props, its parameter cannot have a type. in the following code, x={(d: Point) => d.x}
shows an error of:
Unexpected tokensvelte(parse-error)
Unexpected tokents(-1)
<Pancake.SvgLine
data={[...points, { [x]: maxx, [field.key]: 0 }]}
x={(d: Point) => d.x}
y={(d) => d.y}
let:d
>
<path class="data" {d} />
</Pancake.SvgLine>
Logs
Please include browser console and server logs around the time this bug occurred.
To Reproduce
- create a brand new svelte ts project.
- use a function in a prop and add a type to the parameter.
- See the error
Version
svelte-preprocess
version (Please check you can reproduce the issue with the latest release!)
latest 4.10.7
sapkra, voytxt, memark and eugbytebluenote10, tommygiesbrecht, W4G1, voytxt, sapkra and 1 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request