type SomeConstructor = new() => Promise<string>;
class Some {
constructor(args: ConstructorParameters<SomeConstructor>) {
return this.response('test');
}
response(v: string) {
return Promise.resolve(v);
}
}
class Something {
constructor(private text: string){
}
public static async create(): Promise<Something>{
const text = await Promise.resolve("txt");
return new Something(text);
}
}