const Foo: new () => any = class {
  constructor() {}
  bar(): string {
    return ‘Hello World!’;
  }
};
const instance = new Foo();
below I want to replace any cause my config not allows any
new () => any
How can I define Foo()'s result ?
const Foo: new () => any = class {
  constructor() {}
  bar(): string {
    return ‘Hello World!’;
  }
};
const instance = new Foo();
below I want to replace any cause my config not allows any
new () => any
How can I define Foo()'s result ?
Copyright © 2021 Jogjafile Inc.
 
                        
I suggest defining an interface named
Footo correspond to the instances that the class expression namedFoocreates:Then you can declare
Fooas typenew () => Foo:Hope that helps; good luck!
Playground link to code