Title: Type of Array.prototype[Symbol.unscopables] is wrong · Issue #46616 · microsoft/TypeScript · GitHub
Open Graph Title: Type of Array.prototype[Symbol.unscopables] is wrong · Issue #46616 · microsoft/TypeScript
X Title: Type of Array.prototype[Symbol.unscopables] is wrong · Issue #46616 · microsoft/TypeScript
Description: lib Update Request In lib.es2015.symbol.wellknown.d: interface Array
Open Graph Description: lib Update Request In lib.es2015.symbol.wellknown.d: interface Array
X Description: lib Update Request In lib.es2015.symbol.wellknown.d: interface Array<T> { /** * Returns an object whose properties have the value 'true' * when they will be absent when used in a '...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/46616
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Type of Array.prototype[Symbol.unscopables] is wrong","articleBody":"# lib Update Request\r\n\r\nIn `lib.es2015.symbol.wellknown.d`:\r\n\r\n```ts\r\ninterface Array\u003cT> {\r\n /**\r\n * Returns an object whose properties have the value 'true'\r\n * when they will be absent when used in a 'with' statement.\r\n */\r\n [Symbol.unscopables](): {\r\n copyWithin: boolean;\r\n entries: boolean;\r\n fill: boolean;\r\n find: boolean;\r\n findIndex: boolean;\r\n keys: boolean;\r\n values: boolean;\r\n };\r\n}\r\n```\r\n\r\n\u003c!--\r\n Please fill in each section completely. Thank you!\r\n\r\n Are you here for one of these commonly-requested lib changes?\r\n * Object.keys - see https://stackoverflow.com/questions/55012174/\r\n * Array methods - see https://github.com/microsoft/TypeScript/issues/36554\r\n * parseInt, parseFloat, isFinite, isNaN, etc. - see https://github.com/microsoft/TypeScript/issues/4002\r\n\r\n The DOM lib is maintained elsewhere and you can skip a step by filing issues/PRs for the DOM at that repo.\r\n See https://github.com/microsoft/TypeScript-DOM-lib-generator\r\n-->\r\n\r\n## Configuration Check\r\n\r\n\u003c!--\r\n If you're missing common new methods like Array.includes, you may have a misconfigured project.\r\n Try setting `lib: \"es2020\"` and checking whether the type you want is present.\r\n You can diagnose further by running `tsc` with `--listFilesOnly` or `--showConfig`.\r\n\r\n Conversely, if you are seeing built-in methods you expect to *not* see, check your 'lib' setting\r\n or review your dependencies for lib/reference directives that might be polluting\r\n your global scope. This is common when using the 'node' type library. See https://github.com/microsoft/TypeScript/issues/40184\r\n\r\n Replace the text below:\r\n-->\r\nMy compilation *target* is `ES2015` and my *lib* is `the default`.\r\n\r\n## Missing / Incorrect Definition\r\n\r\nIt is an object, instead of a function that returns an object.\r\n\r\n## Sample Code\r\n\r\n\u003c!--\r\n What's some code using this that should work, but doesn't?\r\n-->\r\n\r\n## Documentation Link\r\n\r\n\u003c!--\r\n Link to relevant documentation (e.g. MDN, W3C, ECMAScript Spec) to consult for this property.\r\n Note that lib.dom.d.ts intentionally does not include browser-specific extensions\r\n or early experimental features.\r\n-->\r\n","author":{"url":"https://github.com/Jack-Works","@type":"Person","name":"Jack-Works"},"datePublished":"2021-11-01T11:32:50Z","url":"https://github.com/microsoft/TypeScript/issues/46616"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:90b1c0ff-7335-005f-69ab-b33a522119a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CB7E:38C5CF:3735EFF:4608C05:6B01CDE4 |
| html-safe-nonce | aeb7da8f47890a5c1aac98251f6454edfeb4efbb011b7cee3c17ce51879c160e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjdFOjM4QzVDRjozNzM1RUZGOjQ2MDhDMDU6NkIwMUNERTQiLCJ2aXNpdG9yX2lkIjoiMzMwOTQ2NTU5ODM2NjQzNjgzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e95bdda8d276424214fa7f8ed585d9f65e76e00a933bf1c1ba1f3d626c51f0de |
| hovercard-subject-tag | issue:1041074973 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/46616/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2ebee5836e8e88b728e0ddf229944f543c35aba4f5a362f0a502c0265fa8a0c0/microsoft/TypeScript/issues/46616 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2ebee5836e8e88b728e0ddf229944f543c35aba4f5a362f0a502c0265fa8a0c0/microsoft/TypeScript/issues/46616 |
| og:image:alt | lib Update Request In lib.es2015.symbol.wellknown.d: interface Array |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Jack-Works |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width