Skip to main content

Module index

Module index 

Source
Expand description

Top-level entry emission: index.js + index.d.ts that re-export every collection’s <name>.json.

Two .d.ts modes:

  • Velite-style (config is .ts/.js/.mjs): re-import the user’s config, infer record types via typeof import(..)['collections'].
  • Self-contained (TOML / no config): per-collection TS interface from schema = { ... }, else the generic DocRecord shape.

Functions§

write_index
Pick the right .d.ts mode and write index.js + index.d.ts.