I wrote a decorator that makes code as obsolete, my question would be, is there a way that I can have a build process that detects this decorator is used in a method, and thus raises some sort of warning?
Like the code below annotated with some decorator:
@Obsolete
private deadMethod(){
/// dead code
}
/// throws some warning during build phase
Then during NPM build/Webpack build, this decorator usage gets flagged as some warning/error. Is that possible? I was trying to find ways to retrieve what decorators are used in a method programmatically and I couldn't find anything.