Title: Binding element incorrectly reported as having `any` type in JS with JSDoc starting with 5.6.2 · Issue #59936 · microsoft/TypeScript · GitHub
Open Graph Title: Binding element incorrectly reported as having `any` type in JS with JSDoc starting with 5.6.2 · Issue #59936 · microsoft/TypeScript
X Title: Binding element incorrectly reported as having `any` type in JS with JSDoc starting with 5.6.2 · Issue #59936 · microsoft/TypeScript
Description: 🔎 Search Terms Binding element implicitly has an any type 7031 🕗 Version & Regression Information This changed between versions 5.5.4 and 5.6.2 ⏯ Playground Link https://www.typescriptlang.org/play/?strictNullChecks=true&target=9&suppres...
Open Graph Description: 🔎 Search Terms Binding element implicitly has an any type 7031 🕗 Version & Regression Information This changed between versions 5.5.4 and 5.6.2 ⏯ Playground Link https://www.typescriptlang.org/play...
X Description: 🔎 Search Terms Binding element implicitly has an any type 7031 🕗 Version & Regression Information This changed between versions 5.5.4 and 5.6.2 ⏯ Playground Link https://www.typescriptlang.org/...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/59936
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Binding element incorrectly reported as having `any` type in JS with JSDoc starting with 5.6.2","articleBody":"### 🔎 Search Terms\n\nBinding element implicitly has an any type 7031\n\n### 🕗 Version & Regression Information\n\n- This changed between versions 5.5.4 and 5.6.2\r\n\n\n### ⏯ Playground Link\n\nhttps://www.typescriptlang.org/play/?strictNullChecks=true&target=9&suppressImplicitAnyIndexErrors=true&ts=5.6.2&filetype=js#code/PQKhCgAIUgBAHAhgJ0QW0gbwPICMBWApgMYAuAvpANrED2AdgGYCWA5gLpQwIrpYAKKUs0QAbADwAlErWQATcQHJ8AZwaLIAH0jK19Yhu26GAVkUAaSCtLJm9VlXYA+J5RoMWrAHSI5c5sIMYgBizKKEKpzQwOCEAB7wsqSQjACu+oH0kPDIhEi5AMIebAAUmFCQlb7+mSFhEQBcWBWVrZCqDJAAvNRRrZQ9mOTgA1jkAJTNbXT0auFeorSsJR304yNAA\n\n### 💻 Code\n\n```js\r\n/**\r\n * @param {Object} [config]\r\n * @param {Partial\u003cRecord\u003c'json' | 'jsonc' | 'json5', string[]>>} [config.additionalFiles]\r\n */\r\nexport function prepareConfig({\r\n additionalFiles: {\r\n json = []\r\n } = {}\r\n} = {}) {\r\n console.log(json)\r\n}\r\n```\r\n\n\n### 🙁 Actual behavior\n\n`json` is errored as `Binding element 'json' implicitly has an 'any[]' type.(7031)` even though it's typed as `string[]`\r\n\r\n\r\n\n\n### 🙂 Expected behavior\n\nNo error expected, as `json` is typed as `string[]`\n\n### Additional information about the issue\n\nThis worked well in 5.5.4 but broke with upgrade to 5.6.2. It works correctly in .ts file, but breaks in .js file with JSDoc.","author":{"url":"https://github.com/burtek","@type":"Person","name":"burtek"},"datePublished":"2024-09-10T20:47:03Z","url":"https://github.com/microsoft/TypeScript/issues/59936"}
| 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:306a3e8b-74b5-af6d-7ccf-c3280a4f6792 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B220:3C21B:F70AFD:13E0F9E:6B00FEF5 |
| html-safe-nonce | 3784953996430002efcfb664ecca89316d05d009cc1ef453f81c593e23ac42b3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjIwOjNDMjFCOkY3MEFGRDoxM0UwRjlFOjZCMDBGRUY1IiwidmlzaXRvcl9pZCI6IjI4OTc3NDU0MDc2OTIwNDYwNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ba0a8a00f1f4e10d1d08de4aa244e5d62ce2421ac66e4d274c61d5804bca7903 |
| hovercard-subject-tag | issue:2517765555 |
| 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/59936/issue_layout |
| twitter:image | https://opengraph.githubassets.com/309b21888e333519ebac16ac6bf8406e6af83416ee49a0fe937fb48b7a079e64/microsoft/TypeScript/issues/59936 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/309b21888e333519ebac16ac6bf8406e6af83416ee49a0fe937fb48b7a079e64/microsoft/TypeScript/issues/59936 |
| og:image:alt | 🔎 Search Terms Binding element implicitly has an any type 7031 🕗 Version & Regression Information This changed between versions 5.5.4 and 5.6.2 ⏯ Playground Link https://www.typescriptlang.org/play... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | burtek |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width