Skip to content

RFC: New types for typings #1289

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

Closed
layershifter opened this issue Feb 6, 2017 · 2 comments
Closed

RFC: New types for typings #1289

layershifter opened this issue Feb 6, 2017 · 2 comments
Labels

Comments

@layershifter
Copy link
Member

We have customPropTypes for our shorthands and it works fine 😄 But, their represent in typings is not obvious.

My suggestion is to add new types for customPropTypes and update existing typings:

type ShorthandCollection = Array<ShorthandItem>; // for customPropTypes.collectionShorthand
type ShorthandContent = React.ReactNode; // for customPropTypes.contentShorthand
type ShorthandItem = any; // for customPropTypes.itemShorthand

@levithomason any feedback?

@levithomason
Copy link
Member

This sounds really sane. It will make updates much easier to these special types.

@layershifter
Copy link
Member Author

I block this issue before we have the decision in #1364.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants