-
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.
At this point TS is trying to keep runtime syntax in line with TC-39 (the language committee in charge of JS) proposals that reach Stage 3 (and thus likely to reach Stage 4 and general acceptance/use in the browser).
There is currently a Stage 1 proposal for a pattern matching syntax presented to TC-39. If it reaches Stage 3 then it is presumed likely Typescript will implement it.
https://github.com/tc39/proposal-pattern-matching
Declarations: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/9d56...
In the case of a widely used library, generics make sense at scale. It's reused and components revolve around the shape of props. Not to mention, DefinitelyTyped's superb community, continuous integration and maintainers around the globe.
Microsoft keeps pushing open source forward in so many ways.
Anyway - Outside of that, I've come to eschew writing new generic internally. The reason why is complexity not being worth the trade.
Related posts
-
Declaring JSX types in TypeScript 5.1
-
Functional Programming with TypeScript's Type System
-
TypeScript PR merged to allow components to return anything renderable (raw strings, numbers, promises for RSC), instead of just JSX.Element and null.
-
Thinking in ReScript
-
Merging to objects in a type-safe way with Lodash?