build error when a method has documentation with annotations above it ie. @param
See original GitHub issueType of Issue
Build error
[X] Bug Report
[ ] Feature Request
Description
Adding doc with method signature annotations causing packager to error.
LIKE BUILD ERROR src/app/common/featureflags.service.ts(59,3): warning TS0: the type annotation on @param is redundant with its TypeScript
Example service method
/**
- Returns the service label for a given service
- Returns the id , if the service is not available
- @param {string} id
- @returns {string} */ public getServiceLabel(id: string): string { if(this.SERVICE_REGISTRY[id]) { return this.SERVICE_REGISTRY[id].label; } else { return id; } }
How To Reproduce
Steps 1 - Add a documentation to one of your service Like the one above start with / * * and add @param End your documentation
2 - Run ng-packagr -p ng-package.json
Can you reproduce the error in the integration tests in ng-packagr? If possible, take a look at the
integration/samples
and try to break one of >>these builds!
Is the error you faced in an application importing the library Try to break the Angular CLI app in
integration/consumers/ng-cli
!
Expected Behaviour
A bug: please describe what behavior or result you expected Build without erroring out.
Version Information
$ node_modules/.bin/ng-packagr --version
ng-packagr: 5.6.0
@angular/*: 5.2.10
typescript: ~2.6.2
"rxjs": "^5.5.11",
node: v8.11.1
npm: 5.6.0
Please include all version numbers that might be relevant, e.g. third-party libraries
Thanks and regards,
Aykut~
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
Top GitHub Comments
Having the same troubles. Removing @ annotation sign juste makes jsdoc not interpreted, how comes ng build isn’t affected by those annotations but ng-packagr does ? I don’t see why this error should be an expected behavior since ng build does not fail.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. This action has been performed automatically by a bot.