Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
StringEnum
StringEnum is a base class for creating string-valued enums. You can copy/paste it into your projects or install via NuGet..
I will tell you that writing TypeScript for something very dynamic like a library or framework is a pain in the ass (e.g. this small library I wrote has more lines for defining and validating the types than it has lines of actual logic). But if you ever find yourself using any or ts-ignore in application code, that shouldn't be a hint that TypeScript is wrong. That's a hint that you've done something wrong and rather than identifying the bug, you're obfuscating it for the future
Check out VSCode's repo on GitHub. Without strict typing, it just wouldn't be realistic to navigate code at this scale. I would also argue that not using TypeScript will change the way you write JavaScript so that it remains readable as JavaScript, e.g. you'll avoid using deeply nested objects because without types that kind of thing becomes a rats nest but with types that complexity difference is irrelevant.
I just wrote a StringEnum class and every new stringEnum class is a subclass of it. It's similar to this one though I wrote mine before I ran across it.