Title: JSDoc: error TS1005 when using conditional type in @typedef · Issue #37166 · microsoft/TypeScript · GitHub
Open Graph Title: JSDoc: error TS1005 when using conditional type in @typedef · Issue #37166 · microsoft/TypeScript
X Title: JSDoc: error TS1005 when using conditional type in @typedef · Issue #37166 · microsoft/TypeScript
Description: TypeScript Version: 3.9.0-dev.20200229 Search Terms: JSDoc typedef Expected behavior: compile javascript JSDoc without any errors Actual behavior: Actually, tsc compiles correct d.ts type, but annoying error '?' expected appears. You can...
Open Graph Description: TypeScript Version: 3.9.0-dev.20200229 Search Terms: JSDoc typedef Expected behavior: compile javascript JSDoc without any errors Actual behavior: Actually, tsc compiles correct d.ts type, but anno...
X Description: TypeScript Version: 3.9.0-dev.20200229 Search Terms: JSDoc typedef Expected behavior: compile javascript JSDoc without any errors Actual behavior: Actually, tsc compiles correct d.ts type, but anno...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/37166
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"JSDoc: error TS1005 when using conditional type in @typedef","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\n**TypeScript Version:** 3.9.0-dev.20200229\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** JSDoc typedef \r\n\r\n**Expected behavior:** compile javascript JSDoc without any errors\r\n\r\n**Actual behavior:** Actually, tsc compiles correct d.ts type, but annoying error `'?' expected` appears. You can see that error on the Playground's Errors tab.\r\n\r\n\u003c!-- Did you find other bugs that looked similar? -->\r\n**Related Issues:**\r\n\r\n**Code**\r\n```js\r\n/**\r\n * @template T\r\n * @typedef {{[K in keyof T]: T[K] extends Function ? K : never}[keyof T]} FunctionProperties\r\n */\r\n\r\n```\r\n\r\n\r\n\r\n\r\n\u003cdetails>\u003csummary>\u003cb>Compiler Options\u003c/b>\u003c/summary>\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"noImplicitAny\": true,\r\n \"strictFunctionTypes\": true,\r\n \"strictPropertyInitialization\": true,\r\n \"strictBindCallApply\": true,\r\n \"noImplicitThis\": true,\r\n \"noImplicitReturns\": true,\r\n \"alwaysStrict\": true,\r\n \"noUnusedLocals\": true,\r\n \"noUnusedParameters\": true,\r\n \"esModuleInterop\": true,\r\n \"checkJs\": true,\r\n \"allowJs\": true,\r\n \"declaration\": true,\r\n \"experimentalDecorators\": true,\r\n \"emitDecoratorMetadata\": true,\r\n \"moduleResolution\": 2,\r\n \"target\": \"ES2017\",\r\n \"jsx\": \"React\",\r\n \"module\": \"ESNext\"\r\n }\r\n}\r\n```\r\n\r\n\r\n\u003c/details>\r\n\r\n**Playground Link:** [Provided](https://www.typescriptlang.org/v2/en/play?noUnusedLocals=true&noUnusedParameters=true&ts=next&useJavaScript=true#code/PQKhFgCgAIWgBALgUwLYAcA2BDF0AqUsCiAnusgCbIBm0A3vQNoDS0AlgHbQDWypAezr4AugC4CrEdGQAPFJ0oBnaADEArpwDGidgO4B+aGwmdkAN2QAnAL5M+g4SJtrNOvZwAKVgRSu7kJSIQYCggA)\r\n ","author":{"url":"https://github.com/Serega124","@type":"Person","name":"Serega124"},"datePublished":"2020-03-02T19:38:47Z","url":"https://github.com/microsoft/TypeScript/issues/37166"}
| 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:62d1c997-8a61-85c2-0e53-8617b98bf95d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB2C:2564D8:BDC320:FC4A0F:6B00F1C7 |
| html-safe-nonce | b1d754b3186adddb762a34080f476e8693d095d7f5fd2c83de854c329538a859 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjJDOjI1NjREODpCREMzMjA6RkM0QTBGOjZCMDBGMUM3IiwidmlzaXRvcl9pZCI6Ijg3NjE3MDczNTY5MTc2NTgwNTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8b486659bc85093471acef24af1101cf19b8f6ddade2a584ed6f294e1ebaf3ce |
| hovercard-subject-tag | issue:574200266 |
| 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/37166/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4cd1a95cfeae27a1bd79756df9fecaef2cb9ce72962f36250bcf291c231b5c5a/microsoft/TypeScript/issues/37166 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4cd1a95cfeae27a1bd79756df9fecaef2cb9ce72962f36250bcf291c231b5c5a/microsoft/TypeScript/issues/37166 |
| og:image:alt | TypeScript Version: 3.9.0-dev.20200229 Search Terms: JSDoc typedef Expected behavior: compile javascript JSDoc without any errors Actual behavior: Actually, tsc compiles correct d.ts type, but anno... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Serega124 |
| 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