So, a fun one.
Let's say that I have a decorator
export const analyze = (target, key, descriptor) => {
console.log('implementation');
}
which is used so
export class AnalyzableService {
constructor(private readonly requiredKey: string, private readonly optionalValue: boolean) {}
@analyze
async method() {}
}
is there a sane way to tell TS that the target for this decorator can only be class with a constructor where one of the arguments is a string?