mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
jsdoc template tags might be unmatched (#32936)
* jsdoc template tags might be unmatched * Update fourslash test
This commit is contained in:
parent
1b46d8fd8f
commit
2b8ccf40ae
@ -2343,7 +2343,7 @@ namespace ts {
|
||||
export function getTypeParameterFromJsDoc(node: TypeParameterDeclaration & { parent: JSDocTemplateTag }): TypeParameterDeclaration | undefined {
|
||||
const name = node.name.escapedText;
|
||||
const { typeParameters } = (node.parent.parent.parent as SignatureDeclaration | InterfaceDeclaration | ClassDeclaration);
|
||||
return find(typeParameters!, p => p.name.escapedText === name);
|
||||
return typeParameters && find(typeParameters, p => p.name.escapedText === name);
|
||||
}
|
||||
|
||||
export function hasRestParameter(s: SignatureDeclaration | JSDocSignature): boolean {
|
||||
|
||||
10
tests/cases/fourslash/jsDocFunctionSignatures13.ts
Normal file
10
tests/cases/fourslash/jsDocFunctionSignatures13.ts
Normal file
@ -0,0 +1,10 @@
|
||||
///<reference path="fourslash.ts" />
|
||||
//// /**
|
||||
//// * @template {string} K/**/ a golden opportunity
|
||||
//// */
|
||||
//// function Multimap(iv) {
|
||||
//// };
|
||||
|
||||
|
||||
goTo.marker('');
|
||||
verify.quickInfoIs("any");
|
||||
Loading…
x
Reference in New Issue
Block a user