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

Typescript experimental declarations feature #6368

Closed
jiayexie opened this issue Aug 15, 2017 · 1 comment
Closed

Typescript experimental declarations feature #6368

jiayexie opened this issue Aug 15, 2017 · 1 comment

Comments

@jiayexie
Copy link

What problem does this feature solve?

I would love to have Typescript recognize the fields defined in props and data directly, as demoed in this starter project: https://github.com/Microsoft/TypeScript-Vue-Starter. This solves the headache of declaring an interface for every component, and changing the interface whenever I change something in the component.

However, it uses a fork of Vue that I cannot directly leverage in my production code because it's far behind the latest release. Can I have a timeline when is this feature going to be released?

What does the proposed API look like?

This looks like an experimental feature already implemented, and I'd like to know when it is going to be merged and released.

@HerringtonDarkholme
Copy link
Member

HerringtonDarkholme commented Aug 15, 2017

Hi @laputa523 , I'm glad to hear Vue is used in Microsoft production! Thanks for reporting :)

Meanwhile, you can track the progress of improved typing in #5887.

The main blocker here is the blocking change in declaration. We need a transition plan to introduce the new change. Also microsoft/TypeScript#14400 can help the transition (by inferring optional generic type parameter, we can make a compatible API without losing precise inference.)

Let's first close this issue so we can concentrate discussion on the pull request. Thanks!

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

No branches or pull requests

2 participants