type-alias / @typed/router/Path

OptionalSchemaField

An optional schema record key paired with its Effect Schema.

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

Import

import type { OptionalSchemaField } from "@typed/router/Path";

Signatures

export type OptionalSchemaField = readonly [
    Schema.Record.Key,
    Schema.Top
];

Why

Optional route parameters preserve Effect Schema’s optional-key semantics.

Ownership and lifetime

OptionalSchemaField is a readonly structural contract. The concrete arrays, AST nodes, names, and Schemas remain owned by the caller that constructs them.

Source