angularjs-ts-class-annotate
Adds AngularJS dependency annotations for typescript classes
Important notes
- Supports typescript classes only.
- Adds AngularJS $inject statement for constructors in all classes regardless if they are registered in the angular injector or not.
- Existing $inject statements are totally ignored.
Usage example
npm install angularjs-ts-class-annotate
typescript is a peer dependency, make sure to install it (tested with v3 only):
npm install typescript@3
and run:
const fs = ;const annotateTs = ; var fileContent = fs;fileContent = ;fs;
Before: original some-class.ts
After: annotated some-class.annotated.ts
Building
npm i
npm run build
npm run demo