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

8 lines
475 B
Plaintext
Raw Normal View History

tests/cases/conformance/types/primitives/string/stringPropertyAccessWithError.ts(2,21): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
2014-07-13 01:04:16 +02:00
==== tests/cases/conformance/types/primitives/string/stringPropertyAccessWithError.ts (1 errors) ====
var x = '';
var d = x['charAt']('invalid'); // error
~~~~~~~~~
!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.