We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Vue you are able to inject slots by using this syntax
<HelloWorld> { { default(props:Record<string, unknown>) { return props? props.value : "No props" } } } </HelloWorld>
But when I give types for slots I get no error regarding whether or not I'm typing the wrong one or not.
type Slots = SlotsType< { default(props: Record<string, unknown>): JSX.Element }> export default defineComponent((props: { msg: string, value: number, }, ctx: SetupContext<null, Slots>) => { return <> {ctx.slots.default() } </> }
Here is a repo You can use to get what I mean. Vue JSX Example
The text was updated successfully, but these errors were encountered:
@louiss0, it is much easier to use v-slots directive, if you want strong typing.
v-slots
Examples: https://github.com/funny-family/vue3-ts-playground/blob/master/src/app/components/not-found/not-found.component.tsx#L210 https://github.com/funny-family/vue3-ts-playground/blob/master/src/app/shared/components/text-field/text-field.render.tsx
Sorry, something went wrong.
@louiss0, it is much easier to use v-slots directive, if you want strong typing. Examples: https://github.com/funny-family/vue3-ts-playground/blob/master/src/app/components/not-found/not-found.component.tsx#L210 https://github.com/funny-family/vue3-ts-playground/blob/master/src/app/shared/components/text-field/text-field.render.tsx
You can use this Stackblits example repo to show me what you mean. Stack Blits Setup for you
No branches or pull requests
馃 Problem Description
In Vue you are able to inject slots by using this syntax
But when I give types for slots I get no error regarding whether or not I'm typing the wrong one or not.
馃殤 Other information
Here is a repo You can use to get what I mean. Vue JSX Example
The text was updated successfully, but these errors were encountered: