Open cwilson opened 3 years ago
@dsherret I figured out how to find unused class properties, but just hit a wall when trying to see if it could find references in angular templates (which it cannot).
Is it possible without much effort to hook up to angular language service from ts-morph to access that information?
After some more reading, it seems the problem may require ts-morph to use ngtsc
instead of its own built in tsc
library to plug into that api instead. Does this sound about right?
https://github.com/angular/angular/tree/main/packages/compiler-cli/src/ngtsc
Is your feature request related to a problem? Please describe.
I'm tying to find references to nodes that may come from Angular templates. WebStorm is able to resolve these references; I'm assuming it's using Angular's language service: https://angular.io/guide/language-service.
Describe the solution you'd like
A way to configure ts-morph (possibly through compiler options) to use Angular language service. I'm hoping there already is a way that I'm missing!
Describe alternatives you've considered
I've tried specifying the language service as a compiler plugin in
tsconfig.json
, and through the compiler options passed to ts-morph.Other alternative is to consume the language service directly if support from
ts-morph
is not realistic.