here is an example of my class with the methods in question
class Example {
constructor(info) {
// call validateInfo(info)
}
static validateInfo(info):void {
// validate the info
}
I would like to call validateInfo in the constructor, but I can't just do this with this.validateInfo(info) because it is a static method.
In Javascript, I could do this:
constructor(info) {
this.constructor.validateInfo(info)
}
but, in Typescript this gives the following error:
error TS2339: Property 'validateInfo' does not exist on type 'Function'.
I understand the error message, but is there a Typescript equivalent for the Javascript solution?