Skip to content

docs: separate props definition to make their types be inferable #240

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

Merged
merged 1 commit into from
Apr 17, 2018

Conversation

ktsn
Copy link
Member

@ktsn ktsn commented Apr 16, 2018

I've updated the TypeScript example based on this comment (thanks @KaelWD!) which eliminates redundant type definition for props. I guess this is a better way for TypeScript users since the props types are inferred by its props option unlike decorator approach.

/cc @HerringtonDarkholme @kaorun343

@ktsn ktsn merged commit e25fca3 into master Apr 17, 2018
@ktsn ktsn deleted the update-ts-example branch April 17, 2018 01:43
@CoskunSunali
Copy link

Interesting that I cannot get it to work. How do you expect typescript to be aware of the propMessage property since you deleted it from the class declaration?

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.

3 participants