Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] In the future and Object slot typing be supported by this plugin #651

Open
louiss0 opened this issue Jun 28, 2023 · 2 comments
Open
Labels
question Further information is requested

Comments

@louiss0
Copy link

louiss0 commented Jun 28, 2023

馃 Problem Description

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() } </>

}

馃殤 Other information

Here is a repo You can use to get what I mean. Vue JSX Example

@louiss0 louiss0 added the question Further information is requested label Jun 28, 2023
@louiss0
Copy link
Author

louiss0 commented Jul 7, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants