Skip to content

Conversation

@sandersn
Copy link
Member

Fixes #13519

This is a bit odd, but it's the way that 2.0 and earlier behaved. 2.1 broke it with the jsdoc parser rewrite.

Also update LastJSDocNode since it had fallen out of date.

This is a bit odd, but it's the way that 2.0 and earlier behaved. 2.1
broke it.
@mhegazy mhegazy merged commit 9ac7c32 into master Jan 21, 2017
@mhegazy mhegazy deleted the getFirstToken-returns-jsdoc branch January 21, 2017 01:01
it("gets jsdoc", () => {
const first = ts.createSourceFile("foo.ts", "/** comment */var a = true;", ts.ScriptTarget.ES5, /*setParentNodes*/ true);
assert.isDefined(first);
assert.equal(first.kind, 263);
Copy link
Member

Choose a reason for hiding this comment

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

Why does this not use ts.SyntaxKind?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops. I grabbed 263 straight from the debugger. Nice catch. It looks like this issue needs some more attention (to fix getNextToken as well) so I'll correct this in the followup PR.

sandersn added a commit that referenced this pull request Jan 24, 2017
Fixes #13519.
This is a better fix than #13599.
Also fixes broken tests associated with #13599.
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 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.

5 participants