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();
}
}