Skip to content

JSX union signatures broken in nightly #27990

Closed
@ghost

Description

TypeScript Version: 3.2.0-dev.20181019

Code

declare const MyComponent: (new (props: any) => any) | ((props: any) => any);
<MyComponent />

Expected behavior:

No error.

Actual behavior:

src/a.tsx:2:2 - error TS2604: JSX element type 'MyComponent' does not have any construct or call signatures.

This is breaking tests for react on DefinitelyTyped, so it would be nice to get the fix in soon even if it means reintroducing a kludge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions