Skip to content

Commit 92ec114

Browse files
author
Andy
authored
getAllJSDocTagsOfKind always returns a defined result (microsoft#22652)
1 parent 28ff6b6 commit 92ec114

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/compiler/utilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4542,7 +4542,7 @@ namespace ts {
45424542
}
45434543

45444544
/** Gets all JSDoc tags of a specified kind, or undefined if not present. */
4545-
export function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): ReadonlyArray<JSDocTag> | undefined {
4545+
export function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): ReadonlyArray<JSDocTag> {
45464546
return getJSDocTags(node).filter(doc => doc.kind === kind);
45474547
}
45484548
}

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3037,7 +3037,7 @@ declare namespace ts {
30373037
/** Get all JSDoc tags related to a node, including those on parent nodes. */
30383038
function getJSDocTags(node: Node): ReadonlyArray<JSDocTag>;
30393039
/** Gets all JSDoc tags of a specified kind, or undefined if not present. */
3040-
function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): ReadonlyArray<JSDocTag> | undefined;
3040+
function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): ReadonlyArray<JSDocTag>;
30413041
}
30423042
declare namespace ts {
30433043
function isNumericLiteral(node: Node): node is NumericLiteral;

tests/baselines/reference/api/typescript.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3092,7 +3092,7 @@ declare namespace ts {
30923092
/** Get all JSDoc tags related to a node, including those on parent nodes. */
30933093
function getJSDocTags(node: Node): ReadonlyArray<JSDocTag>;
30943094
/** Gets all JSDoc tags of a specified kind, or undefined if not present. */
3095-
function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): ReadonlyArray<JSDocTag> | undefined;
3095+
function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): ReadonlyArray<JSDocTag>;
30963096
}
30973097
declare namespace ts {
30983098
function isNumericLiteral(node: Node): node is NumericLiteral;

0 commit comments

Comments
 (0)