The project provides a comprehensive set of TypeScript typings based on the Schema vocabulary, enabling developers to author JSON-LD structured data with strong type safety. It supplies both high-level discriminated unions and helper types to model contexts, graphs, and linked data relationships with clarity and accuracy. Usage examples demonstrate how one can import types like Person, WithContext, or Graph and compose JSON-LD objects in a way that aligns with semantic-web and knowledge-graph practices. The repository also contains a generator tool that can pull ontology definitions and emit TypeScript definitions in bulk, ensuring the typings stay up to date and maintain consistency. It supports scenarios such as nested objects, graphs of entities, and action types with input/output constraints, which makes it suitable for rich metadata authoring and linked-data workflows. While it is maintained by Google, it is not an officially supported Google product.

Features

  • Provides TypeScript typings for the complete Schema vocabulary in JSON-LD format
  • Supports discriminated type unions for better IntelliSense and strict validation
  • Includes WithContext and Graph utilities for structured data with @context and @graph
  • Supports input/output constraints via WithActionConstraints for action annotations
  • Offers a CLI generator (schema-dts-gen) to build custom typings from any Schema ontology
  • Enables schema validation at compile time, reducing markup errors in structured data

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

Apache License V2.0

Follow Schema.DTS

Schema.DTS Web Site

You Might Also Like
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Schema.DTS!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

JavaScript, TypeScript

Related Categories

JavaScript Libraries, TypeScript Libraries

Registered

2025-10-11