variable / @typed/id/Cuid

Cuid

Effect Schema and branded string type for 24-character CUID values.

Package version
1.0.0-beta.7
Category
ID schemas
Since
1.0.0

Import

import { Cuid } from "@typed/id/Cuid";

Signatures

export declare const Cuid: Schema.brand<Schema.String, "@typed/id/CUID">;
export type Cuid = Schema.Schema.Type<typeof Cuid>;

Why

The schema validates transport or persisted strings before restoring the compile-time brand; generating a new client ID is not hydration identity.

Ownership and lifetime

This module-level schema value acquires no resources and is shared; no runtime freezing guarantee is implied.

Examples

import { Cuid } from "@typed/id/Cuid"
const id = Cuid.make("a00000000000000000000000")

See Effect Schema.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source