Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getDocumentationComment no longer returns @Annotation for annotations #313

Closed
evmar opened this issue Jan 9, 2017 · 3 comments
Closed

Comments

@evmar
Copy link
Contributor

evmar commented Jan 9, 2017

We rely on sym.getDocumentationComment() to get the JSDoc on decorators to determine that they are annotations. In TS 2.1 it's now the case that getDocumentationComment() does not return the text of JSDoc tags. So the @annotation is dropped.

I traced the code and found inside the compiler:

        return map(getJSDocs(node), doc => doc.comment);

where doc.comment is empty; we need doc.tags.

I looked at the API for a while and didn't see an easy way to get at the JSDoc we need. We might need to change this code to use tsickle's own jsdoc parser.

Blocks #295.

@evmar
Copy link
Contributor Author

evmar commented Jan 9, 2017

CC @alexeagle @chuckjaz have you ran into anything related to this in ngc?

@alexeagle
Copy link
Contributor

No, I haven't run into that before.

@evmar
Copy link
Contributor Author

evmar commented Jan 9, 2017

I commented on this old bug which would help here:
microsoft/TypeScript#7393

rkirov added a commit that referenced this issue Jan 10, 2017
In TS 2.1 the comment text is stripped of jsdoc @ annotations.
To read the full JSDoc text we temporary use a private API.

Passes all tests with 'TEST_FILTER=decorator gulp watch'

Closes #313
rkirov added a commit that referenced this issue Jan 10, 2017
In TS 2.1 the getDocumentationConent is stripped of jsdoc @ annotations.

Passes all tests with 'TEST_FILTER=decorator gulp watch'

Closes #313
rkirov added a commit that referenced this issue Jan 10, 2017
In TS 2.1 the getDocumentationConent is stripped of jsdoc @ annotations.

Passes all tests with 'TEST_FILTER=decorator gulp watch'

Closes #313
rkirov added a commit that referenced this issue Jan 10, 2017
In TS 2.1 the getDocumentationConent is stripped of jsdoc @ annotations.

Passes all tests with 'TEST_FILTER=decorator gulp watch'

Closes #313
@rkirov rkirov closed this as completed Jan 10, 2017
rkirov added a commit that referenced this issue Jan 13, 2017
In TS 2.1 the getDocumentationConent is stripped of jsdoc @ annotations.

Passes all tests with 'TEST_FILTER=decorator gulp watch'

Closes #313
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants