Title: JSDoc tuple typedef with optional elements became null · Issue #38747 · microsoft/TypeScript · GitHub
Open Graph Title: JSDoc tuple typedef with optional elements became null · Issue #38747 · microsoft/TypeScript
X Title: JSDoc tuple typedef with optional elements became null · Issue #38747 · microsoft/TypeScript
Description: TypeScript Version: 3.7.x-dev.201xxxxx Search Terms: JSDoc tuple optional Code In JavaScript: /** * @typedef {[number, number?]} Args * * @type {Args} */ let args; In TypeScript: let args: [number, number?]; Expected behavior: The args v...
Open Graph Description: TypeScript Version: 3.7.x-dev.201xxxxx Search Terms: JSDoc tuple optional Code In JavaScript: /** * @typedef {[number, number?]} Args * * @type {Args} */ let args; In TypeScript: let args: [number,...
X Description: TypeScript Version: 3.7.x-dev.201xxxxx Search Terms: JSDoc tuple optional Code In JavaScript: /** * @typedef {[number, number?]} Args * * @type {Args} */ let args; In TypeScript: let args: [number,...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/38747
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"JSDoc tuple typedef with optional elements became null","articleBody":"\r\n\u003c!--\r\nPlease try to reproduce the issue with the latest published version. It may have already been fixed.\r\nFor npm: `typescript@next`\r\nThis is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly\r\n-->\r\n**TypeScript Version:** 3.7.x-dev.201xxxxx\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\nJSDoc tuple optional\r\n\r\n**Code**\r\n\r\n[In JavaScript](https://www.typescriptlang.org/play?strictNullChecks=true&jsx=0&useJavaScript=true#code/PQKhCgAIUgBAXAngBwKYBNUDNIG8DaAdgK4C2ARqgE4A0kJF1A-ALoC+kAglQOYDOUGILhI0ebvzaDg4ADap4kAIa8+AbiA):\r\n\r\n```js\r\n/**\r\n * @typedef {[number, number?]} Args\r\n * \r\n * @type {Args}\r\n */\r\nlet args;\r\n```\r\n\r\n[In TypeScript](https://www.typescriptlang.org/play?jsx=0#code/DYUwLgBAhgTg5gZwFwQNoDsCuBbARiGAGgizwIH4BdAbiA):\r\n\r\n```ts\r\nlet args: [number, number?];\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nThe `args` variable should have the same type in both cases.\r\n\r\n**Actual behavior:**\r\n\r\n* In JavaScript: `[number, number | null]`\r\n* In TypeScript: `[number, (number | undefined)?]`\r\n\r\n**Playground Link:** \r\n\r\n* [JavaScript](https://www.typescriptlang.org/play?strictNullChecks=true&jsx=0&useJavaScript=true#code/PQKhCgAIUgBAXAngBwKYBNUDNIG8DaAdgK4C2ARqgE4A0kJF1A-ALoC+kAglQOYDOUGILhI0ebvzaDg4ADap4kAIa8+AbiA):\r\n* [TypeScript](https://www.typescriptlang.org/play?jsx=0#code/DYUwLgBAhgTg5gZwFwQNoDsCuBbARiGAGgizwIH4BdAbiA):\r\n\r\n**Related Issues:** None","author":{"url":"https://github.com/chancancode","@type":"Person","name":"chancancode"},"datePublished":"2020-05-23T19:14:56Z","url":"https://github.com/microsoft/TypeScript/issues/38747"}
| 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:40a98349-45a8-9cf6-355c-a39d4f8c294e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED68:CC1A4:8F24BC:B7CDFE:6B00EBDF |
| html-safe-nonce | 418b46d929fff1793c66943516f9e7abe87acb3860b0e7bb4c06be79cd794205 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDY4OkNDMUE0OjhGMjRCQzpCN0NERkU6NkIwMEVCREYiLCJ2aXNpdG9yX2lkIjoiNDQ5Njc0MTk0MDc4MzU0MTIxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b140d1eb06505075e46a88e07e54990d93caced8ce8cd6b692292b53cb32a1b8 |
| hovercard-subject-tag | issue:623724155 |
| 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/38747/issue_layout |
| twitter:image | https://opengraph.githubassets.com/73df466b9ccec954b6f85e01b8d11706b2c3d472a56e5d772258b749dc7fd485/microsoft/TypeScript/issues/38747 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/73df466b9ccec954b6f85e01b8d11706b2c3d472a56e5d772258b749dc7fd485/microsoft/TypeScript/issues/38747 |
| og:image:alt | TypeScript Version: 3.7.x-dev.201xxxxx Search Terms: JSDoc tuple optional Code In JavaScript: /** * @typedef {[number, number?]} Args * * @type {Args} */ let args; In TypeScript: let args: [number,... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | chancancode |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width