2014-11-05 21:26:03 +01:00
tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts(2,7): error TS2322: Type 'number' is not assignable to type 'string'.
tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts(3,5): error TS2322: Type 'Object' is not assignable to type 'string'.
2014-09-12 22:35:07 +02:00
tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts(4,15): error TS2339: Property 'NonexistantMethod' does not exist on type 'number[]'.
tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts(5,5): error TS2304: Cannot find name 'derp'.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts (4 errors) ====
var functions = [function () {
var k: string = 10;
2014-07-19 02:30:06 +02:00
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'number' is not assignable to type 'string'.
2014-07-13 01:04:16 +02:00
k = new Object();
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
2014-07-13 01:04:16 +02:00
[1, 2, 3].NonexistantMethod();
~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2339: Property 'NonexistantMethod' does not exist on type 'number[]'.
2014-07-13 01:04:16 +02:00
derp();
~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2304: Cannot find name 'derp'.
2014-07-13 01:04:16 +02:00
}];