-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
slotProps Typescript #1635
Comments
Could you provide a codesandbox sample. I could not replicate it. https://codesandbox.io/s/dark-haze-cg49t?file=/src/App.vue |
updated my question and provied a codesandbox. Notice that the code works its just that volar or vue-tsc does not accept it as there is something wrong with type declarations |
Could you tell us your environment? With PrimeVue 3.7.2, I didn't get any error. |
Seems like the build error is gone. Now its just a warning from Volar in VSCode |
I didn't get any error from Volar in VSC. If you have a problem with build, please reopen this issue. |
primevue/src/components/timeline/Timeline.d.ts Lines 12 to 17 in 2acf800
Component declare class Timeline {
$props: TimelineProps;
$slots: {
content: (binds: ContentSlotBindings) => VNode[];
opposite: (binds: OppositeSlotBindings) => VNode[];
marker: (binds: MarkerSlotBindings) => VNode[];
connector: (binds: ConnectorSlotBindings) => VNode[];
}
} |
Fixed for the next version. #1695 |
this issue still exists in 3.10.0 |
I also encountered this issue when using the #header slot of |
[x] bug report
Current behavior
But I am getting the error
Property 'item' does not exist on type 'VNode<RendererNode, RendererElement, { [key: string]: any; }>[]'.
{{ slotProps.item }}
Expected behavior
Types should be declared
Minimal reproduction of the problem with instructions
https://codesandbox.io/s/pedantic-boyd-0mqx2?file=/src/App.vue
use Volar in Vscode or try to build using vue-tsc --no-emit and vite-build
The text was updated successfully, but these errors were encountered: