Title: Array.prototype.flat limited depth to 21 · Issue #55685 · microsoft/TypeScript · GitHub
Open Graph Title: Array.prototype.flat limited depth to 21 · Issue #55685 · microsoft/TypeScript
X Title: Array.prototype.flat limited depth to 21 · Issue #55685 · microsoft/TypeScript
Description: ⚙ Compilation target ES2019 ⚙ Library es2019 Missing / Incorrect Definition Array.prototype.flat definition is supporting depth only up to 21. Over 21 return wrong type. Sample Code const foo = [ [ ['string' ] ] ] const flatFoo = foo.fla...
Open Graph Description: ⚙ Compilation target ES2019 ⚙ Library es2019 Missing / Incorrect Definition Array.prototype.flat definition is supporting depth only up to 21. Over 21 return wrong type. Sample Code const foo = [ [...
X Description: ⚙ Compilation target ES2019 ⚙ Library es2019 Missing / Incorrect Definition Array.prototype.flat definition is supporting depth only up to 21. Over 21 return wrong type. Sample Code const foo = [ [...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/55685
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Array.prototype.flat limited depth to 21","articleBody":"### ⚙ Compilation target\n\nES2019\n\n### ⚙ Library\n\nes2019\n\n### Missing / Incorrect Definition\n\nArray.prototype.flat definition is supporting `depth` only up to 21. Over 21 return wrong type.\r\n\r\n\n\n### Sample Code\n\n```TypeScript\nconst foo = [ [ ['string' ] ] ]\r\nconst flatFoo = foo.flat(22) // string[][][] should be string[]\n```\n\n\n### Documentation Link\n\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat","author":{"url":"https://github.com/PKrasinski","@type":"Person","name":"PKrasinski"},"datePublished":"2023-09-08T16:41:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/55685/TypeScript/issues/55685"}
| 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:f88c2bb6-93b5-ff6b-f416-92a7a1382c60 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D018:11D20E:642A88:8818AC:6A627D30 |
| html-safe-nonce | e411529e05297570a550e40e1340ac706cbc47511a2baccd1992750c61d82de2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDE4OjExRDIwRTo2NDJBODg6ODgxOEFDOjZBNjI3RDMwIiwidmlzaXRvcl9pZCI6IjI1ODk1MDIwOTQ1NDMzMjI0MTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d291fd5d2b4e52dbfa1dfe37e55c94b38d802297eddc9044fe9a65d2f2d30d5e |
| hovercard-subject-tag | issue:1888007549 |
| 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/55685/issue_layout |
| twitter:image | https://opengraph.githubassets.com/205f7b397a8e29d1d707f45b638064ffd843dea32b789b3f7b5071cd3233e923/microsoft/TypeScript/issues/55685 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/205f7b397a8e29d1d707f45b638064ffd843dea32b789b3f7b5071cd3233e923/microsoft/TypeScript/issues/55685 |
| og:image:alt | ⚙ Compilation target ES2019 ⚙ Library es2019 Missing / Incorrect Definition Array.prototype.flat definition is supporting depth only up to 21. Over 21 return wrong type. Sample Code const foo = [ [... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | PKrasinski |
| hostname | github.com |
| expected-hostname | github.com |
| None | 54d77223ecd96549586d00f1e91ee7d05feebf27ea430279a9c4ba4b7de1a93c |
| 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 | 4d79f1b99472a521fc5fb66e9fdc3ce742937dff |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width