Accept new baselines
This commit is contained in:
parent
e416c7046e
commit
2632ac280c
9 changed files with 52 additions and 108 deletions
|
@ -8,7 +8,6 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error T
|
|||
Types of property 'concat' are incompatible.
|
||||
Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ <U extends ReadonlyArray<B>>(...items: U[]): B[]; (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'.
|
||||
Type 'A[]' is not assignable to type 'B[]'.
|
||||
Type 'A' is not assignable to type 'B'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts (2 errors) ====
|
||||
|
@ -42,5 +41,4 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error T
|
|||
!!! error TS2322: Types of property 'concat' are incompatible.
|
||||
!!! error TS2322: Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ <U extends ReadonlyArray<B>>(...items: U[]): B[]; (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'.
|
||||
!!! error TS2322: Type 'A[]' is not assignable to type 'B[]'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'B'.
|
||||
|
|
@ -1,34 +1,30 @@
|
|||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(12,5): error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
|
||||
Type 'T[string]' is not assignable to type 'U[keyof T]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[keyof T]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[keyof T]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(17,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
|
||||
Type 'T[string]' is not assignable to type 'U[K]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[K]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[K]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(21,5): error TS2536: Type 'keyof U' cannot be used to index type 'T'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(22,5): error TS2322: Type 'T[keyof U]' is not assignable to type 'U[keyof U]'.
|
||||
Type 'T[string]' is not assignable to type 'U[keyof U]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[keyof U]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[keyof U]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(22,12): error TS2536: Type 'keyof U' cannot be used to index type 'T'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(26,5): error TS2536: Type 'K' cannot be used to index type 'T'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(27,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
|
||||
Type 'T[string]' is not assignable to type 'U[K]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[K]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[K]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(27,12): error TS2536: Type 'K' cannot be used to index type 'T'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(31,5): error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'T[keyof T]'.
|
||||
Type 'undefined' is not assignable to type 'T[keyof T]'.
|
||||
|
@ -42,30 +38,24 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(41,5): error TS2
|
|||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(42,5): error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'.
|
||||
Type 'T[string]' is not assignable to type 'U[keyof T] | undefined'.
|
||||
Type 'T[string]' is not assignable to type 'U[keyof T]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
|
||||
Type 'T[string]' is not assignable to type 'U[keyof T]'.
|
||||
Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
|
||||
Type 'T[string]' is not assignable to type 'U[keyof T]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T[keyof T]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[keyof T]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(46,5): error TS2322: Type 'U[K] | undefined' is not assignable to type 'T[K]'.
|
||||
Type 'undefined' is not assignable to type 'T[K]'.
|
||||
Type 'undefined' is not assignable to type 'T[string]'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(47,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'.
|
||||
Type 'T[string]' is not assignable to type 'U[K] | undefined'.
|
||||
Type 'T[string]' is not assignable to type 'U[K]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[K]' is not assignable to type 'U[K]'.
|
||||
Type 'T[string]' is not assignable to type 'U[K]'.
|
||||
Type 'T[K]' is not assignable to type 'U[K]'.
|
||||
Type 'T[string]' is not assignable to type 'U[K]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T[K]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[K]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(52,5): error TS2542: Index signature in type 'Readonly<T>' only permits reading.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(57,5): error TS2542: Index signature in type 'Readonly<T>' only permits reading.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(62,5): error TS2542: Index signature in type 'Readonly<U>' only permits reading.
|
||||
|
@ -77,10 +67,9 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(142,5): error TS
|
|||
Type 'T[P]' is not assignable to type 'U[P]'.
|
||||
Type 'T[string]' is not assignable to type 'U[P]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[P]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[P]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(147,5): error TS2322: Type '{ [P in keyof T]: T[P]; }' is not assignable to type '{ [P in keyof U]: U[P]; }'.
|
||||
Type 'keyof U' is not assignable to type 'keyof T'.
|
||||
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(152,5): error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof T]: T[P]; }'.
|
||||
|
@ -93,10 +82,9 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
|
|||
Type 'T[P]' is not assignable to type 'U[P]'.
|
||||
Type 'T[string]' is not assignable to type 'U[P]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[P]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
Type 'T[P]' is not assignable to type 'U[string]'.
|
||||
Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
Type 'T' is not assignable to type 'U'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/mapped/mappedTypeRelationships.ts (27 errors) ====
|
||||
|
@ -116,10 +104,9 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
|
|||
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
}
|
||||
|
||||
function f4<T, U extends T, K extends keyof T>(x: T, y: U, k: K) {
|
||||
|
@ -129,10 +116,9 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
|
|||
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
}
|
||||
|
||||
function f5<T, U extends T>(x: T, y: U, k: keyof U) {
|
||||
|
@ -144,10 +130,9 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
|
|||
!!! error TS2322: Type 'T[keyof U]' is not assignable to type 'U[keyof U]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof U]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[keyof U]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[keyof U]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
~~~~
|
||||
!!! error TS2536: Type 'keyof U' cannot be used to index type 'T'.
|
||||
}
|
||||
|
@ -161,10 +146,9 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
|
|||
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
~~~~
|
||||
!!! error TS2536: Type 'K' cannot be used to index type 'T'.
|
||||
}
|
||||
|
@ -198,15 +182,12 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
|
|||
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T] | undefined'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T]'.
|
||||
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
}
|
||||
|
||||
function f13<T, U extends T, K extends keyof T>(x: T, y: Partial<U>, k: K) {
|
||||
|
@ -220,15 +201,12 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
|
|||
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K] | undefined'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'.
|
||||
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
}
|
||||
|
||||
function f20<T>(x: T, y: Readonly<T>, k: keyof T) {
|
||||
|
@ -343,10 +321,9 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
|
|||
!!! error TS2322: Type 'T[P]' is not assignable to type 'U[P]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[P]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[P]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[P]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
}
|
||||
|
||||
function f72<T, U extends T>(x: { [P in keyof T]: T[P] }, y: { [P in keyof U]: U[P] }) {
|
||||
|
@ -389,9 +366,8 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS
|
|||
!!! error TS2322: Type 'T[P]' is not assignable to type 'U[P]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[P]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[P]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
!!! error TS2322: Type 'T[P]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T[string]' is not assignable to type 'U[string]'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'U'.
|
||||
}
|
||||
|
|
@ -44,10 +44,8 @@ tests/cases/compiler/promisePermutations.ts(133,19): error TS2345: Argument of t
|
|||
tests/cases/compiler/promisePermutations.ts(134,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
tests/cases/compiler/promisePermutations.ts(137,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/promisePermutations.ts(144,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/promisePermutations.ts(152,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'Promise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Types of property 'then' are incompatible.
|
||||
|
@ -61,7 +59,6 @@ tests/cases/compiler/promisePermutations.ts(156,21): error TS2345: Argument of t
|
|||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations.ts(158,21): error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations.ts(159,21): error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
@ -286,7 +283,6 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
|
|||
~~~~~~~
|
||||
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! error TS2453: Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
!!! error TS2453: Type 'string' is not assignable to type 'number'.
|
||||
var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
|
||||
var r10 = testFunction10(x => x);
|
||||
|
@ -297,7 +293,6 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
|
|||
~~~~~~~~
|
||||
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! error TS2453: Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
!!! error TS2453: Type 'string' is not assignable to type 'number'.
|
||||
var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var s10 = testFunction10P(x => x);
|
||||
var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok
|
||||
|
@ -328,7 +323,6 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
|
|||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
|
||||
|
|
|
@ -44,10 +44,8 @@ tests/cases/compiler/promisePermutations2.ts(132,19): error TS2345: Argument of
|
|||
tests/cases/compiler/promisePermutations2.ts(133,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
tests/cases/compiler/promisePermutations2.ts(136,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/promisePermutations2.ts(143,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/promisePermutations2.ts(151,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'Promise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Types of property 'then' are incompatible.
|
||||
|
@ -61,7 +59,6 @@ tests/cases/compiler/promisePermutations2.ts(155,21): error TS2345: Argument of
|
|||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations2.ts(157,21): error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations2.ts(158,21): error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
@ -285,7 +282,6 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
|
|||
~~~~~~~
|
||||
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! error TS2453: Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
!!! error TS2453: Type 'string' is not assignable to type 'number'.
|
||||
var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
|
||||
var r10 = testFunction10(x => x);
|
||||
|
@ -296,7 +292,6 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
|
|||
~~~~~~~~
|
||||
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! error TS2453: Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
!!! error TS2453: Type 'string' is not assignable to type 'number'.
|
||||
var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var s10 = testFunction10P(x => x);
|
||||
var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok
|
||||
|
@ -327,7 +322,6 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
|
|||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // ok
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
|
||||
|
|
|
@ -47,10 +47,8 @@ tests/cases/compiler/promisePermutations3.ts(132,19): error TS2345: Argument of
|
|||
tests/cases/compiler/promisePermutations3.ts(133,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
tests/cases/compiler/promisePermutations3.ts(136,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/promisePermutations3.ts(143,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/promisePermutations3.ts(151,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'Promise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Types of property 'then' are incompatible.
|
||||
|
@ -64,7 +62,6 @@ tests/cases/compiler/promisePermutations3.ts(155,21): error TS2345: Argument of
|
|||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations3.ts(157,21): error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations3.ts(158,21): error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
@ -297,7 +294,6 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
|||
~~~~~~~
|
||||
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! error TS2453: Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
!!! error TS2453: Type 'string' is not assignable to type 'number'.
|
||||
var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
|
||||
var r10 = testFunction10(x => x);
|
||||
|
@ -308,7 +304,6 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
|||
~~~~~~~~
|
||||
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! error TS2453: Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
!!! error TS2453: Type 'string' is not assignable to type 'number'.
|
||||
var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var s10 = testFunction10P(x => x);
|
||||
var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok
|
||||
|
@ -339,7 +334,6 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
|||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
|
||||
|
|
|
@ -2,8 +2,6 @@ tests/cases/compiler/trailingCommaInHeterogenousArrayLiteral1.ts(5,19): error TS
|
|||
Type 'string | number' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/trailingCommaInHeterogenousArrayLiteral1.ts(6,19): error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'number[]'.
|
||||
Type 'string | number' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/trailingCommaInHeterogenousArrayLiteral1.ts (2 errors) ====
|
||||
|
@ -19,8 +17,6 @@ tests/cases/compiler/trailingCommaInHeterogenousArrayLiteral1.ts(6,19): error TS
|
|||
this.test([1, 2, "hi", 5]);
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'number[]'.
|
||||
!!! error TS2345: Type 'string | number' is not assignable to type 'number'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'number'.
|
||||
}
|
||||
}
|
||||
|
|
@ -12,7 +12,6 @@ tests/cases/compiler/typeMatch2.ts(18,5): error TS2322: Type 'Animal[]' is not a
|
|||
tests/cases/compiler/typeMatch2.ts(22,5): error TS2322: Type '{ f1: number; f2: Animal[]; }' is not assignable to type '{ f1: number; f2: Giraffe[]; }'.
|
||||
Types of property 'f2' are incompatible.
|
||||
Type 'Animal[]' is not assignable to type 'Giraffe[]'.
|
||||
Type 'Animal' is not assignable to type 'Giraffe'.
|
||||
tests/cases/compiler/typeMatch2.ts(34,26): error TS2322: Type '{ x: number; y: any; z: number; }' is not assignable to type '{ x: number; y: number; }'.
|
||||
Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'.
|
||||
tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'.
|
||||
|
@ -62,7 +61,6 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is
|
|||
!!! error TS2322: Type '{ f1: number; f2: Animal[]; }' is not assignable to type '{ f1: number; f2: Giraffe[]; }'.
|
||||
!!! error TS2322: Types of property 'f2' are incompatible.
|
||||
!!! error TS2322: Type 'Animal[]' is not assignable to type 'Giraffe[]'.
|
||||
!!! error TS2322: Type 'Animal' is not assignable to type 'Giraffe'.
|
||||
}
|
||||
|
||||
function f4() {
|
||||
|
|
|
@ -8,7 +8,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara
|
|||
Type 'V' is not assignable to type 'T'.
|
||||
Type 'Date' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(26,5): error TS2322: Type 'V' is not assignable to type 'T'.
|
||||
Type 'Date' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(27,5): error TS2322: Type 'Date' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(30,5): error TS2322: Type 'V' is not assignable to type 'U'.
|
||||
Type 'Date' is not assignable to type 'U'.
|
||||
|
@ -18,7 +17,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara
|
|||
Type 'V' is not assignable to type 'T'.
|
||||
Type 'Date' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(46,5): error TS2322: Type 'V' is not assignable to type 'T'.
|
||||
Type 'Date' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(47,5): error TS2322: Type 'Date' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(50,5): error TS2322: Type 'V' is not assignable to type 'U'.
|
||||
Type 'Date' is not assignable to type 'U'.
|
||||
|
@ -76,7 +74,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara
|
|||
t = v; // error
|
||||
~
|
||||
!!! error TS2322: Type 'V' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type 'Date' is not assignable to type 'T'.
|
||||
t = new Date(); // error
|
||||
~
|
||||
!!! error TS2322: Type 'Date' is not assignable to type 'T'.
|
||||
|
@ -112,7 +109,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara
|
|||
t = v; // error
|
||||
~
|
||||
!!! error TS2322: Type 'V' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type 'Date' is not assignable to type 'T'.
|
||||
t = new Date(); // error
|
||||
~
|
||||
!!! error TS2322: Type 'Date' is not assignable to type 'T'.
|
||||
|
|
|
@ -7,7 +7,6 @@ tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(
|
|||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(13,7): error TS2322: Type '() => AsyncIterableIterator<"a">' is not assignable to type '() => AsyncIterableIterator<number>'.
|
||||
Type 'AsyncIterableIterator<"a">' is not assignable to type 'AsyncIterableIterator<number>'.
|
||||
Type '"a"' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(16,7): error TS2322: Type '() => AsyncIterableIterator<"a">' is not assignable to type '() => AsyncIterable<number>'.
|
||||
Type 'AsyncIterableIterator<"a">' is not assignable to type 'AsyncIterable<number>'.
|
||||
Types of property '[Symbol.asyncIterator]' are incompatible.
|
||||
|
@ -84,7 +83,6 @@ tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.esnext.2.ts(
|
|||
~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '() => AsyncIterableIterator<"a">' is not assignable to type '() => AsyncIterableIterator<number>'.
|
||||
!!! error TS2322: Type 'AsyncIterableIterator<"a">' is not assignable to type 'AsyncIterableIterator<number>'.
|
||||
!!! error TS2322: Type '"a"' is not assignable to type 'number'.
|
||||
yield* (async function * () { yield "a"; })();
|
||||
};
|
||||
const assignability4: () => AsyncIterable<number> = async function * () {
|
||||
|
|
Loading…
Reference in a new issue