abstract class Route {
abstract readonly name?: string;
protected abstract pattern: string;
public constructor() {
// Do something with `this.name` and `this.pattern`.
console.log(this.pattern); // Typecheck error
}
abstract handle(): void;
}
This throws an error because this.pattern is not to be accessed in the constructor. Why can't I access it?