找出这个生成的严格模式客户端为何仍可能在发送请求前失败。
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();
}
}