16450a027a
* Change the default type parameter constraint and default to unknown from {} * Relax unknown checking outside of strictNullChecks a bit * Increase strictness on index signatures with type `unknown` so inference doesnt change surprisingly * Remove redundant switch
20 lines
516 B
TypeScript
20 lines
516 B
TypeScript
/// <reference path="./fourslash.ts" />
|
|
|
|
//// declare namespace JSX {
|
|
//// interface Element {
|
|
//// render(): Element | string | false;
|
|
//// }
|
|
//// }
|
|
////
|
|
//// function SFC<T>(_props: Record<string, T>) {
|
|
//// return '';
|
|
//// }
|
|
////
|
|
//// (</*1*/SFC/>);
|
|
//// (</*2*/SFC<string>/>);
|
|
|
|
goTo.marker("1");
|
|
verify.signatureHelp({ text: "SFC(_props: Record<string, unknown>): string" });
|
|
goTo.marker("2");
|
|
verify.signatureHelp({ text: "SFC(_props: Record<string, string>): string" });
|