59 lines
2.8 KiB
Plaintext
59 lines
2.8 KiB
Plaintext
tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(2,5): error TS7005: Variable 'arg0' implicitly has an 'any' type.
|
|
tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(3,5): error TS7005: Variable 'anyArray' implicitly has an 'any[]' type.
|
|
tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(4,13): error TS7008: Member 'v' implicitly has an 'any' type.
|
|
tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(4,16): error TS7008: Member 'w' implicitly has an 'any' type.
|
|
tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(5,13): error TS7006: Parameter 'y2' implicitly has an 'any' type.
|
|
tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(6,16): error TS7006: Parameter 'arg1' implicitly has an 'any' type.
|
|
tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(10,36): error TS7006: Parameter 'y2' implicitly has an 'any' type.
|
|
|
|
|
|
==== tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts (7 errors) ====
|
|
// this should be errors
|
|
var arg0 = null; // error at "arg0"
|
|
~~~~
|
|
!!! error TS7005: Variable 'arg0' implicitly has an 'any' type.
|
|
var anyArray = [null, undefined]; // error at array literal
|
|
~~~~~~~~
|
|
!!! error TS7005: Variable 'anyArray' implicitly has an 'any[]' type.
|
|
var objL: { v; w; } // error at "y,z"
|
|
~~
|
|
!!! error TS7008: Member 'v' implicitly has an 'any' type.
|
|
~~
|
|
!!! error TS7008: Member 'w' implicitly has an 'any' type.
|
|
var funcL: (y2) => number;
|
|
~~
|
|
!!! error TS7006: Parameter 'y2' implicitly has an 'any' type.
|
|
function temp1(arg1) { } // error at "temp1"
|
|
~~~~
|
|
!!! error TS7006: Parameter 'arg1' implicitly has an 'any' type.
|
|
function testFunctionExprC(subReplace: (s: string, ...arg: any[]) => string) { }
|
|
function testFunctionExprC2(eq: (v1: any, v2: any) => number) { };
|
|
function testObjLiteral(objLit: { v: any; w: any }) { };
|
|
function testFuncLiteral(funcLit: (y2) => number) { };
|
|
~~
|
|
!!! error TS7006: Parameter 'y2' implicitly has an 'any' type.
|
|
|
|
// this should not be an error
|
|
testFunctionExprC2((v1, v2) => 1);
|
|
testObjLiteral(objL);
|
|
testFuncLiteral(funcL);
|
|
|
|
var k = temp1(null);
|
|
var result = temp1(arg0);
|
|
var result1 = temp1(anyArray);
|
|
|
|
function noError(variable: any, array?: any) { }
|
|
noError(null, []);
|
|
noError(undefined, <any>[]);
|
|
noError(null, [null, undefined]);
|
|
noError(undefined, anyArray);
|
|
|
|
class C {
|
|
constructor(emtpyArray: any, variable: any) {
|
|
}
|
|
}
|
|
|
|
var newC = new C([], undefined);
|
|
var newC1 = new C([], arg0);
|
|
var newC2 = new C(<any>[], null)
|
|
|