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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): improve SetupContext types #595

Merged
merged 3 commits into from Nov 23, 2020

Conversation

antfu
Copy link
Member

@antfu antfu commented Nov 22, 2020

No description provided.

@jacekkarczmarczyk
Copy link
Contributor

shouldn't slots, listeners and refs be using [keyin string]?: type?

With [key: string] for example slots.foo is always defined, but imho user should actually check if there's a slot with provided name

https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgGIHt3IN4ChnIDaA1hAJ4BcyAzmFKAOYC6Vt9IDuAvrrmGQAcUAIThRkAXhz4ipMslA06jJgH5Wyjt14wAriARhg6EMki1kAChiYqGdABpkAIzFVRUAJTSCCE9XQAGwgAOkD0BmtMEJhgAC84510EsIgOMAALJ1coGPjE5LjU9IzPbSA

image

@antfu
Copy link
Member Author

antfu commented Nov 22, 2020

Agree. Fixed, thanks!

@antfu antfu merged commit 49766bf into vuejs:master Nov 23, 2020
@antfu antfu deleted the fix/setup-context-types branch November 23, 2020 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants