Hacker News new | ask | show | jobs
by HideousKojima 1402 days ago
>To this day I haven't found a way of doing this in TS.

Just make a static method that does initialization if needed and returns a new instance?

https://www.typescripttutorial.net/typescript-tutorial/types...

I'm trying to not be too hard on people as I read this thread, but it's baffling to me that web devs are getting filtered by features that have been in other languages since the 80's and 90's.