variable / @typed/id/Uuid7

uuid7

Generates one UUID version 7 from the current Uuid7State.

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

Import

import { uuid7 } from "@typed/id/Uuid7";

Signatures

export declare const uuid7: Effect.Effect<Uuid7, Cause.IllegalArgumentError, Uuid7State>;

Why

Effectful generation makes the state boundary explicit and preserves IllegalArgumentError for invalid or exhausted timestamp space.

Ownership and lifetime

The Effect acquires no persistent resource and uses state owned by the provided Uuid7State Layer.

Examples

import { uuid7, Uuid7State } from "@typed/id/Uuid7"
import { Effect } from "effect"
const id = Effect.provide(uuid7, Uuid7State.Default)

Other public imports

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

Source