Schema.org Classes in TypeScript: Properties and Special Cases
JSON-LD Logo in Public Domain.In our quest to model Schema.org classes in TypeScript, we’ve so far managed to
model the
type hierarchy,
scalarDataType
values,
and enums. The big piece that
remains, however, is representing what’s actually inside of the class: it’s
properties.
After all, what it means for a JSON-LD literal to have "@type"
equal to
"Person"
is that certain properties — e.g. "birthPlace"
or "birthDate"
,
among others — can be expected to be present on the literal. More than their
potential presence, Schema.org defines a meaning for these properties, and the
range of types their values could hold.