TypeScript/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.errors.txt

16 lines
534 B
Plaintext

==== tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts (4 errors) ====
var functions = [function () {
var k: string = 10;
~
!!! Type 'number' is not assignable to type 'string'.
k = new Object();
~
!!! Type 'Object' is not assignable to type 'string'.
[1, 2, 3].NonexistantMethod();
~~~~~~~~~~~~~~~~~
!!! Property 'NonexistantMethod' does not exist on type 'number[]'.
derp();
~~~~
!!! Cannot find name 'derp'.
}];