@@ -3351,21 +3351,6 @@ namespace ts {
3351
3351
return node . type || ( isInJavaScriptFile ( node ) ? getJSDocReturnType ( node ) : undefined ) ;
3352
3352
}
3353
3353
3354
- /**
3355
- * Gets the effective type parameters. If the node was parsed in a
3356
- * JavaScript file, gets the type parameters from the `@template` tag from JSDoc.
3357
- */
3358
- export function getEffectiveTypeParameterDeclarations ( node : DeclarationWithTypeParameters ) : ReadonlyArray < TypeParameterDeclaration > {
3359
- if ( isJSDocSignature ( node ) ) {
3360
- return emptyArray ;
3361
- }
3362
- if ( isJSDocTypeAlias ( node ) ) {
3363
- Debug . assert ( node . parent . kind === SyntaxKind . JSDocComment ) ;
3364
- return flatMap ( node . parent . tags , tag => isJSDocTemplateTag ( tag ) ? tag . typeParameters : undefined ) as ReadonlyArray < TypeParameterDeclaration > ;
3365
- }
3366
- return node . typeParameters || ( isInJavaScriptFile ( node ) ? getJSDocTypeParameterDeclarations ( node ) : emptyArray ) ;
3367
- }
3368
-
3369
3354
export function getJSDocTypeParameterDeclarations ( node : DeclarationWithTypeParameters ) : ReadonlyArray < TypeParameterDeclaration > {
3370
3355
return flatMap ( getJSDocTags ( node ) , tag => isNonTypeAliasTemplate ( tag ) ? tag . typeParameters : undefined ) ;
3371
3356
}
@@ -5053,6 +5038,21 @@ namespace ts {
5053
5038
export function getAllJSDocTagsOfKind ( node : Node , kind : SyntaxKind ) : ReadonlyArray < JSDocTag > {
5054
5039
return getJSDocTags ( node ) . filter ( doc => doc . kind === kind ) ;
5055
5040
}
5041
+
5042
+ /**
5043
+ * Gets the effective type parameters. If the node was parsed in a
5044
+ * JavaScript file, gets the type parameters from the `@template` tag from JSDoc.
5045
+ */
5046
+ export function getEffectiveTypeParameterDeclarations ( node : DeclarationWithTypeParameters ) : ReadonlyArray < TypeParameterDeclaration > {
5047
+ if ( isJSDocSignature ( node ) ) {
5048
+ return emptyArray ;
5049
+ }
5050
+ if ( isJSDocTypeAlias ( node ) ) {
5051
+ Debug . assert ( node . parent . kind === SyntaxKind . JSDocComment ) ;
5052
+ return flatMap ( node . parent . tags , tag => isJSDocTemplateTag ( tag ) ? tag . typeParameters : undefined ) as ReadonlyArray < TypeParameterDeclaration > ;
5053
+ }
5054
+ return node . typeParameters || ( isInJavaScriptFile ( node ) ? getJSDocTypeParameterDeclarations ( node ) : emptyArray ) ;
5055
+ }
5056
5056
}
5057
5057
5058
5058
// Simple node tests of the form `node.kind === SyntaxKind.Foo`.
0 commit comments