29 lines
No EOL
2.3 KiB
Text
29 lines
No EOL
2.3 KiB
Text
tests/cases/compiler/identityForSignaturesWithTypeParametersAndAny.ts(5,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'g' must be of type '<T, U>(x: T, y: U) => T', but here has type '<T>(x: any, y: any) => any'.
|
|
tests/cases/compiler/identityForSignaturesWithTypeParametersAndAny.ts(8,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'h' must be of type '<T, U>(x: T, y: U) => T', but here has type '(x: any, y: any) => any'.
|
|
tests/cases/compiler/identityForSignaturesWithTypeParametersAndAny.ts(11,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type '<T, U>(x: T, y: U) => T', but here has type '<T, U>(x: any, y: string) => any'.
|
|
tests/cases/compiler/identityForSignaturesWithTypeParametersAndAny.ts(14,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'j' must be of type '<T, U>(x: T, y: U) => T', but here has type '<T, U>(x: any, y: any) => string'.
|
|
|
|
|
|
==== tests/cases/compiler/identityForSignaturesWithTypeParametersAndAny.ts (4 errors) ====
|
|
var f: <T, U>(x: T, y: U) => T;
|
|
var f: <T, U>(x: any, y: any) => any;
|
|
|
|
var g: <T, U>(x: T, y: U) => T;
|
|
var g: <T>(x: any, y: any) => any;
|
|
~
|
|
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'g' must be of type '<T, U>(x: T, y: U) => T', but here has type '<T>(x: any, y: any) => any'.
|
|
|
|
var h: <T, U>(x: T, y: U) => T;
|
|
var h: (x: any, y: any) => any;
|
|
~
|
|
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'h' must be of type '<T, U>(x: T, y: U) => T', but here has type '(x: any, y: any) => any'.
|
|
|
|
var i: <T, U>(x: T, y: U) => T;
|
|
var i: <T, U>(x: any, y: string) => any;
|
|
~
|
|
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type '<T, U>(x: T, y: U) => T', but here has type '<T, U>(x: any, y: string) => any'.
|
|
|
|
var j: <T, U>(x: T, y: U) => T;
|
|
var j: <T, U>(x: any, y: any) => string;
|
|
~
|
|
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'j' must be of type '<T, U>(x: T, y: U) => T', but here has type '<T, U>(x: any, y: any) => string'. |