I have an abstract class
export abstract class ABaseModel {
public static isKeyOf<T>(propName: (keyof T)): string {
return propName;
}
}
And another class that extends it
export class Model extends ABaseModel {
public id: number;
public uid: string;
public createdByUid: string;
}
To check if a string is a valid property of that class, I have to wirte
Model.isKeyOf<Model>('id');
But I want to write
Model.isKeyOf('id');
Isn't it possible with Type Inference?