Skip to content

schema

Import from @varavel/vdl-plugin-sdk/testing.

function schema(overrides?): IrSchema;

Creates an IrSchema with empty collections.

Pass overrides to populate constants, enums, types, or docs.

Parameters

Parameter Type Description
overrides Partial\<IrSchema> Schema fields to override.

Returns

IrSchema

An IrSchema with sensible defaults.

Example

schema({
  types: [typeDef("UserId", primitiveType("string"))],
});
// returns a schema containing one typedef