-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSX/TSXRelates to the JSX parser and emitterRelates to the JSX parser and emitterFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
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 TypeScriptA bug in TypeScriptDomain: JSX/TSXRelates to the JSX parser and emitterRelates to the JSX parser and emitterFixedA PR has been merged for this issueA PR has been merged for this issue