-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do this
Milestone
Description
TypeScript Version: 2.1.1 / nightly (2.2.0-dev.20121205)
Code
// A *self-contained* demonstration of the problem follows...
const systemFields = Object.freeze(['id']);
function exclude(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.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do this