For every type used in your schema a TypeScript definition is automatically generated. They are all bundled in the Page namespace.

The example schema below:

  BlogOverview: alinea.type('Blog overview', {
    title: alinea.text('Title'),
    path: alinea.path('Path')
    isContainer: true,
    contains: ['BlogPost']
  BlogPost: alinea.type('Blog post', {
    title: alinea.text('Title'),
    path: alinea.path('Path'),
    publishDate: alinea.date('Publish date'),
    body: alinea.richText('Body')

Will have the following types available:

import {Entry, TextDoc} from '@aline/core'
export namespace Page {
  export interface BlogOverview extends Entry {
    type: "BlogOverview"
    title: string
    path: string
  export interface BlogPost extends Entry {
    type: "BlogPost"
    title: string
    path: string
    publishDate: string
    body: TextDoc  
export type Page = 
  | Page.BlogOverview
  | Page.BlogPost

Which can be imported from the content package.

import {Page} from '@alinea/content'