Package: effect
Module: SchemaGetter
Decodes a URLSearchParams object into a nested tree structure using bracket-path notation.
When to use
Use when you need a schema getter to parse query parameters from URLs into structured objects.
Details
The getter is pure and never fails. It interprets bracket-path keys such as
user[name] and items[0] to build nested objects or arrays, and each leaf
value is a string.
Example (Decoding URLSearchParams)
import { SchemaGetter } from "effect"
const decode = SchemaGetter.decodeURLSearchParams()
// Getter<TreeObject<string>, URLSearchParams>
See
encodeURLSearchParams for the corresponding encodermakeTreeRecord for the underlying bracket-path parserdecodeFormData for the FormData variantSignature
declare const decodeURLSearchParams: () => Getter<Schema.TreeRecord<string>, URLSearchParams>
Since v4.0.0