Skip to content

Conversation

@a-tarasyuk
Copy link
Contributor

@a-tarasyuk a-tarasyuk commented Jun 19, 2025

Fixes #1196
Fixes #1225


ℹ️ This patch extends parameter matching by adding a fallback to index-based resolution when JSDoc parameter tag names do not match function parameter names, and also improves handling of nested array literals.


✅ Verification test - jsdocParamTagTypeLiteral

@jakebailey jakebailey requested a review from sandersn June 24, 2025 13:36
@jakebailey
Copy link
Member

This PR needs a merge from main after other PRs were merged.

->opts5[0] : { help: string; what: { a: string; bad: { idea: string; oh: boolean; };}; unnest: number; }
->opts5 : { help: string; what: { a: string; bad: { idea: string; oh: boolean; };}; unnest: number; }[]
->0 : 0
+>opts5[0].what : { a: string; bad: { idea: string; oh: boolean; }[]; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bad being an array looks correct; I just can't figure out how Strada thought it wasn't

@sandersn
Copy link
Member

Since there's a merge needed, could you also delete the unused host parameter from reparseJSDocTypeLiteral?

@jakebailey jakebailey added this pull request to the merge queue Jun 24, 2025
Merged via the queue into microsoft:main with commit 8975084 Jun 24, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Destructured JSDoc Arguments No Longer Collectively Typeable Using Arbitrary Name Missing optional JSDoc param parsing

3 participants