TypeScript: Support conditional types syntax (#7404)

Microsoft/TypeScript#21316 and Microsoft/TypeScript#21496
This commit is contained in:
Andy
2018-02-24 05:56:14 -08:00
committed by Nicolò Ribaudo
parent 960fa66c9e
commit 6f6c8dabba
16 changed files with 587 additions and 1 deletions

View File

@@ -0,0 +1 @@
type Element<T> = T extends (infer U)[] ? U : T;

View File

@@ -0,0 +1 @@
type Element<T> = T extends (infer U)[] ? U : T;

View File

@@ -0,0 +1 @@
let x: number extends string ? boolean : null;

View File

@@ -0,0 +1 @@
let x: number extends string ? boolean : null;