You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// strictNullCheck: truenamespaceReact{interfaceStatelessComponent<P>{(props: P&{children?: ReactNode},context?: any): ReactElement<any>|null;propTypes?: ValidationMap<P>;contextTypes?: ValidationMap<any>;defaultProps?: Partial<P>;displayName?: string;}}// All this is valid JSXconstFoo: React.StatelessComponent<any>=()=>nullconstbar=<Foo/>
Expected behavior:
JSX compilation should allow proper types (including null return).
Actual behavior:
Setting the proper return type for stateless components in @types/react yields a lot of failing other types as seen in this build fail: DefinitelyTyped/DefinitelyTyped#17021
The text was updated successfully, but these errors were encountered:
Sorry for the trouble. This has been fixed. Using typescript 2.3.4 works (but I have to figure out what version of tsc DefinitelyTyped is using in CI).
TypeScript Version: 2.3.2
Code
Expected behavior:
JSX compilation should allow proper types (including null return).
Actual behavior:
Setting the proper return type for stateless components in @types/react yields a lot of failing other types as seen in this build fail: DefinitelyTyped/DefinitelyTyped#17021
The text was updated successfully, but these errors were encountered: