Spot the bug in Client settings

from Strict mode
TypeScript 6 intermediate 4 min 2 issues to find

Find why this generated strict-mode client can still fail before making a request.

TypeScript
interface Settings {
  endpoint: string;
}

class Client {
  private endpoint!: string;

  load(text: string): void {
    const settings = JSON.parse(text) as Settings;
    this.endpoint = settings.endpoint;
  }

  request(): string {
    return this.endpoint.toUpperCase();
  }
}
Open in playground
Report an error