{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11944","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11944/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11944/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11944/events","html_url":"https://github.com/Microsoft/TypeScript/issues/11944","id":186113225,"number":11944,"title":"Unable to pass another react component as prop with strictNullChecks","user":{"login":"asvetliakov","id":8881674,"avatar_url":"https://avatars.githubusercontent.com/u/8881674?v=3","gravatar_id":"","url":"https://api.github.com/users/asvetliakov","html_url":"https://github.com/asvetliakov","followers_url":"https://api.github.com/users/asvetliakov/followers","following_url":"https://api.github.com/users/asvetliakov/following{/other_user}","gists_url":"https://api.github.com/users/asvetliakov/gists{/gist_id}","starred_url":"https://api.github.com/users/asvetliakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asvetliakov/subscriptions","organizations_url":"https://api.github.com/users/asvetliakov/orgs","repos_url":"https://api.github.com/users/asvetliakov/repos","events_url":"https://api.github.com/users/asvetliakov/events{/privacy}","received_events_url":"https://api.github.com/users/asvetliakov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-30T02:38:52Z","updated_at":"2016-10-30T02:38:52Z","closed_at":null,"body":"I'm not sure where to file issue - here or in DT repo, but i believe it's more TS issue rather than typings issue, since it's valid to return null in StatelessComponent definition\r\n\r\n**TypeScript Version:**  2.0.6\r\n```@types/react\": \"^0.14.43\"```\r\n```strictNullChecks: true```\r\n\r\n**Code**\r\n\r\n```ts\r\nimport * as React from \"react\";\r\ninterface Props {\r\n   Component: React.ComponentClass<any> | React.StatelessComponent<any>\r\n}\r\n\r\nclass MyComponent extends React.Component<Props, {}> {\r\n   render(): {\r\n     const Component = this.props.Component;\r\n     return <Component />;\r\n  }\r\n}\r\n\r\n```\r\n\r\n**Expected behavior:**\r\nCompiles fine\r\n\r\n**Actual behavior:** \r\n```\r\n'JSX element type 'ReactElement<any> | null' is not a constructor function for JSX elements.\r\n  Type 'null' is not assignable to type 'ElementClass'.'\r\n```\r\n\r\n"}}
{"actor":{"display_login":"asvetliakov"}}