This repository was archived by the owner on Sep 1, 2026. It is now read-only.
Repository navigation
Support alternate spellings in JSDoc type annotations - #3402
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates the checker to recognize certain JSDoc type-reference “alternate spellings” (e.g. String → string, Object<K,V> → Record<K,V>, function → Function) and refreshes the repository’s baselines accordingly.
Changes:
- Add
getIntendedTypeFromJSDocTypeReferenceand integrate it into type-reference resolution for JSDoc contexts. - Adjust
checkNoTypeArgumentserror reporting when a symbol isn’t available. - Update a large set of conformance, compiler, and fourslash baselines to match the new JSDoc type-resolution behavior.
Reviewed changes
Copilot reviewed 148 out of 148 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/checker/checker.go | Adds JSDoc intended-type mapping for type references and adjusts type-arg error reporting. |
| testdata/baselines/reference/submoduleAccepted/conformance/asyncArrowFunction_allowJs.types.diff | Baseline update reflecting function → Function and related type output shifts. |
| testdata/baselines/reference/submoduleAccepted/conformance/asyncArrowFunction_allowJs.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/typedefTagWrapping.errors.txt.diff | Baseline update reflecting diagnostics changes for JSDoc type references. |
| testdata/baselines/reference/submodule/conformance/typedefTagWrapping.errors.txt | Baseline update reflecting diagnostics changes for JSDoc type references. |
| testdata/baselines/reference/submodule/conformance/typedefTagExtraneousProperty.types.diff | Baseline update reflecting Object<K,V> → Record<K,V> and property typing changes. |
| testdata/baselines/reference/submodule/conformance/typedefTagExtraneousProperty.types | Baseline update reflecting Object<K,V> → Record<K,V> and property typing changes. |
| testdata/baselines/reference/submodule/conformance/typedefTagExtraneousProperty.errors.txt.diff | Removes/updates obsolete baseline diff for errors output. |
| testdata/baselines/reference/submodule/conformance/typedefTagExtraneousProperty.errors.txt | Removes/updates obsolete baseline errors output. |
| testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.types.diff | Removes/updates obsolete baseline diff for types output. |
| testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.types | Baseline update reflecting String wrapper handling in JSDoc. |
| testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.js.diff | Baseline update reflecting String wrapper handling in generated declarations. |
| testdata/baselines/reference/submodule/conformance/thisPropertyAssignmentInherited.js | Baseline update reflecting String wrapper handling in generated declarations. |
| testdata/baselines/reference/submodule/conformance/jsdocVariadicType.types.diff | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocVariadicType.types | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocVariadicType.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocVariadicType.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocTypeTagRequiredParameters.types.diff | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocTypeTagRequiredParameters.types | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocTypeTagRequiredParameters.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocTypeTagRequiredParameters.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocTypeTagParameterType.types.diff | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocTypeTagParameterType.types | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocTypeTagParameterType.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocTypeTagParameterType.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocTypeTag.types.diff | Removes/updates obsolete baseline diff for types output. |
| testdata/baselines/reference/submodule/conformance/jsdocTypeTag.types | Baseline update reflecting wrapper types (String, Number, etc.) mapping to primitives. |
| testdata/baselines/reference/submodule/conformance/jsdocTypeTag.errors.txt.diff | Removes/updates obsolete baseline diff for errors output. |
| testdata/baselines/reference/submodule/conformance/jsdocTypeTag.errors.txt | Baseline update reflecting reduced/changed diagnostics after mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocThisType.types.diff | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocThisType.types | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocThisType.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocThisType.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocTemplateTag5.errors.txt.diff | Baseline update reflecting Object<K,V> → Record<K,V> behavior changes. |
| testdata/baselines/reference/submodule/conformance/jsdocTemplateTag5.errors.txt | Baseline update reflecting Object<K,V> → Record<K,V> behavior changes. |
| testdata/baselines/reference/submodule/conformance/jsdocTemplateTag4.errors.txt.diff | Baseline update reflecting Object<K,V> → Record<K,V> behavior changes. |
| testdata/baselines/reference/submodule/conformance/jsdocTemplateTag4.errors.txt | Baseline update reflecting Object<K,V> → Record<K,V> behavior changes. |
| testdata/baselines/reference/submodule/conformance/jsdocTemplateTag.types.diff | Baseline update reflecting Function and Object mapping changes. |
| testdata/baselines/reference/submodule/conformance/jsdocTemplateTag.types | Baseline update reflecting Function and Object mapping changes. |
| testdata/baselines/reference/submodule/conformance/jsdocTemplateTag.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocTemplateTag.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocParseStarEquals.types.diff | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocParseStarEquals.types | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocParseStarEquals.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocParseStarEquals.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocParseParenthesizedJSDocParameter.types.diff | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocParseParenthesizedJSDocParameter.types | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocParseParenthesizedJSDocParameter.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocParseParenthesizedJSDocParameter.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocParseHigherOrderFunction.types.diff | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocParseHigherOrderFunction.types | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocParseHigherOrderFunction.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocParseHigherOrderFunction.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocParseDotDotDotInJSDocFunction.types.diff | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocParseDotDotDotInJSDocFunction.types | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocParseDotDotDotInJSDocFunction.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocParseDotDotDotInJSDocFunction.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocIndexSignature.types.diff | Baseline update reflecting Object<K,V> → Record<K,V>. |
| testdata/baselines/reference/submodule/conformance/jsdocIndexSignature.types | Baseline update reflecting Object<K,V> → Record<K,V>. |
| testdata/baselines/reference/submodule/conformance/jsdocIndexSignature.errors.txt.diff | Removes/updates obsolete baseline diff for errors output. |
| testdata/baselines/reference/submodule/conformance/jsdocIndexSignature.errors.txt | Baseline update restoring expected index-signature assignability error. |
| testdata/baselines/reference/submodule/conformance/jsdocFunction_missingReturn.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocFunction_missingReturn.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocFunctionType.types.diff | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocFunctionType.types | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsdocFunctionType.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsdocFunctionType.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefPropertyAndExportAssignment.types.diff | Baseline update reflecting Object<K,V> → Record<K,V>. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefPropertyAndExportAssignment.types | Baseline update reflecting Object<K,V> → Record<K,V>. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefPropertyAndExportAssignment.js.diff | Baseline update reflecting Record in emitted declarations. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefPropertyAndExportAssignment.js | Baseline update reflecting Record in emitted declarations. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefPropertyAndExportAssignment.errors.txt.diff | Removes/updates obsolete baseline diff for errors output. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsTypedefPropertyAndExportAssignment.errors.txt | Removes/updates obsolete baseline errors output. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsReusesExistingNodesMappingJSDocTypes.types.diff | Baseline update reflecting function → Function and Record mapping. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsReusesExistingNodesMappingJSDocTypes.types | Baseline update reflecting function → Function and Record mapping. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsReusesExistingNodesMappingJSDocTypes.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsReusesExistingNodesMappingJSDocTypes.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsRestArgsWithThisTypeInJSDocFunction(target=es2015).types.diff | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsRestArgsWithThisTypeInJSDocFunction(target=es2015).types | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsRestArgsWithThisTypeInJSDocFunction(target=es2015).errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsRestArgsWithThisTypeInJSDocFunction(target=es2015).errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsMissingTypeParameters(target=es2015).types.diff | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsMissingTypeParameters(target=es2015).types | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsJSDocRedirectedLookups.types.diff | Baseline update reflecting primitive-wrapper mapping and Object<K,V> → Record<K,V>. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsJSDocRedirectedLookups.types | Baseline update reflecting primitive-wrapper mapping and Object<K,V> → Record<K,V>. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsJSDocRedirectedLookups.errors.txt.diff | Baseline update reflecting reduced lookup-failure diagnostics. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsJSDocRedirectedLookups.errors.txt | Baseline update reflecting reduced lookup-failure diagnostics. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespaceCjs.types.diff | Baseline update reflecting Record<string, any> mapping. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespaceCjs.types | Baseline update reflecting Record<string, any> mapping. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespaceCjs.js.diff | Baseline update reflecting Record in emitted declarations. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespaceCjs.js | Baseline update reflecting Record in emitted declarations. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespaceCjs.errors.txt.diff | Baseline update reflecting reduced Object-generic diagnostics. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespaceCjs.errors.txt | Baseline update reflecting reduced Object-generic diagnostics. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespace.types.diff | Baseline update reflecting Record<string, any> mapping. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespace.types | Baseline update reflecting Record<string, any> mapping. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespace.errors.txt.diff | Baseline update reflecting reduced Object-generic diagnostics. |
| testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespace.errors.txt | Baseline update reflecting reduced Object-generic diagnostics. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTagOnObjectProperty2.types.diff | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTagOnObjectProperty2.types | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTagOnObjectProperty2.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTagOnObjectProperty2.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTagOnObjectProperty1.types.diff | Baseline update reflecting Function mapping in object property types. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTagOnObjectProperty1.types | Baseline update reflecting Function mapping in object property types. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTagOnObjectProperty1.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTagOnObjectProperty1.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTag8.types.diff | Removes/updates obsolete baseline diff for types output. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTag8.types | Baseline update reflecting `Number |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTag8.errors.txt.diff | Removes/updates obsolete baseline diff for errors output. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTag8.errors.txt | Removes/updates obsolete baseline errors output. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTag2.types.diff | Baseline update reflecting wrapper-type mapping and function → Function. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTag2.types | Baseline update reflecting wrapper-type mapping and function → Function. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTag2.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTag2.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTag1.types.diff | Baseline update reflecting wrapper-type mapping and function → Function. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTag1.types | Baseline update reflecting wrapper-type mapping and function → Function. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTag1.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/checkJsdocTypeTag1.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/conformance/checkJsdocSatisfiesTag8.types.diff | Removes/updates obsolete baseline diff for types output. |
| testdata/baselines/reference/submodule/conformance/checkJsdocSatisfiesTag8.types | Baseline update reflecting restored @satisfies typing behavior. |
| testdata/baselines/reference/submodule/conformance/checkJsdocSatisfiesTag8.errors.txt.diff | Removes/updates obsolete baseline diff for errors output. |
| testdata/baselines/reference/submodule/conformance/checkJsdocSatisfiesTag8.errors.txt | Baseline update reflecting restored @satisfies error location and message. |
| testdata/baselines/reference/submodule/conformance/checkJsdocSatisfiesTag2.types.diff | Removes/updates obsolete baseline diff for types output. |
| testdata/baselines/reference/submodule/conformance/checkJsdocSatisfiesTag2.types | Baseline update reflecting restored @satisfies typing behavior. |
| testdata/baselines/reference/submodule/conformance/checkJsdocSatisfiesTag2.errors.txt.diff | Removes/updates obsolete baseline diff for errors output. |
| testdata/baselines/reference/submodule/conformance/checkJsdocSatisfiesTag2.errors.txt | Removes/updates obsolete baseline errors output. |
| testdata/baselines/reference/submodule/conformance/asyncArrowFunction_allowJs.types | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/conformance/asyncArrowFunction_allowJs.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/compiler/returnConditionalExpressionJSDocCast.types.diff | Removes/updates obsolete baseline diff for types output. |
| testdata/baselines/reference/submodule/compiler/returnConditionalExpressionJSDocCast.types | Baseline update reflecting String → string in JSDoc cast results. |
| testdata/baselines/reference/submodule/compiler/jsdocTypeNongenericInstantiationAttempt.types.diff | Baseline update reflecting wrapper-type mapping in generics. |
| testdata/baselines/reference/submodule/compiler/jsdocTypeNongenericInstantiationAttempt.types | Baseline update reflecting wrapper-type mapping in generics. |
| testdata/baselines/reference/submodule/compiler/jsdocTypeNongenericInstantiationAttempt.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/compiler/jsdocTypeNongenericInstantiationAttempt.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/compiler/jsdocParameterParsingInfiniteLoop.types.diff | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/compiler/jsdocParameterParsingInfiniteLoop.types | Baseline update reflecting function → Function. |
| testdata/baselines/reference/submodule/compiler/jsdocParameterParsingInfiniteLoop.errors.txt.diff | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/compiler/jsdocParameterParsingInfiniteLoop.errors.txt | Baseline update reflecting changed diagnostics after intended-type mapping. |
| testdata/baselines/reference/submodule/compiler/jsdocArrayObjectPromiseNoImplicitAny.types.diff | Baseline update reflecting Object<K,V> → Record<K,V>. |
| testdata/baselines/reference/submodule/compiler/jsdocArrayObjectPromiseNoImplicitAny.types | Baseline update reflecting Object<K,V> → Record<K,V>. |
| testdata/baselines/reference/submodule/compiler/jsdocArrayObjectPromiseNoImplicitAny.errors.txt.diff | Removes/updates obsolete baseline diff for errors output. |
| testdata/baselines/reference/submodule/compiler/jsdocArrayObjectPromiseNoImplicitAny.errors.txt | Baseline update reflecting reduced Object-generic diagnostics. |
| testdata/baselines/reference/submodule/compiler/jsdocArrayObjectPromiseImplicitAny.types.diff | Baseline update reflecting Object<K,V> → Record<K,V> and Object handling. |
| testdata/baselines/reference/submodule/compiler/jsdocArrayObjectPromiseImplicitAny.types | Baseline update reflecting Object<K,V> → Record<K,V> and Object handling. |
| testdata/baselines/reference/submodule/compiler/jsdocArrayObjectPromiseImplicitAny.errors.txt.diff | Removes/updates obsolete baseline diff for errors output. |
| testdata/baselines/reference/submodule/compiler/jsdocArrayObjectPromiseImplicitAny.errors.txt | Removes/updates obsolete baseline errors output. |
| testdata/baselines/reference/fourslash/signatureHelp/jsDocFunctionSignatures5.baseline | Baseline update reflecting primitive type display (String → string) in signature help. |
| testdata/baselines/reference/fourslash/quickInfo/jsDocTypeTagQuickInfo2.baseline | Baseline update reflecting function → Function in quick info. |
| testdata/baselines/reference/fourslash/quickInfo/jsDocTypeTagQuickInfo1.baseline | Baseline update reflecting wrapper types mapping to primitives in quick info. |
Comments suppressed due to low confidence (3)
internal/checker/checker.go:1
- The comment says the resolved symbol should be cached because it’s needed later in
checkTypeReferenceNode, but this refactor no longer callsgetSymbolFromTypeReference(node)for theconstandgetIntendedTypeFromJSDocTypeReferencebranches. That likely leaveslinks.resolvedSymbolunset/cold for those cases and can cause later checks to re-resolve (or behave differently) despitelinks.resolvedTypebeing set. Consider always resolving/caching the symbol up-front (even if you don’t use it for the type) or explicitly settinglinks.resolvedSymbolwhen returning an intended JSDoc type.
internal/checker/checker.go:1 checkNoTypeArgumentsnow assumesnodeis aTypeReferenceNodewheneversymbol == niland unconditionally callsnode.AsTypeReferenceNode(). IfcheckNoTypeArgumentsis invoked elsewhere with a different node kind (which is plausible given it’s a general-purpose helper), this will panic. A safer approach is to guard withast.IsTypeReferenceNode(node)(or similar) and fall back to a more general name formatter when it’s not a type reference.
internal/checker/checker.go:1- Mapping lowercase
functiontoglobalFunctionTypecan unintentionally erase signature information in JSDoc annotations that usefunction(...)-style syntax (which is commonly meant to express a callable/construct signature, not the globalFunctionobject type). This shows up as downstream type degradation (e.g., values becomingFunctioninstead of a specific call/construct signature) and can introduce new diagnostics like “Type 'Function' has no construct signatures.” If the goal is only to support{function}as an alias forFunction, consider restricting this mapping to the no-parameters form (or dropping the lowercasefunctionmapping until the JSDocfunction(...)form is parsed/represented as a dedicated function-type node).
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
Ryan Cavanaugh (RyanCavanaugh)
approved these changes
Apr 15, 2026
Jake Bailey (jakebailey)
pushed a commit
to jakebailey/TypeScript
that referenced
this pull request
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR ports
getIntendedTypeFromJSDocTypeReferenceto align our JSDoc support more closely with Strada.