Skip to content

Commit a323037

Browse files
committed
Accept new baselines
1 parent 466bcb2 commit a323037

10 files changed

+48
-32
lines changed

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

+6-7
Original file line numberDiff line numberDiff line change
@@ -2654,14 +2654,13 @@ declare namespace ts {
26542654
ObjectLiteralPatternWithComputedProperties = 512,
26552655
ReverseMapped = 1024,
26562656
JsxAttributes = 2048,
2657-
MarkerType = 4096,
2658-
JSLiteral = 8192,
2659-
FreshLiteral = 16384,
2660-
ArrayLiteral = 32768,
2657+
JSLiteral = 4096,
2658+
FreshLiteral = 8192,
2659+
ArrayLiteral = 16384,
26612660
ClassOrInterface = 3,
2662-
ContainsSpread = 4194304,
2663-
ObjectRestType = 8388608,
2664-
InstantiationExpressionType = 16777216,
2661+
ContainsSpread = 2097152,
2662+
ObjectRestType = 4194304,
2663+
InstantiationExpressionType = 8388608,
26652664
}
26662665
export interface ObjectType extends Type {
26672666
objectFlags: ObjectFlags;

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

+6-7
Original file line numberDiff line numberDiff line change
@@ -2654,14 +2654,13 @@ declare namespace ts {
26542654
ObjectLiteralPatternWithComputedProperties = 512,
26552655
ReverseMapped = 1024,
26562656
JsxAttributes = 2048,
2657-
MarkerType = 4096,
2658-
JSLiteral = 8192,
2659-
FreshLiteral = 16384,
2660-
ArrayLiteral = 32768,
2657+
JSLiteral = 4096,
2658+
FreshLiteral = 8192,
2659+
ArrayLiteral = 16384,
26612660
ClassOrInterface = 3,
2662-
ContainsSpread = 4194304,
2663-
ObjectRestType = 8388608,
2664-
InstantiationExpressionType = 16777216,
2661+
ContainsSpread = 2097152,
2662+
ObjectRestType = 4194304,
2663+
InstantiationExpressionType = 8388608,
26652664
}
26662665
export interface ObjectType extends Type {
26672666
objectFlags: ObjectFlags;

tests/baselines/reference/bivariantInferences.symbols

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ declare const b: (string | number)[] | null[] | undefined[] | {}[];
2424

2525
let x = a.equalsShallow(b);
2626
>x : Symbol(x, Decl(bivariantInferences.ts, 9, 3))
27-
>a.equalsShallow : Symbol(Array.equalsShallow, Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20))
27+
>a.equalsShallow : Symbol(Array.equalsShallow, Decl(bivariantInferences.ts, 2, 20))
2828
>a : Symbol(a, Decl(bivariantInferences.ts, 6, 13))
29-
>equalsShallow : Symbol(Array.equalsShallow, Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20))
29+
>equalsShallow : Symbol(Array.equalsShallow, Decl(bivariantInferences.ts, 2, 20))
3030
>b : Symbol(b, Decl(bivariantInferences.ts, 7, 13))
3131

tests/baselines/reference/bivariantInferences.types

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ declare const b: (string | number)[] | null[] | undefined[] | {}[];
1919
let x = a.equalsShallow(b);
2020
>x : boolean
2121
>a.equalsShallow(b) : boolean
22-
>a.equalsShallow : (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean)
22+
>a.equalsShallow : <T>(this: readonly T[], other: readonly T[]) => boolean
2323
>a : (string | number)[] | null[] | undefined[] | {}[]
24-
>equalsShallow : (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean)
24+
>equalsShallow : <T>(this: readonly T[], other: readonly T[]) => boolean
2525
>b : (string | number)[] | null[] | undefined[] | {}[]
2626

tests/baselines/reference/completionEntryForUnionMethod.baseline

+3-3
Original file line numberDiff line numberDiff line change
@@ -2244,7 +2244,7 @@
22442244
},
22452245
{
22462246
"text": "join",
2247-
"kind": "propertyName"
2247+
"kind": "methodName"
22482248
},
22492249
{
22502250
"text": "(",
@@ -5906,7 +5906,7 @@
59065906
},
59075907
{
59085908
"text": "toLocaleString",
5909-
"kind": "propertyName"
5909+
"kind": "methodName"
59105910
},
59115911
{
59125912
"text": "(",
@@ -5980,7 +5980,7 @@
59805980
},
59815981
{
59825982
"text": "toString",
5983-
"kind": "propertyName"
5983+
"kind": "methodName"
59845984
},
59855985
{
59865986
"text": "(",

tests/baselines/reference/sliceResultCast.symbols

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ declare var x: [number, string] | [number, string, string];
33
>x : Symbol(x, Decl(sliceResultCast.ts, 0, 11))
44

55
x.slice(1) as readonly string[];
6-
>x.slice : Symbol(Array.slice, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
6+
>x.slice : Symbol(Array.slice, Decl(lib.es5.d.ts, --, --))
77
>x : Symbol(x, Decl(sliceResultCast.ts, 0, 11))
8-
>slice : Symbol(Array.slice, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
8+
>slice : Symbol(Array.slice, Decl(lib.es5.d.ts, --, --))
99

tests/baselines/reference/sliceResultCast.types

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ declare var x: [number, string] | [number, string, string];
55
x.slice(1) as readonly string[];
66
>x.slice(1) as readonly string[] : readonly string[]
77
>x.slice(1) : (string | number)[]
8-
>x.slice : ((start?: number, end?: number) => (string | number)[]) | ((start?: number, end?: number) => (string | number)[])
8+
>x.slice : (start?: number, end?: number) => (string | number)[]
99
>x : [number, string] | [number, string, string]
10-
>slice : ((start?: number, end?: number) => (string | number)[]) | ((start?: number, end?: number) => (string | number)[])
10+
>slice : (start?: number, end?: number) => (string | number)[]
1111
>1 : 1
1212

tests/baselines/reference/tsxUnionElementType3.errors.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ tests/cases/conformance/jsx/file.tsx(32,17): error TS2322: Type 'string' is not
3636
let a = <RCComp x="Hi" />;
3737
~
3838
!!! error TS2322: Type 'string' is not assignable to type 'never'.
39-
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:3:36: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC1 | RC2> & { x: number; } & { children?: ReactNode; } & { x: string; } & { children?: ReactNode; }'
39+
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:3:36: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC1 | RC2> & { x: number; } & { children?: ReactNode; } & { x: string; }'
4040
let a1 = <EmptyRCComp />;
4141
let a2 = <EmptyRCComp data-prop="hello" />;
4242
let b = <PartRCComp />

tests/baselines/reference/tsxUnionElementType4.errors.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; }
4040
let a = <RCComp x />;
4141
~
4242
!!! error TS2322: Type 'boolean' is not assignable to type 'never'.
43-
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:3:36: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC1 | RC2> & { x: number; } & { children?: ReactNode; } & { x: string; } & { children?: ReactNode; }'
43+
!!! related TS6500 tests/cases/conformance/jsx/file.tsx:3:36: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC1 | RC2> & { x: number; } & { children?: ReactNode; } & { x: string; }'
4444
let b = <PartRCComp x={10} />
4545
~
4646
!!! error TS2322: Type '{ x: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.

tests/baselines/reference/varianceMeasurement.errors.txt

+23-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
tests/cases/compiler/varianceMeasurement.ts(10,7): error TS2322: Type 'Foo1<string>' is not assignable to type 'Foo1<"a">'.
2-
Type 'string' is not assignable to type '"a"'.
2+
Types of property 'x' are incompatible.
3+
Type 'string' is not assignable to type '"a"'.
4+
tests/cases/compiler/varianceMeasurement.ts(11,7): error TS2322: Type 'Foo1<string>' is not assignable to type 'Foo1<unknown>'.
5+
The types of 'y.x' are incompatible between these types.
6+
Type '(arg: string) => void' is not assignable to type '(arg: unknown) => void'.
37
tests/cases/compiler/varianceMeasurement.ts(21,7): error TS2322: Type 'Foo2<string>' is not assignable to type 'Foo2<"a">'.
48
Types of property 'x' are incompatible.
59
Type 'string' is not assignable to type '"a"'.
@@ -9,7 +13,11 @@ tests/cases/compiler/varianceMeasurement.ts(22,7): error TS2322: Type 'Foo2<stri
913
Types of parameters 'arg' and 'arg' are incompatible.
1014
Type 'unknown' is not assignable to type 'string'.
1115
tests/cases/compiler/varianceMeasurement.ts(33,7): error TS2322: Type 'Foo3<string>' is not assignable to type 'Foo3<"a">'.
12-
Type 'string' is not assignable to type '"a"'.
16+
Types of property 'x' are incompatible.
17+
Type 'string' is not assignable to type '"a"'.
18+
tests/cases/compiler/varianceMeasurement.ts(34,7): error TS2322: Type 'Foo3<string>' is not assignable to type 'Foo3<unknown>'.
19+
The types of 'y.x' are incompatible between these types.
20+
Type '(arg: string) => void' is not assignable to type '(arg: unknown) => void'.
1321
tests/cases/compiler/varianceMeasurement.ts(44,7): error TS2322: Type 'Foo4<string>' is not assignable to type 'Foo4<"a">'.
1422
Types of property 'x' are incompatible.
1523
Type 'string' is not assignable to type '"a"'.
@@ -26,7 +34,7 @@ tests/cases/compiler/varianceMeasurement.ts(75,7): error TS2322: Type 'C<unknown
2634
Type 'number' is not assignable to type 'string'.
2735

2836

29-
==== tests/cases/compiler/varianceMeasurement.ts (9 errors) ====
37+
==== tests/cases/compiler/varianceMeasurement.ts (11 errors) ====
3038
// The type below should be invariant in T but is measured as covariant because
3139
// we don't analyze recursive references.
3240

@@ -39,8 +47,13 @@ tests/cases/compiler/varianceMeasurement.ts(75,7): error TS2322: Type 'C<unknown
3947
const f11: Foo1<'a'> = f10;
4048
~~~
4149
!!! error TS2322: Type 'Foo1<string>' is not assignable to type 'Foo1<"a">'.
42-
!!! error TS2322: Type 'string' is not assignable to type '"a"'.
50+
!!! error TS2322: Types of property 'x' are incompatible.
51+
!!! error TS2322: Type 'string' is not assignable to type '"a"'.
4352
const f12: Foo1<unknown> = f10;
53+
~~~
54+
!!! error TS2322: Type 'Foo1<string>' is not assignable to type 'Foo1<unknown>'.
55+
!!! error TS2322: The types of 'y.x' are incompatible between these types.
56+
!!! error TS2322: Type '(arg: string) => void' is not assignable to type '(arg: unknown) => void'.
4457

4558
// The type below is invariant in T and is measured as such.
4659

@@ -75,8 +88,13 @@ tests/cases/compiler/varianceMeasurement.ts(75,7): error TS2322: Type 'C<unknown
7588
const f31: Foo3<'a'> = f30;
7689
~~~
7790
!!! error TS2322: Type 'Foo3<string>' is not assignable to type 'Foo3<"a">'.
78-
!!! error TS2322: Type 'string' is not assignable to type '"a"'.
91+
!!! error TS2322: Types of property 'x' are incompatible.
92+
!!! error TS2322: Type 'string' is not assignable to type '"a"'.
7993
const f32: Foo3<unknown> = f30;
94+
~~~
95+
!!! error TS2322: Type 'Foo3<string>' is not assignable to type 'Foo3<unknown>'.
96+
!!! error TS2322: The types of 'y.x' are incompatible between these types.
97+
!!! error TS2322: Type '(arg: string) => void' is not assignable to type '(arg: unknown) => void'.
8098

8199
// The type below is invariant in T and is measured as such.
82100

0 commit comments

Comments
 (0)