TypeScript Version: 2.1.1 / nightly (2.2.0-dev.20121205)
Code
// A *self-contained* demonstration of the problem follows...constsystemFields=Object.freeze(['id']);functionexclude(key: string){return!systemFields.includes(key);}tsconfig.json
{ "compilerOptions": {
"lib": [
"dom",
"es2017"
]
}
}Expected behavior:
The ReadonlyArray<T> interface defines includes(searchElement: T, fromIndex?: number): boolean
Actual behavior:
Property 'includes' does not exist on type 'ReadonlyArray'
I would be happy to submit a PR.
TypeScript Version: 2.1.1 / nightly (2.2.0-dev.20121205)
Code
tsconfig.json
{ "compilerOptions": { "lib": [ "dom", "es2017" ] } }Expected behavior:
The
ReadonlyArray<T>interface definesincludes(searchElement: T, fromIndex?: number): booleanActual behavior:
Property 'includes' does not exist on type 'ReadonlyArray'
I would be happy to submit a PR.