mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 20:14:01 -06:00
Accepted baselines.
This commit is contained in:
parent
06fe1ed537
commit
94e1a59fa0
@ -3,19 +3,19 @@ tests/cases/conformance/jsx/file.tsx(17,11): error TS2710: 'children' are specif
|
||||
tests/cases/conformance/jsx/file.tsx(31,6): error TS2322: Type '{ children: (Element | ((name: string) => Element))[]; a: number; b: string; }' is not assignable to type 'Prop'.
|
||||
Types of property 'children' are incompatible.
|
||||
Type '(Element | ((name: string) => Element))[]' is not assignable to type 'string | Element'.
|
||||
Type '(Element | ((name: string) => Element))[]' is missing the following properties from type 'Element': type, props
|
||||
Type '(Element | ((name: string) => Element))[]' is not assignable to type 'string'.
|
||||
tests/cases/conformance/jsx/file.tsx(37,6): error TS2322: Type '{ children: (number | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
|
||||
Types of property 'children' are incompatible.
|
||||
Type '(number | Element)[]' is not assignable to type 'string | Element'.
|
||||
Type '(number | Element)[]' is missing the following properties from type 'Element': type, props
|
||||
Type '(number | Element)[]' is not assignable to type 'string'.
|
||||
tests/cases/conformance/jsx/file.tsx(43,6): error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
|
||||
Types of property 'children' are incompatible.
|
||||
Type '(string | Element)[]' is not assignable to type 'string | Element'.
|
||||
Type '(string | Element)[]' is missing the following properties from type 'Element': type, props
|
||||
Type '(string | Element)[]' is not assignable to type 'string'.
|
||||
tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Element[]; a: number; b: string; }' is not assignable to type 'Prop'.
|
||||
Types of property 'children' are incompatible.
|
||||
Type 'Element[]' is not assignable to type 'string | Element'.
|
||||
Type 'Element[]' is missing the following properties from type 'Element': type, props
|
||||
Type 'Element[]' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (6 errors) ====
|
||||
@ -59,7 +59,7 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Elem
|
||||
!!! error TS2322: Type '{ children: (Element | ((name: string) => Element))[]; a: number; b: string; }' is not assignable to type 'Prop'.
|
||||
!!! error TS2322: Types of property 'children' are incompatible.
|
||||
!!! error TS2322: Type '(Element | ((name: string) => Element))[]' is not assignable to type 'string | Element'.
|
||||
!!! error TS2322: Type '(Element | ((name: string) => Element))[]' is missing the following properties from type 'Element': type, props
|
||||
!!! error TS2322: Type '(Element | ((name: string) => Element))[]' is not assignable to type 'string'.
|
||||
<div> My Div </div>
|
||||
{(name: string) => <div> My name {name} </div>}
|
||||
</Comp>;
|
||||
@ -70,7 +70,7 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Elem
|
||||
!!! error TS2322: Type '{ children: (number | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
|
||||
!!! error TS2322: Types of property 'children' are incompatible.
|
||||
!!! error TS2322: Type '(number | Element)[]' is not assignable to type 'string | Element'.
|
||||
!!! error TS2322: Type '(number | Element)[]' is missing the following properties from type 'Element': type, props
|
||||
!!! error TS2322: Type '(number | Element)[]' is not assignable to type 'string'.
|
||||
<div> My Div </div>
|
||||
{1000000}
|
||||
</Comp>;
|
||||
@ -81,7 +81,7 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Elem
|
||||
!!! error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
|
||||
!!! error TS2322: Types of property 'children' are incompatible.
|
||||
!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'string | Element'.
|
||||
!!! error TS2322: Type '(string | Element)[]' is missing the following properties from type 'Element': type, props
|
||||
!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'string'.
|
||||
<div> My Div </div>
|
||||
hi hi hi!
|
||||
</Comp>;
|
||||
@ -92,7 +92,7 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Elem
|
||||
!!! error TS2322: Type '{ children: Element[]; a: number; b: string; }' is not assignable to type 'Prop'.
|
||||
!!! error TS2322: Types of property 'children' are incompatible.
|
||||
!!! error TS2322: Type 'Element[]' is not assignable to type 'string | Element'.
|
||||
!!! error TS2322: Type 'Element[]' is missing the following properties from type 'Element': type, props
|
||||
!!! error TS2322: Type 'Element[]' is not assignable to type 'string'.
|
||||
<div> My Div </div>
|
||||
<div> My Div </div>
|
||||
</Comp>;
|
||||
@ -18,7 +18,7 @@ tests/cases/conformance/types/conditional/inferTypes1.ts(75,43): error TS4081: E
|
||||
tests/cases/conformance/types/conditional/inferTypes1.ts(82,44): error TS2344: Type 'U' does not satisfy the constraint 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/conditional/inferTypes1.ts(144,40): error TS2322: Type 'T' is not assignable to type 'string | number | symbol'.
|
||||
Type 'T' is not assignable to type 'symbol'.
|
||||
Type 'T' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/conditional/inferTypes1.ts (16 errors) ====
|
||||
@ -202,7 +202,7 @@ tests/cases/conformance/types/conditional/inferTypes1.ts(144,40): error TS2322:
|
||||
type B<T> = string extends T ? { [P in T]: void; } : T; // Error
|
||||
~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'string | number | symbol'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'symbol'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'string'.
|
||||
|
||||
// Repro from #22302
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(7,9): error TS2322: Type 'T & U' is not assignable to type 'string | number'.
|
||||
Type 'string | undefined' is not assignable to type 'string | number'.
|
||||
Type 'undefined' is not assignable to type 'string | number'.
|
||||
Type 'T & U' is not assignable to type 'number'.
|
||||
Type 'T & U' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(8,9): error TS2322: Type 'T & U' is not assignable to type 'string | null'.
|
||||
Type 'string | undefined' is not assignable to type 'string | null'.
|
||||
Type 'undefined' is not assignable to type 'string | null'.
|
||||
@ -32,7 +32,7 @@ tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(12
|
||||
!!! error TS2322: Type 'T & U' is not assignable to type 'string | number'.
|
||||
!!! error TS2322: Type 'string | undefined' is not assignable to type 'string | number'.
|
||||
!!! error TS2322: Type 'undefined' is not assignable to type 'string | number'.
|
||||
!!! error TS2322: Type 'T & U' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'T & U' is not assignable to type 'string'.
|
||||
let y2: string | null = x; // Error
|
||||
~~
|
||||
!!! error TS2322: Type 'T & U' is not assignable to type 'string | null'.
|
||||
|
||||
@ -58,7 +58,7 @@ type K00 = keyof any; // string
|
||||
>K00 : string | number | symbol
|
||||
|
||||
type K01 = keyof string; // "toString" | "charAt" | ...
|
||||
>K01 : number | "length" | "toString" | "concat" | "slice" | "indexOf" | "lastIndexOf" | "charAt" | "charCodeAt" | "localeCompare" | "match" | "replace" | "search" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr" | "valueOf"
|
||||
>K01 : number | "length" | "toString" | "concat" | "slice" | "indexOf" | "lastIndexOf" | "valueOf" | "charAt" | "charCodeAt" | "localeCompare" | "match" | "replace" | "search" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr"
|
||||
|
||||
type K02 = keyof number; // "toString" | "toFixed" | "toExponential" | ...
|
||||
>K02 : "toString" | "toLocaleString" | "valueOf" | "toFixed" | "toExponential" | "toPrecision"
|
||||
|
||||
@ -23,7 +23,7 @@ type T00 = keyof K0; // Error
|
||||
>T00 : string | number | symbol
|
||||
|
||||
type T01 = keyof Object;
|
||||
>T01 : "toString" | "constructor" | "toLocaleString" | "valueOf" | "hasOwnProperty" | "isPrototypeOf" | "propertyIsEnumerable"
|
||||
>T01 : "toString" | "valueOf" | "toLocaleString" | "constructor" | "hasOwnProperty" | "isPrototypeOf" | "propertyIsEnumerable"
|
||||
|
||||
type T02 = keyof keyof Object;
|
||||
>T02 : number | "length" | "toString" | "valueOf" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr"
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(19,20): error TS2313: Type parameter 'P' has a circular constraint.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(21,20): error TS2322: Type 'Date' is not assignable to type 'string | number | symbol'.
|
||||
Type 'Date' is not assignable to type 'symbol'.
|
||||
Type 'Date' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(22,19): error TS2344: Type 'Date' does not satisfy the constraint 'string | number | symbol'.
|
||||
Type 'Date' is not assignable to type 'symbol'.
|
||||
Type 'Date' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(25,24): error TS2344: Type '"foo"' does not satisfy the constraint '"name" | "width" | "height" | "visible"'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(26,24): error TS2344: Type '"name" | "foo"' does not satisfy the constraint '"name" | "width" | "height" | "visible"'.
|
||||
Type '"foo"' is not assignable to type '"name" | "width" | "height" | "visible"'.
|
||||
@ -37,7 +37,7 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(128,16): error TS2322:
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(129,25): error TS2322: Type 'string' is not assignable to type 'number | undefined'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(130,39): error TS2322: Type 'string' is not assignable to type 'number | undefined'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(136,16): error TS2322: Type 'T' is not assignable to type 'string | number | symbol'.
|
||||
Type 'T' is not assignable to type 'symbol'.
|
||||
Type 'T' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(136,21): error TS2536: Type 'P' cannot be used to index type 'T'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(148,17): error TS2339: Property 'foo' does not exist on type 'Pick<T, K>'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339: Property 'foo' does not exist on type 'Record<K, number>'.
|
||||
@ -69,11 +69,11 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339:
|
||||
type T02 = { [P in Date]: number }; // Error
|
||||
~~~~
|
||||
!!! error TS2322: Type 'Date' is not assignable to type 'string | number | symbol'.
|
||||
!!! error TS2322: Type 'Date' is not assignable to type 'symbol'.
|
||||
!!! error TS2322: Type 'Date' is not assignable to type 'number'.
|
||||
type T03 = Record<Date, number>; // Error
|
||||
~~~~
|
||||
!!! error TS2344: Type 'Date' does not satisfy the constraint 'string | number | symbol'.
|
||||
!!! error TS2344: Type 'Date' is not assignable to type 'symbol'.
|
||||
!!! error TS2344: Type 'Date' is not assignable to type 'number'.
|
||||
|
||||
type T10 = Pick<Shape, "name">;
|
||||
type T11 = Pick<Shape, "foo">; // Error
|
||||
@ -249,7 +249,7 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339:
|
||||
pt: {[P in T]?: T[P]}, // note: should be in keyof T
|
||||
~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'string | number | symbol'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'symbol'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'string'.
|
||||
~~~~
|
||||
!!! error TS2536: Type 'P' cannot be used to index type 'T'.
|
||||
};
|
||||
|
||||
@ -2,7 +2,7 @@ tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(9,30): error TS2536: T
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(13,30): error TS2536: Type 'K' cannot be used to index type 'T3'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(15,38): error TS2536: Type 'S' cannot be used to index type '{ [key in AB[S]]: true; }'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(15,47): error TS2322: Type 'AB[S]' is not assignable to type 'string | number | symbol'.
|
||||
Type 'AB[S]' is not assignable to type 'symbol'.
|
||||
Type 'AB[S]' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(15,47): error TS2536: Type 'S' cannot be used to index type 'AB'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(17,49): error TS2536: Type 'L' cannot be used to index type '{ [key in AB[S]]: true; }'.
|
||||
|
||||
@ -31,7 +31,7 @@ tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(17,49): error TS2536:
|
||||
!!! error TS2536: Type 'S' cannot be used to index type '{ [key in AB[S]]: true; }'.
|
||||
~~~~~
|
||||
!!! error TS2322: Type 'AB[S]' is not assignable to type 'string | number | symbol'.
|
||||
!!! error TS2322: Type 'AB[S]' is not assignable to type 'symbol'.
|
||||
!!! error TS2322: Type 'AB[S]' is not assignable to type 'string'.
|
||||
~~~~~
|
||||
!!! error TS2536: Type 'S' cannot be used to index type 'AB'.
|
||||
|
||||
|
||||
@ -5,11 +5,7 @@ tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts(19,1): error TS2
|
||||
tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts(20,1): error TS2322: Type 'Class' is not assignable to type 'Property'.
|
||||
Types of property 'parent' are incompatible.
|
||||
Type 'Namespace' is not assignable to type 'Module | Class'.
|
||||
Type 'Namespace' is not assignable to type 'Module'.
|
||||
Types of property 'members' are incompatible.
|
||||
Type '(Class | Property)[]' is not assignable to type 'Class[]'.
|
||||
Type 'Class | Property' is not assignable to type 'Class'.
|
||||
Type 'Property' is not assignable to type 'Class'.
|
||||
Property 'parent' is missing in type 'Namespace' but required in type 'Class'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts (2 errors) ====
|
||||
@ -43,9 +39,6 @@ tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts(20,1): error TS2
|
||||
!!! error TS2322: Type 'Class' is not assignable to type 'Property'.
|
||||
!!! error TS2322: Types of property 'parent' are incompatible.
|
||||
!!! error TS2322: Type 'Namespace' is not assignable to type 'Module | Class'.
|
||||
!!! error TS2322: Type 'Namespace' is not assignable to type 'Module'.
|
||||
!!! error TS2322: Types of property 'members' are incompatible.
|
||||
!!! error TS2322: Type '(Class | Property)[]' is not assignable to type 'Class[]'.
|
||||
!!! error TS2322: Type 'Class | Property' is not assignable to type 'Class'.
|
||||
!!! error TS2322: Type 'Property' is not assignable to type 'Class'.
|
||||
!!! error TS2322: Property 'parent' is missing in type 'Namespace' but required in type 'Class'.
|
||||
!!! related TS2728 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:10:12: 'parent' is declared here.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user