TypeScript Version: nightly (2.1.0-dev.20161110)
Code
// @Filename: a.d.ts
declare const x: "foo".charCodeAt(0);
Expected behavior:
An error; probably a syntax error.
Actual behavior:
x is of type number -- the return type of charCodeAt.
DIscovered at DefinitelyTyped/DefinitelyTyped#12603 (comment).
TypeScript Version: nightly (2.1.0-dev.20161110)
Code
Expected behavior:
An error; probably a syntax error.
Actual behavior:
xis of typenumber-- the return type ofcharCodeAt.DIscovered at DefinitelyTyped/DefinitelyTyped#12603 (comment).