Schema.org DataType in TypeScript: Structural Typing Doesn't Cut It
JSON-LD Logo in Public Domain.Schema.org has a concept of a DataType, things like Text, Number, Date,
etc. In JSON-LD, we represent these as strings or numbers, rather than array or
object literals. This data could describe the name of a Person, a check-in
date and time for a LodgingReservation, a URL of a Corporation, publication
date of an Article, etc. As we’ll see, the Schema.org DataType hierarchy is
far richer than TypeScript’s type system can accommodate. In this article, we’ll
go over the DataType hierarchy and explore how much type checking we can
provide.
Read more →


Photo by Blake Connally