Skip to content

Conversation

aozgaa
Copy link
Contributor

@aozgaa aozgaa commented Sep 22, 2017

Fixes #18701


export function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag {
return node.kind === SyntaxKind.JSDocAugmentsTag;
export function isJSDocAugmentsOrExtendsTag(node: Node): node is JSDocAugmentsOrExtendsTag {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is part of the public API now, we should not break that.

@ghost
Copy link

ghost commented Sep 26, 2017

Looks like this will cause merge conflicts in #18775, but I'll handle it once this is in.

Probably fixes #17072.

case SyntaxKind.JSDocAugmentsTag:
return visitNode(cbNode, (<JSDocAugmentsTag>node).typeExpression);
case SyntaxKind.JSDocAugmentsOrExtendsTag:
case SyntaxKind.JSDocExtendsTag:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like SyntaxKind.JSDocExtendsTag is never assigned anywhere?

JSDocComment,
JSDocTag,
JSDocAugmentsTag,
JSDocAugmentsOrExtendsTag,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep JSDocAugmentsTag and just let @extends be a silent synonym for it in the parser. I don't think it's bad, for example, if the roundtrip emit converts @extends to @augment. And that's the worst side-effect I can think of.

@ghost
Copy link

ghost commented Oct 2, 2017

@sandersn mentioned in #18854 (review) that we should have an error if both @extends and @augments tags are present, but continue on using just the type from @extends.

}

/** Gets all JSDoc tags of a specified kind, or undefined if not present. */
export function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): ReadonlyArray<JSDocTag> | undefined {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove 'All'

@aozgaa aozgaa merged commit 1db7623 into microsoft:master Oct 9, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants