mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Accept new baselines
This commit is contained in:
+6
-7
@@ -2654,14 +2654,13 @@ declare namespace ts {
|
||||
ObjectLiteralPatternWithComputedProperties = 512,
|
||||
ReverseMapped = 1024,
|
||||
JsxAttributes = 2048,
|
||||
MarkerType = 4096,
|
||||
JSLiteral = 8192,
|
||||
FreshLiteral = 16384,
|
||||
ArrayLiteral = 32768,
|
||||
JSLiteral = 4096,
|
||||
FreshLiteral = 8192,
|
||||
ArrayLiteral = 16384,
|
||||
ClassOrInterface = 3,
|
||||
ContainsSpread = 4194304,
|
||||
ObjectRestType = 8388608,
|
||||
InstantiationExpressionType = 16777216,
|
||||
ContainsSpread = 2097152,
|
||||
ObjectRestType = 4194304,
|
||||
InstantiationExpressionType = 8388608,
|
||||
}
|
||||
export interface ObjectType extends Type {
|
||||
objectFlags: ObjectFlags;
|
||||
|
||||
+6
-7
@@ -2654,14 +2654,13 @@ declare namespace ts {
|
||||
ObjectLiteralPatternWithComputedProperties = 512,
|
||||
ReverseMapped = 1024,
|
||||
JsxAttributes = 2048,
|
||||
MarkerType = 4096,
|
||||
JSLiteral = 8192,
|
||||
FreshLiteral = 16384,
|
||||
ArrayLiteral = 32768,
|
||||
JSLiteral = 4096,
|
||||
FreshLiteral = 8192,
|
||||
ArrayLiteral = 16384,
|
||||
ClassOrInterface = 3,
|
||||
ContainsSpread = 4194304,
|
||||
ObjectRestType = 8388608,
|
||||
InstantiationExpressionType = 16777216,
|
||||
ContainsSpread = 2097152,
|
||||
ObjectRestType = 4194304,
|
||||
InstantiationExpressionType = 8388608,
|
||||
}
|
||||
export interface ObjectType extends Type {
|
||||
objectFlags: ObjectFlags;
|
||||
|
||||
@@ -24,8 +24,8 @@ declare const b: (string | number)[] | null[] | undefined[] | {}[];
|
||||
|
||||
let x = a.equalsShallow(b);
|
||||
>x : Symbol(x, Decl(bivariantInferences.ts, 9, 3))
|
||||
>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))
|
||||
>a.equalsShallow : Symbol(Array.equalsShallow, Decl(bivariantInferences.ts, 2, 20))
|
||||
>a : Symbol(a, Decl(bivariantInferences.ts, 6, 13))
|
||||
>equalsShallow : Symbol(Array.equalsShallow, Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20))
|
||||
>equalsShallow : Symbol(Array.equalsShallow, Decl(bivariantInferences.ts, 2, 20))
|
||||
>b : Symbol(b, Decl(bivariantInferences.ts, 7, 13))
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ declare const b: (string | number)[] | null[] | undefined[] | {}[];
|
||||
let x = a.equalsShallow(b);
|
||||
>x : boolean
|
||||
>a.equalsShallow(b) : boolean
|
||||
>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)
|
||||
>a.equalsShallow : <T>(this: readonly T[], other: readonly T[]) => boolean
|
||||
>a : (string | number)[] | null[] | undefined[] | {}[]
|
||||
>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)
|
||||
>equalsShallow : <T>(this: readonly T[], other: readonly T[]) => boolean
|
||||
>b : (string | number)[] | null[] | undefined[] | {}[]
|
||||
|
||||
|
||||
@@ -2244,7 +2244,7 @@
|
||||
},
|
||||
{
|
||||
"text": "join",
|
||||
"kind": "propertyName"
|
||||
"kind": "methodName"
|
||||
},
|
||||
{
|
||||
"text": "(",
|
||||
@@ -5906,7 +5906,7 @@
|
||||
},
|
||||
{
|
||||
"text": "toLocaleString",
|
||||
"kind": "propertyName"
|
||||
"kind": "methodName"
|
||||
},
|
||||
{
|
||||
"text": "(",
|
||||
@@ -5980,7 +5980,7 @@
|
||||
},
|
||||
{
|
||||
"text": "toString",
|
||||
"kind": "propertyName"
|
||||
"kind": "methodName"
|
||||
},
|
||||
{
|
||||
"text": "(",
|
||||
|
||||
@@ -3,7 +3,7 @@ declare var x: [number, string] | [number, string, string];
|
||||
>x : Symbol(x, Decl(sliceResultCast.ts, 0, 11))
|
||||
|
||||
x.slice(1) as readonly string[];
|
||||
>x.slice : Symbol(Array.slice, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>x.slice : Symbol(Array.slice, Decl(lib.es5.d.ts, --, --))
|
||||
>x : Symbol(x, Decl(sliceResultCast.ts, 0, 11))
|
||||
>slice : Symbol(Array.slice, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>slice : Symbol(Array.slice, Decl(lib.es5.d.ts, --, --))
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ declare var x: [number, string] | [number, string, string];
|
||||
x.slice(1) as readonly string[];
|
||||
>x.slice(1) as readonly string[] : readonly string[]
|
||||
>x.slice(1) : (string | number)[]
|
||||
>x.slice : ((start?: number, end?: number) => (string | number)[]) | ((start?: number, end?: number) => (string | number)[])
|
||||
>x.slice : (start?: number, end?: number) => (string | number)[]
|
||||
>x : [number, string] | [number, string, string]
|
||||
>slice : ((start?: number, end?: number) => (string | number)[]) | ((start?: number, end?: number) => (string | number)[])
|
||||
>slice : (start?: number, end?: number) => (string | number)[]
|
||||
>1 : 1
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ tests/cases/conformance/jsx/file.tsx(32,17): error TS2322: Type 'string' is not
|
||||
let a = <RCComp x="Hi" />;
|
||||
~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'never'.
|
||||
!!! 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; }'
|
||||
!!! 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; }'
|
||||
let a1 = <EmptyRCComp />;
|
||||
let a2 = <EmptyRCComp data-prop="hello" />;
|
||||
let b = <PartRCComp />
|
||||
|
||||
@@ -40,7 +40,7 @@ tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; }
|
||||
let a = <RCComp x />;
|
||||
~
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'never'.
|
||||
!!! 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; }'
|
||||
!!! 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; }'
|
||||
let b = <PartRCComp x={10} />
|
||||
~
|
||||
!!! error TS2322: Type '{ x: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
tests/cases/compiler/varianceMeasurement.ts(10,7): error TS2322: Type 'Foo1<string>' is not assignable to type 'Foo1<"a">'.
|
||||
Type 'string' is not assignable to type '"a"'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type '"a"'.
|
||||
tests/cases/compiler/varianceMeasurement.ts(11,7): error TS2322: Type 'Foo1<string>' is not assignable to type 'Foo1<unknown>'.
|
||||
The types of 'y.x' are incompatible between these types.
|
||||
Type '(arg: string) => void' is not assignable to type '(arg: unknown) => void'.
|
||||
tests/cases/compiler/varianceMeasurement.ts(21,7): error TS2322: Type 'Foo2<string>' is not assignable to type 'Foo2<"a">'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type '"a"'.
|
||||
@@ -9,7 +13,11 @@ tests/cases/compiler/varianceMeasurement.ts(22,7): error TS2322: Type 'Foo2<stri
|
||||
Types of parameters 'arg' and 'arg' are incompatible.
|
||||
Type 'unknown' is not assignable to type 'string'.
|
||||
tests/cases/compiler/varianceMeasurement.ts(33,7): error TS2322: Type 'Foo3<string>' is not assignable to type 'Foo3<"a">'.
|
||||
Type 'string' is not assignable to type '"a"'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type '"a"'.
|
||||
tests/cases/compiler/varianceMeasurement.ts(34,7): error TS2322: Type 'Foo3<string>' is not assignable to type 'Foo3<unknown>'.
|
||||
The types of 'y.x' are incompatible between these types.
|
||||
Type '(arg: string) => void' is not assignable to type '(arg: unknown) => void'.
|
||||
tests/cases/compiler/varianceMeasurement.ts(44,7): error TS2322: Type 'Foo4<string>' is not assignable to type 'Foo4<"a">'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type '"a"'.
|
||||
@@ -26,7 +34,7 @@ tests/cases/compiler/varianceMeasurement.ts(75,7): error TS2322: Type 'C<unknown
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/varianceMeasurement.ts (9 errors) ====
|
||||
==== tests/cases/compiler/varianceMeasurement.ts (11 errors) ====
|
||||
// The type below should be invariant in T but is measured as covariant because
|
||||
// we don't analyze recursive references.
|
||||
|
||||
@@ -39,8 +47,13 @@ tests/cases/compiler/varianceMeasurement.ts(75,7): error TS2322: Type 'C<unknown
|
||||
const f11: Foo1<'a'> = f10;
|
||||
~~~
|
||||
!!! error TS2322: Type 'Foo1<string>' is not assignable to type 'Foo1<"a">'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type '"a"'.
|
||||
!!! error TS2322: Types of property 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type '"a"'.
|
||||
const f12: Foo1<unknown> = f10;
|
||||
~~~
|
||||
!!! error TS2322: Type 'Foo1<string>' is not assignable to type 'Foo1<unknown>'.
|
||||
!!! error TS2322: The types of 'y.x' are incompatible between these types.
|
||||
!!! error TS2322: Type '(arg: string) => void' is not assignable to type '(arg: unknown) => void'.
|
||||
|
||||
// The type below is invariant in T and is measured as such.
|
||||
|
||||
@@ -75,8 +88,13 @@ tests/cases/compiler/varianceMeasurement.ts(75,7): error TS2322: Type 'C<unknown
|
||||
const f31: Foo3<'a'> = f30;
|
||||
~~~
|
||||
!!! error TS2322: Type 'Foo3<string>' is not assignable to type 'Foo3<"a">'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type '"a"'.
|
||||
!!! error TS2322: Types of property 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type '"a"'.
|
||||
const f32: Foo3<unknown> = f30;
|
||||
~~~
|
||||
!!! error TS2322: Type 'Foo3<string>' is not assignable to type 'Foo3<unknown>'.
|
||||
!!! error TS2322: The types of 'y.x' are incompatible between these types.
|
||||
!!! error TS2322: Type '(arg: string) => void' is not assignable to type '(arg: unknown) => void'.
|
||||
|
||||
// The type below is invariant in T and is measured as such.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user