Home
last modified time | relevance | path

Searched refs:Choice (Results 1 – 25 of 102) sorted by relevance

12345

/third_party/typescript/tests/baselines/reference/
DstringEnumLiteralTypes3.types2 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 …]
DenumLiteralTypes3.types2 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 …]
DcontrolFlowManyConsecutiveConditionsNoTimeout.types2 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 …]
DstringEnumLiteralTypes2.types2 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 …]
DstringEnumLiteralTypes1.types2 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 …]
DenumLiteralTypes2.types2 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 …]
DenumLiteralTypes1.types2 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 …]
DenumLiteralTypes3.symbols2 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 …]
DstringEnumLiteralTypes3.symbols2 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 …]
DenumLiteralTypes3.errors.txt1 …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 …]
DstringEnumLiteralTypes3.errors.txt1 …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 …]
DstringEnumLiteralTypes3.js2 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 …]
DenumLiteralTypes3.js2 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 …]
DstringEnumLiteralTypes1.symbols2 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 …]
DstringEnumLiteralTypes2.symbols2 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 …]
DenumLiteralTypes1.symbols2 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 …]
DenumLiteralTypes2.symbols2 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 …]
DstringEnumLiteralTypes1.js2 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 …]
DstringEnumLiteralTypes2.js2 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/
DenumLiteralTypes3.ts1 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 …]
DstringEnumLiteralTypes3.ts1 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 …]
DstringEnumLiteralTypes1.ts1 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 …]
DstringEnumLiteralTypes2.ts3 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 …]
DenumLiteralTypes1.ts1 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 …]
DenumLiteralTypes2.ts3 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 …]

12345