ChatiumFor developersPlaygroundPricing
Sign in

Heap.Null

Declares a field of type null.

It is practically useful only in combination with Heap.Union.

Usage / Signature

import { Heap } from '@app/heap'
Heap.Null()

Return Value

JSON Schema for a null field.

Examples

Union Schema with Null Alternative
const customers = Heap.Table('customers', {
  comment: Heap.Union(
    [
      Heap.String(),
      Heap.Null(),
    ],
    { default: null },
  ),
})