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

18 lines
526 B
Plaintext
Raw Normal View History

tests/cases/compiler/inOperator.ts(7,15): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/inOperator.ts (1 errors) ====
var a=[];
for (var x in a) {}
if (3 in a) {}
var b = '' in 0;
~
!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter
2014-07-13 01:04:16 +02:00
var c: any;
var y: number;
if (y in c) { }