Skip to content

@pcvl/schema / StandaloneMarker

Type Alias: StandaloneMarker ​

ts
type StandaloneMarker = object;

Defined in: schemas/schema.ts:128

The type-only marker .standalone() adds to a schema's type: an object keeps a field carrying it in its shape.

Example ​

ts
import { pvl, type StandaloneMarker } from '@pcvl/schema';

const email = pvl.string().standalone();
const isMarked: typeof email extends StandaloneMarker ? true : false = true;