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】type checking for JSX children && noImplicitAny #1212

Closed
paranoidjk opened this issue Apr 26, 2017 · 3 comments
Closed

【TypeScript】type checking for JSX children && noImplicitAny #1212

paranoidjk opened this issue Apr 26, 2017 · 3 comments
Assignees

Comments

@paranoidjk
Copy link
Contributor

microsoft/TypeScript#13618

@paranoidjk
Copy link
Contributor Author

@paranoidjk paranoidjk changed the title type checking for JSX children 【TypeScript】type checking for JSX children && noImplicitAny May 5, 2017
@himStone
Copy link

himStone commented May 5, 2017

to give style, styles, even children a appropriate type declaration, shall we separate the propType of native and web?

interface NativeBaseProps {
  style?: StyleSheet.Style;
  styles?: {};
}

interface WebBaseProps {
  style?: React.CSSProperties;
  prefixCls?: string;
  className?: string;
}

interface ComponentCommonProps {
  commonFiled?: string;
}

interface ComponentWebProps extends ComponentCommonProps, WebBaseProps {
  webOnlyField?: string;
}

interface ComponentNativeProps extends ComponentCommonProps, NativeBaseProps {
  nativeOnlyField?: string;
}

This was referenced May 6, 2017
This was referenced May 16, 2017
@paranoidjk
Copy link
Contributor Author

@bccsafe You can try to do this based on master branch (antd-mobile@2).

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

4 participants