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

feat: properly type mount with props #74

Merged
merged 1 commit into from
Apr 20, 2020

Conversation

cexbrayat
Copy link
Member

@cexbrayat cexbrayat commented Apr 17, 2020

This offers proper typings for the props given in the mounting options.
For example mount(defineComponent({ props: { a: string}}), {props: {a: 2}}) fails to compile.

Only issue with this PR is that we need ExtractPropTypes to be public to properly type check the case mount({ props: { a: String }}, { props: {a: 2}}).

I'll open a discussion on vue-next and link back here (see vuejs/core#983).
Update: Evan merged it, so we'll be able to merge this one when beta.2 is released.

On top of #73

@lmiller1990
Copy link
Member

lmiller1990 commented Apr 17, 2020

Cool, will wait for beta 2. I am very excited for this feature.

@lmiller1990
Copy link
Member

Will leave this open until beta-2, which fixes a few things. Looks good otherwise

This offers proper typings for the props given in the mounting options.
@cexbrayat
Copy link
Member Author

@lmiller1990 I rebased on top of master, we should be good to merge 👌

@cexbrayat cexbrayat marked this pull request as ready for review April 19, 2020 08:35
@lmiller1990 lmiller1990 merged commit 140b72b into vuejs:master Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants