7
Crost
5y

How shit are my colleagues? This shit...

Export class TypescriptClass {
DataHasFinishedLoading: Promise;

doAThing() {
GetData()
. Subscribe(all The Data => {
//do some shit with the data
This. DataHasFinishedLoading = Promise. Resolve(true) ;
} )
}
}

This guy has about 10 years experience doing literally javascript. And this code made it through peer review.

Comments
  • 0
    Well, it's abusing promises, but I think making promise based events isn't that bad of an idea. That implementation is not good though...
Add Comment