variable / @typed/id

Ksuid

Effect Schema and branded string type for 27-character KSUID values.

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

Import

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

Signatures

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

Why

The schema validates transported values before restoring the compile-time brand; lexical time ordering is not a global generation-order guarantee.

Ownership and lifetime

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

Examples

import { Ksuid } from "@typed/id/Ksuid"
import { Schema } from "effect"
const id = Schema.decodeUnknownSync(Ksuid)("0ujtsYcgvSTl8PAuAdqWYSMnLOv")

Other public imports

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

Source