Throwing a function is giving weird behavior in Javascript/Typescript
Below is a simplification of how my code is class A { public static doCleanup() { ... } } class B { public run() { try { this.doSomeWork(); } catch(err) { console.log(err); } } doSomeWork() { // Does something and…