I have a class decorator where I want to pass type for a constructor function parameter to avoid linting error,so I can't pass type as Function.For Example-
function Student(config) {
return function (target:Function) {
target.prototype["tValue"]="some value"
}
}
@Student({
course: "Angular 2"
})
class Person {
}
@Student({
course: "Angular 15"
})
class People {
}
So here we have a class decorator Student which gets attached to 2 classes Person and People.What should I pass the type of target in in decorator? I tried Function but that gives linting error.This Student decorator can be applied to multiple classes of different types.DO we have some generic type for this?
You can suppress this by adding the following in
compilerOptions
ints.config
file