Skip to content

Commit a44a434

Browse files
committed
Accept baselines
1 parent 185d2cb commit a44a434

769 files changed

Lines changed: 4878 additions & 7188 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tests/baselines/reference/TypeGuardWithArrayUnion.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ class Message {
1313
function saySize(message: Message | Message[]) {
1414
>saySize : (message: Message | Message[]) => number
1515
> : ^ ^^ ^^^^^^^^^^^
16-
>message : Message | Message[]
16+
>message : Message[] | Message
1717
> : ^^^^^^^^^^^^^^^^^^^
1818

1919
if (message instanceof Array) {
2020
>message instanceof Array : boolean
2121
> : ^^^^^^^
22-
>message : Message | Message[]
22+
>message : Message[] | Message
2323
> : ^^^^^^^^^^^^^^^^^^^
2424
>Array : ArrayConstructor
2525
> : ^^^^^^^^^^^^^^^^

tests/baselines/reference/TypeGuardWithEnumUnion.types

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function f1(x: Color | string) {
2020
if (typeof x === "number") {
2121
>typeof x === "number" : boolean
2222
> : ^^^^^^^
23-
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
23+
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
2424
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2525
>x : string | Color
2626
> : ^^^^^^^^^^^^^^
@@ -53,15 +53,15 @@ function f1(x: Color | string) {
5353
function f2(x: Color | string | string[]) {
5454
>f2 : (x: Color | string | string[]) => void
5555
> : ^ ^^ ^^^^^^^^^
56-
>x : string | Color | string[]
56+
>x : string | string[] | Color
5757
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
5858

5959
if (typeof x === "object") {
6060
>typeof x === "object" : boolean
6161
> : ^^^^^^^
62-
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
62+
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
6363
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64-
>x : string | Color | string[]
64+
>x : string | string[] | Color
6565
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
6666
>"object" : "object"
6767
> : ^^^^^^^^
@@ -79,9 +79,9 @@ function f2(x: Color | string | string[]) {
7979
if (typeof x === "number") {
8080
>typeof x === "number" : boolean
8181
> : ^^^^^^^
82-
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
82+
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
8383
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84-
>x : string | Color | string[]
84+
>x : string | string[] | Color
8585
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
8686
>"number" : "number"
8787
> : ^^^^^^^^
@@ -110,9 +110,9 @@ function f2(x: Color | string | string[]) {
110110
if (typeof x === "string") {
111111
>typeof x === "string" : boolean
112112
> : ^^^^^^^
113-
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
113+
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
114114
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
115-
>x : string | Color | string[]
115+
>x : string | string[] | Color
116116
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
117117
>"string" : "string"
118118
> : ^^^^^^^^
@@ -129,13 +129,13 @@ function f2(x: Color | string | string[]) {
129129
}
130130
else {
131131
var b = x;
132-
>b : Color | string[]
132+
>b : string[] | Color
133133
> : ^^^^^^^^^^^^^^^^
134-
>x : Color | string[]
134+
>x : string[] | Color
135135
> : ^^^^^^^^^^^^^^^^
136136

137137
var b: Color | string[];
138-
>b : Color | string[]
138+
>b : string[] | Color
139139
> : ^^^^^^^^^^^^^^^^
140140
}
141141
}

tests/baselines/reference/ambientExportDefaultErrors.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ declare module "indirect" {
4141
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
4242

4343
export default typeof Foo.default;
44-
>typeof Foo.default : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
44+
>typeof Foo.default : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
4545
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4646
>Foo.default : number
4747
> : ^^^^^^
@@ -58,7 +58,7 @@ declare module "indirect2" {
5858
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^
5959

6060
export = typeof Foo2;
61-
>typeof Foo2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
61+
>typeof Foo2 : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
6262
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6363
>Foo2 : number
6464
> : ^^^^^^

tests/baselines/reference/anonymousClassExpression1.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function f() {
88
return typeof class {} === "function";
99
>typeof class {} === "function" : boolean
1010
> : ^^^^^^^
11-
>typeof class {} : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
11+
>typeof class {} : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
1212
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1313
>class {} : typeof (Anonymous class)
1414
> : ^^^^^^^^^^^^^^^^^^^^^^^^

tests/baselines/reference/api/typescript.d.ts

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6591,53 +6591,53 @@ declare namespace ts {
65916591
enum TypeFlags {
65926592
Any = 1,
65936593
Unknown = 2,
6594-
String = 4,
6595-
Number = 8,
6596-
Boolean = 16,
6597-
Enum = 32,
6598-
BigInt = 64,
6599-
StringLiteral = 128,
6600-
NumberLiteral = 256,
6601-
BooleanLiteral = 512,
6602-
EnumLiteral = 1024,
6603-
BigIntLiteral = 2048,
6604-
ESSymbol = 4096,
6605-
UniqueESSymbol = 8192,
6606-
Void = 16384,
6607-
Undefined = 32768,
6608-
Null = 65536,
6609-
Never = 131072,
6610-
TypeParameter = 262144,
6611-
Object = 524288,
6612-
Union = 1048576,
6613-
Intersection = 2097152,
6614-
Index = 4194304,
6615-
IndexedAccess = 8388608,
6616-
Conditional = 16777216,
6617-
Substitution = 33554432,
6618-
NonPrimitive = 67108864,
6619-
TemplateLiteral = 134217728,
6620-
StringMapping = 268435456,
6621-
Literal = 2944,
6622-
Unit = 109472,
6623-
Freshable = 2976,
6624-
StringOrNumberLiteral = 384,
6625-
PossiblyFalsy = 117724,
6626-
StringLike = 402653316,
6627-
NumberLike = 296,
6628-
BigIntLike = 2112,
6629-
BooleanLike = 528,
6630-
EnumLike = 1056,
6631-
ESSymbolLike = 12288,
6632-
VoidLike = 49152,
6633-
UnionOrIntersection = 3145728,
6634-
StructuredType = 3670016,
6635-
TypeVariable = 8650752,
6636-
InstantiableNonPrimitive = 58982400,
6637-
InstantiablePrimitive = 406847488,
6638-
Instantiable = 465829888,
6639-
StructuredOrInstantiable = 469499904,
6640-
Narrowable = 536624127,
6594+
Undefined = 4,
6595+
Null = 8,
6596+
Void = 16,
6597+
String = 32,
6598+
Number = 64,
6599+
BigInt = 128,
6600+
Boolean = 256,
6601+
ESSymbol = 512,
6602+
StringLiteral = 1024,
6603+
NumberLiteral = 2048,
6604+
BigIntLiteral = 4096,
6605+
BooleanLiteral = 8192,
6606+
UniqueESSymbol = 16384,
6607+
EnumLiteral = 32768,
6608+
Enum = 65536,
6609+
NonPrimitive = 131072,
6610+
Never = 262144,
6611+
TypeParameter = 524288,
6612+
Object = 1048576,
6613+
Index = 2097152,
6614+
TemplateLiteral = 4194304,
6615+
StringMapping = 8388608,
6616+
Substitution = 16777216,
6617+
IndexedAccess = 33554432,
6618+
Conditional = 67108864,
6619+
Union = 134217728,
6620+
Intersection = 268435456,
6621+
Literal = 15360,
6622+
Unit = 97292,
6623+
Freshable = 80896,
6624+
StringOrNumberLiteral = 3072,
6625+
PossiblyFalsy = 15868,
6626+
StringLike = 12583968,
6627+
NumberLike = 67648,
6628+
BigIntLike = 4224,
6629+
BooleanLike = 8448,
6630+
EnumLike = 98304,
6631+
ESSymbolLike = 16896,
6632+
VoidLike = 20,
6633+
UnionOrIntersection = 402653184,
6634+
StructuredType = 403701760,
6635+
TypeVariable = 34078720,
6636+
InstantiableNonPrimitive = 117964800,
6637+
InstantiablePrimitive = 14680064,
6638+
Instantiable = 132644864,
6639+
StructuredOrInstantiable = 536346624,
6640+
Narrowable = 536575971,
66416641
}
66426642
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
66436643
interface Type {

tests/baselines/reference/arityAndOrderCompatibility01.errors.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ arityAndOrderCompatibility01.ts(23,5): error TS2322: Type '{ 0: string; 1: numbe
1111
arityAndOrderCompatibility01.ts(24,5): error TS2322: Type '[string, number]' is not assignable to type '[number]'.
1212
Source has 2 element(s) but target allows only 1.
1313
arityAndOrderCompatibility01.ts(25,5): error TS2322: Type 'StrNum' is not assignable to type '[number]'.
14-
Types of property '0' are incompatible.
15-
Type 'string' is not assignable to type 'number'.
14+
The types returned by 'pop()' are incompatible between these types.
15+
Type 'string | number' is not assignable to type 'number'.
16+
Type 'string' is not assignable to type 'number'.
1617
arityAndOrderCompatibility01.ts(26,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number]'.
1718
arityAndOrderCompatibility01.ts(27,5): error TS2322: Type '[string, number]' is not assignable to type '[string]'.
1819
Source has 2 element(s) but target allows only 1.
1920
arityAndOrderCompatibility01.ts(28,5): error TS2322: Type 'StrNum' is not assignable to type '[string]'.
20-
Types of property 'length' are incompatible.
21-
Type '2' is not assignable to type '1'.
21+
The types returned by 'pop()' are incompatible between these types.
22+
Type 'string | number' is not assignable to type 'string'.
23+
Type 'number' is not assignable to type 'string'.
2224
arityAndOrderCompatibility01.ts(29,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[string]'.
2325
arityAndOrderCompatibility01.ts(30,5): error TS2322: Type '[string, number]' is not assignable to type '[number, string]'.
2426
Type at position 0 in source is not compatible with type at position 0 in target.
@@ -78,8 +80,9 @@ arityAndOrderCompatibility01.ts(32,5): error TS2322: Type '{ 0: string; 1: numbe
7880
var l2: [number] = y;
7981
~~
8082
!!! error TS2322: Type 'StrNum' is not assignable to type '[number]'.
81-
!!! error TS2322: Types of property '0' are incompatible.
82-
!!! error TS2322: Type 'string' is not assignable to type 'number'.
83+
!!! error TS2322: The types returned by 'pop()' are incompatible between these types.
84+
!!! error TS2322: Type 'string | number' is not assignable to type 'number'.
85+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
8386
var l3: [number] = z;
8487
~~
8588
!!! error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number]'.
@@ -90,8 +93,9 @@ arityAndOrderCompatibility01.ts(32,5): error TS2322: Type '{ 0: string; 1: numbe
9093
var m2: [string] = y;
9194
~~
9295
!!! error TS2322: Type 'StrNum' is not assignable to type '[string]'.
93-
!!! error TS2322: Types of property 'length' are incompatible.
94-
!!! error TS2322: Type '2' is not assignable to type '1'.
96+
!!! error TS2322: The types returned by 'pop()' are incompatible between these types.
97+
!!! error TS2322: Type 'string | number' is not assignable to type 'string'.
98+
!!! error TS2322: Type 'number' is not assignable to type 'string'.
9599
var m3: [string] = z;
96100
~~
97101
!!! error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[string]'.

tests/baselines/reference/arrayAssignmentTest1.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
arrayAssignmentTest1.ts(46,5): error TS2741: Property 'IM1' is missing in type 'undefined[]' but required in type 'I1'.
22
arrayAssignmentTest1.ts(47,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C1': IM1, C1M1
3-
arrayAssignmentTest1.ts(48,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': C2M1, IM1, C1M1
3+
arrayAssignmentTest1.ts(48,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': IM1, C1M1, C2M1
44
arrayAssignmentTest1.ts(49,5): error TS2741: Property 'CM3M1' is missing in type 'undefined[]' but required in type 'C3'.
55
arrayAssignmentTest1.ts(60,1): error TS2322: Type 'C3[]' is not assignable to type 'I1[]'.
66
Property 'IM1' is missing in type 'C3' but required in type 'I1'.
@@ -11,9 +11,9 @@ arrayAssignmentTest1.ts(65,1): error TS2322: Type 'C3[]' is not assignable to ty
1111
arrayAssignmentTest1.ts(68,1): error TS2322: Type 'C1[]' is not assignable to type 'C2[]'.
1212
Property 'C2M1' is missing in type 'C1' but required in type 'C2'.
1313
arrayAssignmentTest1.ts(69,1): error TS2322: Type 'I1[]' is not assignable to type 'C2[]'.
14-
Type 'I1' is missing the following properties from type 'C2': C2M1, C1M1
14+
Type 'I1' is missing the following properties from type 'C2': C1M1, C2M1
1515
arrayAssignmentTest1.ts(70,1): error TS2322: Type 'C3[]' is not assignable to type 'C2[]'.
16-
Type 'C3' is missing the following properties from type 'C2': C2M1, IM1, C1M1
16+
Type 'C3' is missing the following properties from type 'C2': IM1, C1M1, C2M1
1717
arrayAssignmentTest1.ts(75,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]'.
1818
Property 'CM3M1' is missing in type 'C2' but required in type 'C3'.
1919
arrayAssignmentTest1.ts(76,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]'.
@@ -83,7 +83,7 @@ arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is missing the following
8383
!!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C1': IM1, C1M1
8484
var c2_error: C2 = []; // should be an error - is
8585
~~~~~~~~
86-
!!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': C2M1, IM1, C1M1
86+
!!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': IM1, C1M1, C2M1
8787
var c3_error: C3 = []; // should be an error - is
8888
~~~~~~~~
8989
!!! error TS2741: Property 'CM3M1' is missing in type 'undefined[]' but required in type 'C3'.
@@ -125,11 +125,11 @@ arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is missing the following
125125
arr_c2 = arr_i1; // should be an error - subtype relationship - is
126126
~~~~~~
127127
!!! error TS2322: Type 'I1[]' is not assignable to type 'C2[]'.
128-
!!! error TS2322: Type 'I1' is missing the following properties from type 'C2': C2M1, C1M1
128+
!!! error TS2322: Type 'I1' is missing the following properties from type 'C2': C1M1, C2M1
129129
arr_c2 = arr_c3; // should be an error - is
130130
~~~~~~
131131
!!! error TS2322: Type 'C3[]' is not assignable to type 'C2[]'.
132-
!!! error TS2322: Type 'C3' is missing the following properties from type 'C2': C2M1, IM1, C1M1
132+
!!! error TS2322: Type 'C3' is missing the following properties from type 'C2': IM1, C1M1, C2M1
133133

134134
// "clean up bug" occurs at this point
135135
// if you move these three expressions to another file, they raise an error

tests/baselines/reference/arrayBestCommonTypes.types

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -620,10 +620,10 @@ namespace EmptyTypes {
620620
> : ^^^^^^^^^^^^
621621

622622
var b1 = [baseObj, base2Obj, ifaceObj];
623-
>b1 : iface[]
624-
> : ^^^^^^^
625-
>[baseObj, base2Obj, ifaceObj] : iface[]
626-
> : ^^^^^^^
623+
>b1 : (base | base2)[]
624+
> : ^^^^^^^^^^^^^^^^
625+
>[baseObj, base2Obj, ifaceObj] : (base | base2)[]
626+
> : ^^^^^^^^^^^^^^^^
627627
>baseObj : base
628628
> : ^^^^
629629
>base2Obj : base2
@@ -632,10 +632,10 @@ namespace EmptyTypes {
632632
> : ^^^^^
633633

634634
var b2 = [base2Obj, baseObj, ifaceObj];
635-
>b2 : iface[]
636-
> : ^^^^^^^
637-
>[base2Obj, baseObj, ifaceObj] : iface[]
638-
> : ^^^^^^^
635+
>b2 : (base | base2)[]
636+
> : ^^^^^^^^^^^^^^^^
637+
>[base2Obj, baseObj, ifaceObj] : (base | base2)[]
638+
> : ^^^^^^^^^^^^^^^^
639639
>base2Obj : base2
640640
> : ^^^^^
641641
>baseObj : base
@@ -644,10 +644,10 @@ namespace EmptyTypes {
644644
> : ^^^^^
645645

646646
var b3 = [baseObj, ifaceObj, base2Obj];
647-
>b3 : iface[]
648-
> : ^^^^^^^
649-
>[baseObj, ifaceObj, base2Obj] : iface[]
650-
> : ^^^^^^^
647+
>b3 : (base | base2)[]
648+
> : ^^^^^^^^^^^^^^^^
649+
>[baseObj, ifaceObj, base2Obj] : (base | base2)[]
650+
> : ^^^^^^^^^^^^^^^^
651651
>baseObj : base
652652
> : ^^^^
653653
>ifaceObj : iface
@@ -656,10 +656,10 @@ namespace EmptyTypes {
656656
> : ^^^^^
657657

658658
var b4 = [ifaceObj, baseObj, base2Obj];
659-
>b4 : iface[]
660-
> : ^^^^^^^
661-
>[ifaceObj, baseObj, base2Obj] : iface[]
662-
> : ^^^^^^^
659+
>b4 : (base | base2)[]
660+
> : ^^^^^^^^^^^^^^^^
661+
>[ifaceObj, baseObj, base2Obj] : (base | base2)[]
662+
> : ^^^^^^^^^^^^^^^^
663663
>ifaceObj : iface
664664
> : ^^^^^
665665
>baseObj : base

tests/baselines/reference/arrayConcat3.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ function doStuff<T extends object, T1 extends T>(a: Array<Fn<T>>, b: Array<Fn<T1
1919
b.concat(a);
2020
>b.concat(a) : Fn<T1>[]
2121
> : ^^^^^^^^
22-
>b.concat : { (...items: ConcatArray<Fn<T1>>[]): Fn<T1>[]; (...items: (Fn<T1> | ConcatArray<Fn<T1>>)[]): Fn<T1>[]; }
22+
>b.concat : { (...items: ConcatArray<Fn<T1>>[]): Fn<T1>[]; (...items: (ConcatArray<Fn<T1>> | Fn<T1>)[]): Fn<T1>[]; }
2323
> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2424
>b : Fn<T1>[]
2525
> : ^^^^^^^^
26-
>concat : { (...items: ConcatArray<Fn<T1>>[]): Fn<T1>[]; (...items: (Fn<T1> | ConcatArray<Fn<T1>>)[]): Fn<T1>[]; }
26+
>concat : { (...items: ConcatArray<Fn<T1>>[]): Fn<T1>[]; (...items: (ConcatArray<Fn<T1>> | Fn<T1>)[]): Fn<T1>[]; }
2727
> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2828
>a : Fn<T>[]
2929
> : ^^^^^^^

tests/baselines/reference/arrayDestructuringInSwitch1.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export function evaluate(expression: Expression): boolean {
9797
return expression === 'true';
9898
>expression === 'true' : boolean
9999
> : ^^^^^^^
100-
>expression : "true" | "false"
100+
>expression : "false" | "true"
101101
> : ^^^^^^^^^^^^^^^^
102102
>'true' : "true"
103103
> : ^^^^^^

0 commit comments

Comments
 (0)