I don't want to declare accountHandler as any it is not good practice. What is a better approach to create class variable when you have to assign it to class in the constructor.
main.ts
{
private accountHandler: any= {};
private requestLOB: string[] = [];
constructor() {
if (process.env.ENABLEBackendSwitch === "true") {
this.accountHandler = new AccountBalanceHandlerV2();
} else {
this.accountHandler = new AccountBalanceHandler();
}
}
AccountBalanceHandler | AccountBalanceHandlerV2?