| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
Sorry, something went wrong.
There was a problem hiding this comment.
The new AST utility behavior lacks a focused regression test.
Review effort: Balanced
Findings: 1
Extends AST type annotation lookup to handle JSDoc parameter tags consistently.
Changes:
| File | Description |
|---|---|
| tsc/internal/ast/utilities.go | Supports retrieving JSDoc parameter type expressions. |
Sorry, something went wrong.
| KindAsExpression, KindSatisfiesExpression, KindTypeAliasDeclaration, KindJSTypeAliasDeclaration, | ||
| KindNamedTupleMember, KindOptionalType, KindRestType, KindTemplateLiteralTypeSpan, KindJSDocTypeExpression, | ||
| KindJSDocPropertyTag, KindJSDocNullableType, KindJSDocNonNullableType, KindJSDocOptionalType: | ||
| KindJSDocParameterTag, KindJSDocPropertyTag, KindJSDocNullableType, KindJSDocNonNullableType, KindJSDocOptionalType: |
There was a problem hiding this comment.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I just randomly noticed that GetTypeAnnotationNode calls Node.Type(), which handles both JSDoc parameter and property tags:
TypeScript/tsc/internal/ast/ast.go
Lines 669 to 670 in f9f8d01
but its own switch only includes property tags. So, for consistency, this function must have the parameter tag case missed in microsoft/typescript-go#900. No user-facing change, since the only caller doesn't pass JSDoc tags
TypeScript/tsc/internal/ls/completions.go
Lines 1120 to 1127 in f9f8d01