Skip to content

incorrect signature help for JsxOpeningLikeElement with typeArguments #22873

Closed
@ajafff

Description

@ajafff

TypeScript Version: 2.9.0-dev.20180328

Search Terms: jsx generic type arguments

Code

export {};

declare namespace JSX {
    interface Element {
        render(): Element | string | false;
    }
}

function SFC<T>(props: Record<string, T>) {
    return '';
}

/*1*/<SFC/>;
/*2*/<SFC<string>/>;

Expected behavior:

1: function SFC<{}>(props: Record<string, {}>): string
2: function SFC<string>(props: Record<string, string>): string

Actual behavior:

1: function SFC<{}>(props: Record<string, {}>): string
2: function SFC<{}>(props: Record<string, {}>): string

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: JSX/TSXRelates to the JSX parser and emitterFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions