class Foo {
constructor() {
// do something
}
protected init() {
// init more
}
static CreateWithInit() {
const foo = new Foo();
foo.init();
return foo;
}
}
const myFoo = Foo.CreateWithInit();
Так-то никто не мешает запустить
tsc --watch
в терминалеhttps://www.typescriptlang.org/docs/handbook/confi...