/third_party/typescript/tests/baselines/reference/ |
D | stringEnumLiteralTypes3.types | 2 const enum Choice { Unknown = "", Yes = "yes", No = "no" }; 3 >Choice : Choice 4 >Unknown : Choice.Unknown 6 >Yes : Choice.Yes 8 >No : Choice.No 11 type Yes = Choice.Yes; 12 >Yes : Choice.Yes 13 >Choice : any 15 type YesNo = Choice.Yes | Choice.No; 17 >Choice : any [all …]
|
D | enumLiteralTypes3.types | 2 const enum Choice { Unknown, Yes, No }; 3 >Choice : Choice 4 >Unknown : Choice.Unknown 5 >Yes : Choice.Yes 6 >No : Choice.No 8 type Yes = Choice.Yes; 9 >Yes : Choice.Yes 10 >Choice : any 12 type YesNo = Choice.Yes | Choice.No; 14 >Choice : any [all …]
|
D | controlFlowManyConsecutiveConditionsNoTimeout.types | 2 export enum Choice { 3 >Choice : Choice 6 >One : Choice.One 9 >Two : Choice.Two 12 const choice: Choice = Choice.One; 13 >choice : Choice 14 >Choice.One : Choice.One 15 >Choice : typeof Choice 16 >One : Choice.One 18 const choiceOne = Choice.One; [all …]
|
D | stringEnumLiteralTypes2.types | 2 const enum Choice { Unknown = "", Yes = "yes", No = "no" }; 3 >Choice : Choice 4 >Unknown : Choice.Unknown 6 >Yes : Choice.Yes 8 >No : Choice.No 11 type YesNo = Choice.Yes | Choice.No; 13 >Choice : any 14 >Choice : any 16 type NoYes = Choice.No | Choice.Yes; 18 >Choice : any [all …]
|
D | stringEnumLiteralTypes1.types | 2 const enum Choice { Unknown = "", Yes = "yes", No = "no" }; 3 >Choice : Choice 4 >Unknown : Choice.Unknown 6 >Yes : Choice.Yes 8 >No : Choice.No 11 type YesNo = Choice.Yes | Choice.No; 13 >Choice : any 14 >Choice : any 16 type NoYes = Choice.No | Choice.Yes; 18 >Choice : any [all …]
|
D | enumLiteralTypes2.types | 2 const enum Choice { Unknown, Yes, No }; 3 >Choice : Choice 4 >Unknown : Choice.Unknown 5 >Yes : Choice.Yes 6 >No : Choice.No 8 type YesNo = Choice.Yes | Choice.No; 10 >Choice : any 11 >Choice : any 13 type NoYes = Choice.No | Choice.Yes; 15 >Choice : any [all …]
|
D | enumLiteralTypes1.types | 2 const enum Choice { Unknown, Yes, No }; 3 >Choice : Choice 4 >Unknown : Choice.Unknown 5 >Yes : Choice.Yes 6 >No : Choice.No 8 type YesNo = Choice.Yes | Choice.No; 10 >Choice : any 11 >Choice : any 13 type NoYes = Choice.No | Choice.Yes; 15 >Choice : any [all …]
|
D | enumLiteralTypes3.symbols | 2 const enum Choice { Unknown, Yes, No }; 3 >Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0)) 4 >Unknown : Symbol(Choice.Unknown, Decl(enumLiteralTypes3.ts, 0, 19)) 5 >Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28)) 6 >No : Symbol(Choice.No, Decl(enumLiteralTypes3.ts, 0, 33)) 8 type Yes = Choice.Yes; 10 >Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0)) 11 >Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes3.ts, 0, 28)) 13 type YesNo = Choice.Yes | Choice.No; 15 >Choice : Symbol(Choice, Decl(enumLiteralTypes3.ts, 0, 0)) [all …]
|
D | stringEnumLiteralTypes3.symbols | 2 const enum Choice { Unknown = "", Yes = "yes", No = "no" }; 3 >Choice : Symbol(Choice, Decl(stringEnumLiteralTypes3.ts, 0, 0)) 4 >Unknown : Symbol(Choice.Unknown, Decl(stringEnumLiteralTypes3.ts, 0, 19)) 5 >Yes : Symbol(Choice.Yes, Decl(stringEnumLiteralTypes3.ts, 0, 33)) 6 >No : Symbol(Choice.No, Decl(stringEnumLiteralTypes3.ts, 0, 46)) 8 type Yes = Choice.Yes; 10 >Choice : Symbol(Choice, Decl(stringEnumLiteralTypes3.ts, 0, 0)) 11 >Yes : Symbol(Choice.Yes, Decl(stringEnumLiteralTypes3.ts, 0, 33)) 13 type YesNo = Choice.Yes | Choice.No; 15 >Choice : Symbol(Choice, Decl(stringEnumLiteralTypes3.ts, 0, 0)) [all …]
|
D | enumLiteralTypes3.errors.txt | 1 …eral/enumLiteralTypes3.ts(10,5): error TS2322: Type 'YesNo' is not assignable to type 'Choice.Yes'. 2 Type 'Choice.No' is not assignable to type 'Choice.Yes'. 3 …umLiteralTypes3.ts(11,5): error TS2322: Type 'UnknownYesNo' is not assignable to type 'Choice.Yes'. 4 Type 'Choice.Unknown' is not assignable to type 'Choice.Yes'. 5 …literal/enumLiteralTypes3.ts(12,5): error TS2322: Type 'Choice' is not assignable to type 'Choice.… 7 Type 'Choice.Unknown' is not assignable to type 'YesNo'. 8 tests/cases/conformance/types/literal/enumLiteralTypes3.ts(19,5): error TS2322: Type 'Choice' is no… 9 …ral/enumLiteralTypes3.ts(37,5): error TS2322: Type 'Choice.Unknown' is not assignable to type 'Cho… 10 …teral/enumLiteralTypes3.ts(39,5): error TS2322: Type 'Choice.No' is not assignable to type 'Choice… 11 tests/cases/conformance/types/literal/enumLiteralTypes3.ts(40,5): error TS2322: Type 'Choice.Unknow… [all …]
|
D | stringEnumLiteralTypes3.errors.txt | 1 …tringEnumLiteralTypes3.ts(10,5): error TS2322: Type 'YesNo' is not assignable to type 'Choice.Yes'. 2 Type 'Choice.No' is not assignable to type 'Choice.Yes'. 3 …umLiteralTypes3.ts(11,5): error TS2322: Type 'UnknownYesNo' is not assignable to type 'Choice.Yes'. 4 Type 'Choice.Unknown' is not assignable to type 'Choice.Yes'. 5 …l/stringEnumLiteralTypes3.ts(12,5): error TS2322: Type 'Choice' is not assignable to type 'Choice.… 7 Type 'Choice.Unknown' is not assignable to type 'YesNo'. 8 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(19,5): error TS2322: Type 'Choice'… 9 …ringEnumLiteralTypes3.ts(37,5): error TS2322: Type 'Choice.Unknown' is not assignable to type 'Cho… 10 …stringEnumLiteralTypes3.ts(39,5): error TS2322: Type 'Choice.No' is not assignable to type 'Choice… 11 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(40,5): error TS2322: Type 'Choice.… [all …]
|
D | stringEnumLiteralTypes3.js | 2 const enum Choice { Unknown = "", Yes = "yes", No = "no" }; 4 type Yes = Choice.Yes; 5 type YesNo = Choice.Yes | Choice.No; 6 type NoYes = Choice.No | Choice.Yes; 7 type UnknownYesNo = Choice.Unknown | Choice.Yes | Choice.No; 9 function f1(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { argument 16 function f2(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { argument 23 function f3(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { argument 30 function f4(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { argument 37 function f5(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { argument [all …]
|
D | enumLiteralTypes3.js | 2 const enum Choice { Unknown, Yes, No }; 4 type Yes = Choice.Yes; 5 type YesNo = Choice.Yes | Choice.No; 6 type NoYes = Choice.No | Choice.Yes; 7 type UnknownYesNo = Choice.Unknown | Choice.Yes | Choice.No; 9 function f1(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { argument 16 function f2(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { argument 23 function f3(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { argument 30 function f4(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { argument 37 function f5(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { argument [all …]
|
D | stringEnumLiteralTypes1.symbols | 2 const enum Choice { Unknown = "", Yes = "yes", No = "no" }; 3 >Choice : Symbol(Choice, Decl(stringEnumLiteralTypes1.ts, 0, 0)) 4 >Unknown : Symbol(Choice.Unknown, Decl(stringEnumLiteralTypes1.ts, 0, 19)) 5 >Yes : Symbol(Choice.Yes, Decl(stringEnumLiteralTypes1.ts, 0, 33)) 6 >No : Symbol(Choice.No, Decl(stringEnumLiteralTypes1.ts, 0, 46)) 8 type YesNo = Choice.Yes | Choice.No; 10 >Choice : Symbol(Choice, Decl(stringEnumLiteralTypes1.ts, 0, 0)) 11 >Yes : Symbol(Choice.Yes, Decl(stringEnumLiteralTypes1.ts, 0, 33)) 12 >Choice : Symbol(Choice, Decl(stringEnumLiteralTypes1.ts, 0, 0)) 13 >No : Symbol(Choice.No, Decl(stringEnumLiteralTypes1.ts, 0, 46)) [all …]
|
D | stringEnumLiteralTypes2.symbols | 2 const enum Choice { Unknown = "", Yes = "yes", No = "no" }; 3 >Choice : Symbol(Choice, Decl(stringEnumLiteralTypes2.ts, 0, 0)) 4 >Unknown : Symbol(Choice.Unknown, Decl(stringEnumLiteralTypes2.ts, 0, 19)) 5 >Yes : Symbol(Choice.Yes, Decl(stringEnumLiteralTypes2.ts, 0, 33)) 6 >No : Symbol(Choice.No, Decl(stringEnumLiteralTypes2.ts, 0, 46)) 8 type YesNo = Choice.Yes | Choice.No; 10 >Choice : Symbol(Choice, Decl(stringEnumLiteralTypes2.ts, 0, 0)) 11 >Yes : Symbol(Choice.Yes, Decl(stringEnumLiteralTypes2.ts, 0, 33)) 12 >Choice : Symbol(Choice, Decl(stringEnumLiteralTypes2.ts, 0, 0)) 13 >No : Symbol(Choice.No, Decl(stringEnumLiteralTypes2.ts, 0, 46)) [all …]
|
D | enumLiteralTypes1.symbols | 2 const enum Choice { Unknown, Yes, No }; 3 >Choice : Symbol(Choice, Decl(enumLiteralTypes1.ts, 0, 0)) 4 >Unknown : Symbol(Choice.Unknown, Decl(enumLiteralTypes1.ts, 0, 19)) 5 >Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes1.ts, 0, 28)) 6 >No : Symbol(Choice.No, Decl(enumLiteralTypes1.ts, 0, 33)) 8 type YesNo = Choice.Yes | Choice.No; 10 >Choice : Symbol(Choice, Decl(enumLiteralTypes1.ts, 0, 0)) 11 >Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes1.ts, 0, 28)) 12 >Choice : Symbol(Choice, Decl(enumLiteralTypes1.ts, 0, 0)) 13 >No : Symbol(Choice.No, Decl(enumLiteralTypes1.ts, 0, 33)) [all …]
|
D | enumLiteralTypes2.symbols | 2 const enum Choice { Unknown, Yes, No }; 3 >Choice : Symbol(Choice, Decl(enumLiteralTypes2.ts, 0, 0)) 4 >Unknown : Symbol(Choice.Unknown, Decl(enumLiteralTypes2.ts, 0, 19)) 5 >Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes2.ts, 0, 28)) 6 >No : Symbol(Choice.No, Decl(enumLiteralTypes2.ts, 0, 33)) 8 type YesNo = Choice.Yes | Choice.No; 10 >Choice : Symbol(Choice, Decl(enumLiteralTypes2.ts, 0, 0)) 11 >Yes : Symbol(Choice.Yes, Decl(enumLiteralTypes2.ts, 0, 28)) 12 >Choice : Symbol(Choice, Decl(enumLiteralTypes2.ts, 0, 0)) 13 >No : Symbol(Choice.No, Decl(enumLiteralTypes2.ts, 0, 33)) [all …]
|
D | stringEnumLiteralTypes1.js | 2 const enum Choice { Unknown = "", Yes = "yes", No = "no" }; 4 type YesNo = Choice.Yes | Choice.No; 5 type NoYes = Choice.No | Choice.Yes; 6 type UnknownYesNo = Choice.Unknown | Choice.Yes | Choice.No; 11 var a: Choice.Yes | Choice.No; 12 var a: Choice.No | Choice.Yes; 15 function f2(a: YesNo, b: UnknownYesNo, c: Choice) { argument 21 function f3(a: Choice.Yes, b: YesNo) { 34 declare function g(x: Choice.Yes): string; 35 declare function g(x: Choice.No): boolean; [all …]
|
D | stringEnumLiteralTypes2.js | 2 const enum Choice { Unknown = "", Yes = "yes", No = "no" }; 4 type YesNo = Choice.Yes | Choice.No; 5 type NoYes = Choice.No | Choice.Yes; 6 type UnknownYesNo = Choice.Unknown | Choice.Yes | Choice.No; 11 var a: Choice.Yes | Choice.No; 12 var a: Choice.No | Choice.Yes; 15 function f2(a: YesNo, b: UnknownYesNo, c: Choice) { argument 21 function f3(a: Choice.Yes, b: YesNo) { 34 declare function g(x: Choice.Yes): string; 35 declare function g(x: Choice.No): boolean; [all …]
|
/third_party/typescript/tests/cases/conformance/types/literal/ |
D | enumLiteralTypes3.ts | 1 const enum Choice { Unknown, Yes, No }; enum 3 type Yes = Choice.Yes; 4 type YesNo = Choice.Yes | Choice.No; 5 type NoYes = Choice.No | Choice.Yes; 6 type UnknownYesNo = Choice.Unknown | Choice.Yes | Choice.No; 8 function f1(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { 15 function f2(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { 22 function f3(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { 29 function f4(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { 36 function f5(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { [all …]
|
D | stringEnumLiteralTypes3.ts | 1 const enum Choice { Unknown = "", Yes = "yes", No = "no" }; enum 3 type Yes = Choice.Yes; 4 type YesNo = Choice.Yes | Choice.No; 5 type NoYes = Choice.No | Choice.Yes; 6 type UnknownYesNo = Choice.Unknown | Choice.Yes | Choice.No; 8 function f1(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { 15 function f2(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { 22 function f3(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { 29 function f4(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { 36 function f5(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { [all …]
|
D | stringEnumLiteralTypes1.ts | 1 const enum Choice { Unknown = "", Yes = "yes", No = "no" }; enum 3 type YesNo = Choice.Yes | Choice.No; 4 type NoYes = Choice.No | Choice.Yes; 5 type UnknownYesNo = Choice.Unknown | Choice.Yes | Choice.No; 10 var a: Choice.Yes | Choice.No; 11 var a: Choice.No | Choice.Yes; 14 function f2(a: YesNo, b: UnknownYesNo, c: Choice) { 20 function f3(a: Choice.Yes, b: YesNo) { 33 declare function g(x: Choice.Yes): string; 34 declare function g(x: Choice.No): boolean; [all …]
|
D | stringEnumLiteralTypes2.ts | 3 const enum Choice { Unknown = "", Yes = "yes", No = "no" }; enum 5 type YesNo = Choice.Yes | Choice.No; 6 type NoYes = Choice.No | Choice.Yes; 7 type UnknownYesNo = Choice.Unknown | Choice.Yes | Choice.No; 12 var a: Choice.Yes | Choice.No; 13 var a: Choice.No | Choice.Yes; 16 function f2(a: YesNo, b: UnknownYesNo, c: Choice) { 22 function f3(a: Choice.Yes, b: YesNo) { 35 declare function g(x: Choice.Yes): string; 36 declare function g(x: Choice.No): boolean; [all …]
|
D | enumLiteralTypes1.ts | 1 const enum Choice { Unknown, Yes, No }; enum 3 type YesNo = Choice.Yes | Choice.No; 4 type NoYes = Choice.No | Choice.Yes; 5 type UnknownYesNo = Choice.Unknown | Choice.Yes | Choice.No; 10 var a: Choice.Yes | Choice.No; 11 var a: Choice.No | Choice.Yes; 14 function f2(a: YesNo, b: UnknownYesNo, c: Choice) { 20 function f3(a: Choice.Yes, b: YesNo) { 42 function f4(a: Choice.Yes, b: YesNo) { 47 declare function g(x: Choice.Yes): string; [all …]
|
D | enumLiteralTypes2.ts | 3 const enum Choice { Unknown, Yes, No }; enum 5 type YesNo = Choice.Yes | Choice.No; 6 type NoYes = Choice.No | Choice.Yes; 7 type UnknownYesNo = Choice.Unknown | Choice.Yes | Choice.No; 12 var a: Choice.Yes | Choice.No; 13 var a: Choice.No | Choice.Yes; 16 function f2(a: YesNo, b: UnknownYesNo, c: Choice) { 22 function f3(a: Choice.Yes, b: UnknownYesNo) { 44 function f4(a: Choice.Yes, b: UnknownYesNo) { 49 declare function g(x: Choice.Yes): string; [all …]
|