Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

schema-dsl examples

This directory contains TypeScript examples referenced in the documentation. Examples are built against the current TypeScript build output or the published package schema-dsl.

  • examples/docs/*.ts: Documentation example entry points. Most files map to docs/*.md; a few standalone scenario examples, such as object-dsl-builder.ts and real-world.ts, exercise public APIs that are referenced across multiple docs. custom-extensions-guide.ts is kept as an advanced compatibility scenario; the current primary custom-extension companion example is custom-extensions.ts.

Documentation examples are part of the public contract. When a document changes, its matching example must be updated in the same change unless the report explicitly records why no code sample is needed. Examples should show realistic success, failure, boundary, and output paths for the documented feature; a minimal smoke demo is not enough for long-form guides or API reference pages.

Type-check all examples:

npm run examples:typecheck

Build and run every documentation example:

npm run examples:run

Build and run a single example:

npm run examples:build
node .tmp/docs/quick-start.js