News for hackers. Stuff that matters.
Re:TypeScript is terrible for library developers by HideousKojima on Tuesday August 23, 2022 @03:38PM (#32570275)
>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.

There are no comments on this comment yet.