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(runtime-core): unexpected props type inference failed #1898

Closed
wants to merge 2 commits into from
Closed

fix(runtime-core): unexpected props type inference failed #1898

wants to merge 2 commits into from

Conversation

HcySunYang
Copy link
Member

@HcySunYang HcySunYang commented Aug 19, 2020

Close #1891

@HcySunYang
Copy link
Member Author

Maybe #1896 is better

@HcySunYang
Copy link
Member Author

It's weird and it still works correctly even though I do this:

DefaultFactory<T extends any ? D : T>

@pikax
Copy link
Member

pikax commented Aug 19, 2020

  default?: D | DefaultFactory<D extends any ? T : D> | null | undefined, // works
  default?: D | DefaultFactory<D extends any ? D : T> | null | undefined, // works
  default?: D | DefaultFactory<D extends any ? T : T> | null | undefined, // works
  default?: D | DefaultFactory<T> | null | undefined // doesn't work

@yyx990803
Copy link
Member

closed in favor of #1896

@yyx990803 yyx990803 closed this Aug 19, 2020
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.

defineComponent infers props incorrectly when prop is Function type
3 participants