I have this TypeScript class:
export class UserCredentials {
public name: string;
static getName() {
return this.name;
}
}
When I remove the static everything works fine. But with it, I have the following compiler error : Property 'name' does not exist on type 'typeof UserCredentials'.