getAllJSDocTagsOfKind always returns a defined result (#22652)

This commit is contained in:
Andy 2018-03-16 14:01:28 -07:00 committed by GitHub
parent 28ff6b6ef3
commit 92ec1149ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

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

View File

@ -3037,7 +3037,7 @@ declare namespace ts {
/** Get all JSDoc tags related to a node, including those on parent nodes. */
function getJSDocTags(node: Node): ReadonlyArray<JSDocTag>;
/** Gets all JSDoc tags of a specified kind, or undefined if not present. */
function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): ReadonlyArray<JSDocTag> | undefined;
function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): ReadonlyArray<JSDocTag>;
}
declare namespace ts {
function isNumericLiteral(node: Node): node is NumericLiteral;

View File

@ -3092,7 +3092,7 @@ declare namespace ts {
/** Get all JSDoc tags related to a node, including those on parent nodes. */
function getJSDocTags(node: Node): ReadonlyArray<JSDocTag>;
/** Gets all JSDoc tags of a specified kind, or undefined if not present. */
function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): ReadonlyArray<JSDocTag> | undefined;
function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): ReadonlyArray<JSDocTag>;
}
declare namespace ts {
function isNumericLiteral(node: Node): node is NumericLiteral;