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

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

606 Views

Recently, I published schema-dts ( npm, GitHub), an open source library that models JSON-LD Schema.org 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 Schema.org-conformant JSON-LD looks like, while also providing ergonomic completions to the developer.


0 comments