Modeling Schema with TypeScript: The Power and Limitations of the TypeScript Type System

added by JavaScript Kicks
5/10/2019 8:37:16 AM


Recently, I published schema-dts ( npm, GitHub), an open source library that models JSON-LD in TypeScript. A big reason I wanted to do this project is because I knew some of TypeScript's features, such as discriminated type unions, powerful type inference, nullability checking, and type intersections, present an opportunity to both model what JSON-LD looks like, while also providing ergonomic completions to the developer.