{"repo":"google/schema-dts","free":true,"listed":false,"github":"https://github.com/google/schema-dts","clone":"git clone https://github.com/google/schema-dts.git","description":"JSON-LD TypeScript types for Schema.org vocabulary","language":"TypeScript","stars":1235,"topics":["semantic-web","json-ld","linked-data","typescript","typescript-definitions","knowledge-graph","ontology","schema-org","schemaorg"],"license":"Apache-2.0","category":"cli-tools","readme_excerpt":"schema-dts JSON-LD TypeScript types for Schema.org vocabulary. schema-dts provides TypeScript definitions for Schema.org vocabulary in JSON-LD format. The typings are exposed as complete sets of discriminated type unions, allowing for easy completions and stricter validation. This repository contains two NPM packages: - schema-dts-gen Providing a command-line tool to generate TypeScript files based on a specific Schema version and layer. - schema-dts Pre-packaged TypeScript typings of latest Schema.org schema, without pending and other non-core layers. Note: This is not an officially supported Google product. Usage To use the typings for your project, simply add the schema-dts NPM package to your project: Then you can use it by importing \"schema-dts\" . Root context You will usually want your top-level item to include a @context , like https://schema.org . In order for your object type to accept this property, you can augment it with WithContext , e.g.: Merging multiple concrete types Some Schema.org objects can legitimately carry multiple concrete @type values. For those advanced cases, schema-dts exports leaf types alongside the usual union aliases, plus a MergeLeafTypes helper for combining them: MergeLeafTypes expects concrete leaf types such as ProductLeaf , not union aliases such as Product . Graphs and IDs JSON-LD supports '@graph' objects that have richer interconnected links between the nodes. You can do that easily in schema-dts by using the Graph type. Notice that a","default_branch":null,"files":null,"tree":[],"storefront":"/r/google","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/google/schema-dts/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}