diff --git a/.opencode/node_modules/effect/dist/Graph.d.ts.map b/.opencode/node_modules/effect/dist/Graph.d.ts.map index 1061d29f51547a00ba6c1b223db32603927bfa80..a6c488fdb23dd9773dac0d995d65470f386cd582 100644 --- a/.opencode/node_modules/effect/dist/Graph.d.ts.map +++ b/.opencode/node_modules/effect/dist/Graph.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Graph.d.ts","sourceRoot":"","sources":["../src/Graph.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAGnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAK7C,QAAA,MAAM,MAAM,8BAA8B,CAAA;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAE9B;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAE9B;;;;;GAKG;AACH,qBAAa,IAAI,CAAC,CAAC,CAAE,SAAQ,IAAI,CAAC,KAAK,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;CACjB,CAAC;CAAG;AAEL;;;;;GAKG;AACH,MAAM,MAAM,IAAI,GAAG,UAAU,GAAG,YAAY,CAAA;AAE5C;;;;;GAKG;AACH,MAAM,WAAW,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAE,SAAQ,QAAQ,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW;IAChH,QAAQ,C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IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAA;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,SAAS,EAAE;IACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,IAAI,GAAG,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAAA;IAC/H;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,IAAI,GAAG,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,UAAU,CAAC,CAAC,CAAC,CAAA;CAmC3H,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Graph.js b/.opencode/node_modules/effect/dist/Graph.js index 6910ad202d9dfd816752b166182629634d64183f..b6e1e13313c8ea3e80b1b8efb871cf150a30bddb 100644 --- a/.opencode/node_modules/effect/dist/Graph.js +++ b/.opencode/node_modules/effect/dist/Graph.js @@ -1,4 +1,11 @@ /** + * Models relationships between indexed nodes and edges. + * + * This module provides immutable and scoped-mutable graph data structures. A + * graph can be directed or undirected, and it can store user-defined data on + * both nodes and edges. The module includes traversal, analysis, path-finding, + * transformation, and diagram export utilities. + * * @since 4.0.0 */ import * as Data from "./Data.js"; @@ -11,10 +18,19 @@ import { pipeArguments } from "./Pipeable.js"; import { hasProperty } from "./Predicate.js"; const TypeId = "~effect/collections/Graph"; /** - * Edge data containing source, target, and user data. + * Represents edge data containing source, target, and user data. + * + * **When to use** + * + * Use as the graph edge value that carries source node, target node, and stored + * edge data together. + * + * @see {@link getEdge} for reading a single edge by identifier + * @see {@link addEdge} for adding edges to a graph + * @see {@link edges} for iterating graph edges * - * @since 4.0.0 * @category models + * @since 3.18.0 */ export class Edge extends Data.Class {} // ============================================================================= @@ -91,8 +107,17 @@ const ProtoGraph = { // ============================================================================= // TODO: Do we need safe variants for these? /** - * @since 4.0.0 + * Error thrown by graph operations when the requested graph structure is + * invalid, such as referencing a missing node or using unsupported edge + * weights. + * + * **When to use** + * + * Use when handling failures thrown by graph operations that reject invalid + * graph structure or unsupported algorithm inputs. + * * @category errors + * @since 3.18.0 */ export class GraphError extends /*#__PURE__*/Data.TaggedError("GraphError") {} /** @internal */ @@ -103,14 +128,27 @@ const missingNode = node => new GraphError({ // Constructors // ============================================================================= /** + * Returns `true` if a value has the graph runtime type identifier, narrowing + * it to a `Graph`. + * + * **When to use** + * + * Use to narrow an unknown value before treating it as a graph value. + * + * **Gotchas** + * + * This guard checks the shared graph runtime type identifier and does not + * distinguish immutable graphs from mutable graphs. + * + * @category guards * @since 4.0.0 - * @category Guards */ export const isGraph = u => hasProperty(u, TypeId); /** * Creates a directed graph, optionally with initial mutations. * - * @example + * **Example** (Creating a directed graph) + * * ```ts * import { Graph } from "effect" * @@ -124,8 +162,8 @@ export const isGraph = u => hasProperty(u, TypeId); * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 3.18.0 */ export const directed = mutate => { const graph = Object.create(ProtoGraph); @@ -148,7 +186,8 @@ export const directed = mutate => { /** * Creates an undirected graph, optionally with initial mutations. * - * @example + * **Example** (Creating an undirected graph) + * * ```ts * import { Graph } from "effect" * @@ -162,8 +201,8 @@ export const directed = mutate => { * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 3.18.0 */ export const undirected = mutate => { const graph = Object.create(ProtoGraph); @@ -189,7 +228,8 @@ export const undirected = mutate => { /** * Creates a mutable scope for safe graph mutations by copying the data structure. * - * @example + * **Example** (Beginning a mutation scope) + * * ```ts * import { Graph } from "effect" * @@ -198,8 +238,8 @@ export const undirected = mutate => { * // Now mutable can be safely modified without affecting original graph * ``` * - * @since 4.0.0 * @category mutations + * @since 3.18.0 */ export const beginMutation = graph => { // Copy adjacency maps with deep cloned arrays @@ -226,7 +266,8 @@ export const beginMutation = graph => { /** * Converts a mutable graph back to an immutable graph, ending the mutation scope. * - * @example + * **Example** (Ending a mutation scope) + * * ```ts * import { Graph } from "effect" * @@ -236,8 +277,8 @@ export const beginMutation = graph => { * const newGraph = Graph.endMutation(mutable) * ``` * - * @since 4.0.0 * @category mutations + * @since 3.18.0 */ export const endMutation = mutable => { const graph = Object.create(ProtoGraph); @@ -255,19 +296,24 @@ export const endMutation = mutable => { /** * Performs scoped mutations on a graph, automatically managing the mutation lifecycle. * - * @example + * **Example** (Applying scoped mutations) + * * ```ts * import { Graph } from "effect" * * const graph = Graph.directed() * const newGraph = Graph.mutate(graph, (mutable) => { - * // Safe mutations go here - * // mutable gets automatically converted back to immutable + * const nodeA = Graph.addNode(mutable, "A") + * const nodeB = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, nodeA, nodeB, 1) * }) + * + * console.log(Graph.nodeCount(newGraph)) // 2 + * console.log(Graph.edgeCount(newGraph)) // 1 * ``` * - * @since 4.0.0 * @category mutations + * @since 3.18.0 */ export const mutate = /*#__PURE__*/dual(2, (graph, f) => { const mutable = beginMutation(graph); @@ -280,7 +326,23 @@ export const mutate = /*#__PURE__*/dual(2, (graph, f) => { /** * Adds a new node to a mutable graph and returns its index. * - * @example + * **When to use** + * + * Use to allocate a new node in a mutable graph before storing edges or + * querying it by index. + * + * **Details** + * + * The returned index is allocated from the graph's next node index. The mutable + * graph stores the node data and initializes empty incoming and outgoing edge + * indexes for the new node. + * + * **Gotchas** + * + * `NodeIndex` values are identifiers and are not reused after removals. + * + * **Example** (Adding nodes) + * * ```ts * import { Graph } from "effect" * @@ -292,8 +354,12 @@ export const mutate = /*#__PURE__*/dual(2, (graph, f) => { * }) * ``` * - * @since 4.0.0 + * @see {@link mutate} for obtaining a mutable graph from an immutable graph + * @see {@link addEdge} for connecting existing nodes + * @see {@link removeNode} for removing nodes from a mutable graph + * * @category mutations + * @since 3.18.0 */ export const addNode = (mutable, data) => { const nodeIndex = mutable.nextNodeIndex; @@ -307,12 +373,12 @@ export const addNode = (mutable, data) => { return nodeIndex; }; /** - * Gets the data associated with a node index, if it exists. + * Gets the data associated with a node index safely, if it exists. + * + * **Example** (Getting node data) * - * @example * ```ts - * import { Graph } from "effect" - * import * as Option from "effect/Option" + * import { Graph, Option } from "effect" * * const graph = Graph.mutate(Graph.directed(), (mutable) => { * Graph.addNode(mutable, "Node A") @@ -326,14 +392,15 @@ export const addNode = (mutable, data) => { * } * ``` * - * @since 4.0.0 * @category getters + * @since 3.18.0 */ export const getNode = /*#__PURE__*/dual(2, (graph, nodeIndex) => graph.nodes.has(nodeIndex) ? Option.some(graph.nodes.get(nodeIndex)) : Option.none()); /** - * Checks if a node with the given index exists in the graph. + * Checks whether a node with the given index exists in the graph. + * + * **Example** (Checking node existence) * - * @example * ```ts * import { Graph } from "effect" * @@ -350,14 +417,15 @@ export const getNode = /*#__PURE__*/dual(2, (graph, nodeIndex) => graph.nodes.ha * console.log(notExists) // false * ``` * - * @since 4.0.0 * @category getters + * @since 3.18.0 */ export const hasNode = /*#__PURE__*/dual(2, (graph, nodeIndex) => graph.nodes.has(nodeIndex)); /** * Returns the number of nodes in the graph. * - * @example + * **Example** (Counting nodes) + * * ```ts * import { Graph } from "effect" * @@ -373,14 +441,15 @@ export const hasNode = /*#__PURE__*/dual(2, (graph, nodeIndex) => graph.nodes.ha * console.log(Graph.nodeCount(graphWithNodes)) // 3 * ``` * - * @since 4.0.0 * @category getters + * @since 3.18.0 */ export const nodeCount = graph => graph.nodes.size; /** * Finds the first node that matches the given predicate. * - * @example + * **Example** (Finding the first matching node) + * * ```ts * import { Graph } from "effect" * @@ -397,8 +466,8 @@ export const nodeCount = graph => graph.nodes.size; * console.log(notFound) // Option.none() * ``` * - * @since 4.0.0 * @category getters + * @since 3.18.0 */ export const findNode = /*#__PURE__*/dual(2, (graph, predicate) => { for (const [index, data] of graph.nodes) { @@ -411,7 +480,8 @@ export const findNode = /*#__PURE__*/dual(2, (graph, predicate) => { /** * Finds all nodes that match the given predicate. * - * @example + * **Example** (Finding matching nodes) + * * ```ts * import { Graph } from "effect" * @@ -428,8 +498,8 @@ export const findNode = /*#__PURE__*/dual(2, (graph, predicate) => { * console.log(empty) // [] * ``` * - * @since 4.0.0 * @category getters + * @since 3.18.0 */ export const findNodes = /*#__PURE__*/dual(2, (graph, predicate) => { const results = []; @@ -443,7 +513,8 @@ export const findNodes = /*#__PURE__*/dual(2, (graph, predicate) => { /** * Finds the first edge that matches the given predicate. * - * @example + * **Example** (Finding the first matching edge) + * * ```ts * import { Graph } from "effect" * @@ -462,8 +533,8 @@ export const findNodes = /*#__PURE__*/dual(2, (graph, predicate) => { * console.log(notFound) // Option.none() * ``` * - * @since 4.0.0 * @category getters + * @since 3.18.0 */ export const findEdge = /*#__PURE__*/dual(2, (graph, predicate) => { for (const [edgeIndex, edgeData] of graph.edges) { @@ -476,7 +547,8 @@ export const findEdge = /*#__PURE__*/dual(2, (graph, predicate) => { /** * Finds all edges that match the given predicate. * - * @example + * **Example** (Finding matching edges) + * * ```ts * import { Graph } from "effect" * @@ -496,8 +568,8 @@ export const findEdge = /*#__PURE__*/dual(2, (graph, predicate) => { * console.log(empty) // [] * ``` * - * @since 4.0.0 * @category getters + * @since 3.18.0 */ export const findEdges = /*#__PURE__*/dual(2, (graph, predicate) => { const results = []; @@ -511,7 +583,8 @@ export const findEdges = /*#__PURE__*/dual(2, (graph, predicate) => { /** * Updates a single node's data by applying a transformation function. * - * @example + * **Example** (Updating node data) + * * ```ts * import { Graph } from "effect" * @@ -525,8 +598,8 @@ export const findEdges = /*#__PURE__*/dual(2, (graph, predicate) => { * console.log(nodeData) // Option.some("NODE A") * ``` * - * @since 4.0.0 - * @category transformations + * @category transforming + * @since 3.18.0 */ export const updateNode = (mutable, index, f) => { if (!mutable.nodes.has(index)) { @@ -539,7 +612,8 @@ export const updateNode = (mutable, index, f) => { /** * Updates a single edge's data by applying a transformation function. * - * @example + * **Example** (Updating edge data) + * * ```ts * import { Graph } from "effect" * @@ -551,11 +625,11 @@ export const updateNode = (mutable, index, f) => { * }) * * const edgeData = Graph.getEdge(result, 0) - * console.log(edgeData) // new Graph.Edge({ source: 0, target: 1, data: 20 }) + * console.log(edgeData) // Option.some(new Graph.Edge({ source: 0, target: 1, data: 20 })) * ``` * - * @since 4.0.0 * @category mutations + * @since 3.18.0 */ export const updateEdge = (mutable, edgeIndex, f) => { if (!mutable.edges.has(edgeIndex)) { @@ -569,9 +643,15 @@ export const updateEdge = (mutable, edgeIndex, f) => { })); }; /** - * Creates a new graph with transformed node data using the provided mapping function. + * Transforms every node's data in a mutable graph in place using the provided + * mapping function. + * + * **Details** + * + * Node indices and edges are preserved; only the stored node data is replaced. + * + * **Example** (Mapping node data) * - * @example * ```ts * import { Graph } from "effect" * @@ -583,11 +663,11 @@ export const updateEdge = (mutable, edgeIndex, f) => { * }) * * const nodeData = Graph.getNode(graph, 0) - * console.log(nodeData) // new Graph.Node("NODE A") + * console.log(nodeData) // Option.some("NODE A") * ``` * - * @since 4.0.0 - * @category transformations + * @category transforming + * @since 3.18.0 */ export const mapNodes = (mutable, f) => { // Transform existing node data in place @@ -599,7 +679,8 @@ export const mapNodes = (mutable, f) => { /** * Transforms all edge data in a mutable graph using the provided mapping function. * - * @example + * **Example** (Mapping edge data) + * * ```ts * import { Graph } from "effect" * @@ -613,11 +694,11 @@ export const mapNodes = (mutable, f) => { * }) * * const edgeData = Graph.getEdge(graph, 0) - * console.log(edgeData) // new Graph.Edge({ source: 0, target: 1, data: 20 }) + * console.log(edgeData) // Option.some(new Graph.Edge({ source: 0, target: 1, data: 20 })) * ``` * - * @since 4.0.0 - * @category transformations + * @category transforming + * @since 3.18.0 */ export const mapEdges = (mutable, f) => { // Transform existing edge data in place @@ -630,9 +711,29 @@ export const mapEdges = (mutable, f) => { } }; /** - * Reverses all edge directions in a mutable graph by swapping source and target nodes. + * @internal + */ +const rebuildAdjacency = mutable => { + mutable.adjacency.clear(); + mutable.reverseAdjacency.clear(); + for (const nodeIndex of mutable.nodes.keys()) { + mutable.adjacency.set(nodeIndex, []); + mutable.reverseAdjacency.set(nodeIndex, []); + } + for (const [edgeIndex, edgeData] of mutable.edges) { + mutable.adjacency.get(edgeData.source).push(edgeIndex); + mutable.reverseAdjacency.get(edgeData.target).push(edgeIndex); + if (mutable.type === "undirected") { + mutable.adjacency.get(edgeData.target).push(edgeIndex); + mutable.reverseAdjacency.get(edgeData.source).push(edgeIndex); + } + } +}; +/** + * Swaps source and target nodes for every edge in a mutable graph. + * + * **Example** (Reversing edge directions) * - * @example * ```ts * import { Graph } from "effect" * @@ -646,13 +747,16 @@ export const mapEdges = (mutable, f) => { * }) * * const edge0 = Graph.getEdge(graph, 0) - * console.log(edge0) // new Graph.Edge({ source: 1, target: 0, data: 1 }) - B -> A + * console.log(edge0) // Option.some(new Graph.Edge({ source: 1, target: 0, data: 1 })) * ``` * - * @since 4.0.0 - * @category transformations + * @category transforming + * @since 3.18.0 */ export const reverse = mutable => { + if (mutable.type === "undirected") { + return; + } // Reverse all edges by swapping source and target for (const [index, edgeData] of mutable.edges) { mutable.edges.set(index, new Edge({ @@ -661,20 +765,7 @@ export const reverse = mutable => { data: edgeData.data })); } - // Clear and rebuild adjacency lists with reversed directions - mutable.adjacency.clear(); - mutable.reverseAdjacency.clear(); - // Rebuild adjacency lists with reversed directions - for (const [edgeIndex, edgeData] of mutable.edges) { - // Add to forward adjacency (source -> target) - const sourceEdges = mutable.adjacency.get(edgeData.source) || []; - sourceEdges.push(edgeIndex); - mutable.adjacency.set(edgeData.source, sourceEdges); - // Add to reverse adjacency (target <- source) - const targetEdges = mutable.reverseAdjacency.get(edgeData.target) || []; - targetEdges.push(edgeIndex); - mutable.reverseAdjacency.set(edgeData.target, targetEdges); - } + rebuildAdjacency(mutable); // Invalidate cycle flag since edge directions changed mutable.acyclic = Option.none(); }; @@ -682,10 +773,10 @@ export const reverse = mutable => { * Filters and optionally transforms nodes in a mutable graph using a predicate function. * Nodes that return Option.none are removed along with all their connected edges. * - * @example + * **Example** (Filtering and mapping nodes) + * * ```ts - * import { Graph } from "effect" - * import * as Option from "effect/Option" + * import { Graph, Option } from "effect" * * const graph = Graph.directed((mutable) => { * const a = Graph.addNode(mutable, "active") @@ -705,8 +796,8 @@ export const reverse = mutable => { * console.log(Graph.nodeCount(graph)) // 2 (only "active" nodes remain) * ``` * - * @since 4.0.0 - * @category transformations + * @category transforming + * @since 3.18.0 */ export const filterMapNodes = (mutable, f) => { const nodesToRemove = []; @@ -730,10 +821,10 @@ export const filterMapNodes = (mutable, f) => { * Filters and optionally transforms edges in a mutable graph using a predicate function. * Edges that return Option.none are removed from the graph. * - * @example + * **Example** (Filtering and mapping edges) + * * ```ts - * import { Graph } from "effect" - * import * as Option from "effect/Option" + * import { Graph, Option } from "effect" * * const graph = Graph.directed((mutable) => { * const a = Graph.addNode(mutable, "A") @@ -753,8 +844,8 @@ export const filterMapNodes = (mutable, f) => { * console.log(Graph.edgeCount(graph)) // 2 (edges with weight 5 removed) * ``` * - * @since 4.0.0 - * @category transformations + * @category transforming + * @since 3.18.0 */ export const filterMapEdges = (mutable, f) => { const edgesToRemove = []; @@ -781,7 +872,8 @@ export const filterMapEdges = (mutable, f) => { * Filters nodes by removing those that don't match the predicate. * This function modifies the mutable graph in place. * - * @example + * **Example** (Filtering nodes) + * * ```ts * import { Graph } from "effect" * @@ -798,8 +890,8 @@ export const filterMapEdges = (mutable, f) => { * console.log(Graph.nodeCount(graph)) // 2 (only "active" nodes remain) * ``` * - * @since 4.0.0 - * @category transformations + * @category transforming + * @since 3.18.0 */ export const filterNodes = (mutable, predicate) => { const nodesToRemove = []; @@ -818,7 +910,8 @@ export const filterNodes = (mutable, predicate) => { * Filters edges by removing those that don't match the predicate. * This function modifies the mutable graph in place. * - * @example + * **Example** (Filtering edges) + * * ```ts * import { Graph } from "effect" * @@ -838,8 +931,8 @@ export const filterNodes = (mutable, predicate) => { * console.log(Graph.edgeCount(graph)) // 2 (edge with weight 5 removed) * ``` * - * @since 4.0.0 - * @category transformations + * @category transforming + * @since 3.18.0 */ export const filterEdges = (mutable, predicate) => { const edgesToRemove = []; @@ -877,7 +970,24 @@ const invalidateCycleFlagOnAddition = mutable => { /** * Adds a new edge to a mutable graph and returns its index. * - * @example + * **When to use** + * + * Use to connect two existing nodes in a mutable graph while storing edge data + * and receiving the new edge identifier. + * + * **Details** + * + * Creates an `Edge` with the source, target, and data at the next edge index, + * updates adjacency indexes, and increments the graph's next edge index. + * Undirected graphs register the same edge for both endpoints. + * + * **Gotchas** + * + * The source and target nodes must already exist in the mutable graph; missing + * endpoints throw a `GraphError`. + * + * **Example** (Adding edges) + * * ```ts * import { Graph } from "effect" * @@ -889,8 +999,13 @@ const invalidateCycleFlagOnAddition = mutable => { * }) * ``` * - * @since 4.0.0 + * @see {@link mutate} for obtaining a mutable graph from an immutable graph + * @see {@link addNode} for creating node indexes before connecting them + * @see {@link getEdge} for reading the returned edge + * @see {@link removeEdge} for removing an edge from a mutable graph + * * @category mutations + * @since 3.18.0 */ export const addEdge = (mutable, source, target, data) => { // Validate that both nodes exist @@ -938,7 +1053,8 @@ export const addEdge = (mutable, source, target, data) => { /** * Removes a node and all its incident edges from a mutable graph. * - * @example + * **Example** (Removing a node) + * * ```ts * import { Graph } from "effect" * @@ -952,8 +1068,8 @@ export const addEdge = (mutable, source, target, data) => { * }) * ``` * - * @since 4.0.0 * @category mutations + * @since 3.18.0 */ export const removeNode = (mutable, nodeIndex) => { // Check if node exists @@ -991,7 +1107,8 @@ export const removeNode = (mutable, nodeIndex) => { /** * Removes an edge from a mutable graph. * - * @example + * **Example** (Removing an edge) + * * ```ts * import { Graph } from "effect" * @@ -1005,8 +1122,8 @@ export const removeNode = (mutable, nodeIndex) => { * }) * ``` * - * @since 4.0.0 * @category mutations + * @since 3.18.0 */ export const removeEdge = (mutable, edgeIndex) => { const wasRemoved = removeEdgeInternal(mutable, edgeIndex); @@ -1067,9 +1184,10 @@ const removeEdgeInternal = (mutable, edgeIndex) => { // Edge Query Operations // ============================================================================= /** - * Gets the edge data associated with an edge index, if it exists. + * Gets the edge data associated with an edge index safely, if it exists. + * + * **Example** (Getting edge data) * - * @example * ```ts * import { Graph } from "effect" * @@ -1084,19 +1202,20 @@ const removeEdgeInternal = (mutable, edgeIndex) => { * * if (edgeData._tag === "Some") { * console.log(edgeData.value.data) // 42 - * console.log(edgeData.value.source) // NodeIndex(0) - * console.log(edgeData.value.target) // NodeIndex(1) + * console.log(edgeData.value.source) // 0 + * console.log(edgeData.value.target) // 1 * } * ``` * - * @since 4.0.0 * @category getters + * @since 3.18.0 */ export const getEdge = /*#__PURE__*/dual(2, (graph, edgeIndex) => Option.fromUndefinedOr(graph.edges.get(edgeIndex))); /** - * Checks if an edge exists between two nodes in the graph. + * Checks whether an edge exists between two nodes in the graph. + * + * **Example** (Checking edge existence) * - * @example * ```ts * import { Graph } from "effect" * @@ -1118,8 +1237,8 @@ export const getEdge = /*#__PURE__*/dual(2, (graph, edgeIndex) => Option.fromUnd * console.log(hasAC) // false * ``` * - * @since 4.0.0 * @category getters + * @since 3.18.0 */ export const hasEdge = /*#__PURE__*/dual(3, (graph, source, target) => { const adjacencyList = graph.adjacency.get(source); @@ -1129,8 +1248,11 @@ export const hasEdge = /*#__PURE__*/dual(3, (graph, source, target) => { // Check if any edge in the adjacency list connects to the target for (const edgeIndex of adjacencyList) { const edge = graph.edges.get(edgeIndex); - if (edge !== undefined && edge.target === target) { - return true; + if (edge !== undefined) { + const neighbor = graph.type === "undirected" && edge.target === source ? edge.source : edge.target; + if (neighbor === target) { + return true; + } } } return false; @@ -1138,7 +1260,8 @@ export const hasEdge = /*#__PURE__*/dual(3, (graph, source, target) => { /** * Returns the number of edges in the graph. * - * @example + * **Example** (Counting edges) + * * ```ts * import { Graph } from "effect" * @@ -1157,14 +1280,35 @@ export const hasEdge = /*#__PURE__*/dual(3, (graph, source, target) => { * console.log(Graph.edgeCount(graphWithEdges)) // 3 * ``` * - * @since 4.0.0 * @category getters + * @since 3.18.0 */ export const edgeCount = graph => graph.edges.size; +const getDirectedNeighbors = (graph, nodeIndex, direction) => { + const adjacencyMap = direction === "incoming" ? graph.reverseAdjacency : graph.adjacency; + const adjacencyList = adjacencyMap.get(nodeIndex); + if (adjacencyList === undefined) { + return []; + } + const result = []; + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + result.push(direction === "incoming" ? edge.source : edge.target); + } + } + return result; +}; /** - * Returns the neighboring nodes (targets of outgoing edges) for a given node. + * Returns the neighboring node indices for a node. + * + * **Details** + * + * For directed graphs, neighbors are the targets of outgoing edges. For + * undirected graphs, neighbors are the other endpoints of incident edges. + * + * **Example** (Getting outgoing neighbors) * - * @example * ```ts * import { Graph } from "effect" * @@ -1181,37 +1325,88 @@ export const edgeCount = graph => graph.edges.size; * const nodeC = 2 * * const neighborsA = Graph.neighbors(graph, nodeA) - * console.log(neighborsA) // [NodeIndex(1), NodeIndex(2)] + * console.log(neighborsA) // [1, 2] * * const neighborsB = Graph.neighbors(graph, nodeB) * console.log(neighborsB) // [] * ``` * - * @since 4.0.0 * @category getters + * @since 3.18.0 */ export const neighbors = /*#__PURE__*/dual(2, (graph, nodeIndex) => { // For undirected graphs, use the specialized helper that returns the other endpoint if (graph.type === "undirected") { return getUndirectedNeighbors(graph, nodeIndex); } - const adjacencyList = graph.adjacency.get(nodeIndex); - if (adjacencyList === undefined) { - return []; + return getDirectedNeighbors(graph, nodeIndex, "outgoing"); +}); +/** + * Returns the outgoing neighbor node indices for a node in a directed graph. + * + * **When to use** + * + * Use when you need the nodes reached by following outgoing edges from a node in + * a directed graph. + * + * **Gotchas** + * + * Throws a `GraphError` when used with an undirected graph. + * + * @see {@link predecessors} for incoming neighbors in a directed graph + * @see {@link neighbors} for generic neighbor lookup across graph kinds + * + * @category queries + * @since 4.0.0 + */ +export const successors = /*#__PURE__*/dual(2, (graph, nodeIndex) => { + if (graph.type === "undirected") { + throw new GraphError({ + message: "Cannot get successors of undirected graph" + }); } - const result = []; - for (const edgeIndex of adjacencyList) { - const edge = graph.edges.get(edgeIndex); - if (edge !== undefined) { - result.push(edge.target); - } + return getDirectedNeighbors(graph, nodeIndex, "outgoing"); +}); +/** + * Returns the incoming neighbor node indices for a node in a directed graph. + * + * **When to use** + * + * Use when you need the nodes that reach a node by following incoming edges in a + * directed graph. + * + * **Gotchas** + * + * Throws a `GraphError` when used with an undirected graph. + * + * @see {@link successors} for outgoing neighbors in a directed graph + * @see {@link neighbors} for generic neighbor lookup across graph kinds + * + * @category queries + * @since 4.0.0 + */ +export const predecessors = /*#__PURE__*/dual(2, (graph, nodeIndex) => { + if (graph.type === "undirected") { + throw new GraphError({ + message: "Cannot get predecessors of undirected graph" + }); } - return result; + return getDirectedNeighbors(graph, nodeIndex, "incoming"); }); /** - * Get neighbors of a node in a specific direction for bidirectional traversal. + * Gets directed neighbors of a node in a specific direction. + * + * **When to use** + * + * Use when maintaining existing code that already passes an explicit traversal + * direction. New code should prefer `successors` or `predecessors`. + * + * **Gotchas** + * + * Throws a `GraphError` when used with an undirected graph. + * + * **Example** (Traversing directed neighbors) * - * @example * ```ts * import { Graph } from "effect" * @@ -1231,30 +1426,25 @@ export const neighbors = /*#__PURE__*/dual(2, (graph, nodeIndex) => { * const incoming = Graph.neighborsDirected(graph, nodeB, "incoming") * ``` * - * @since 4.0.0 + * @deprecated Use {@link successors} for outgoing neighbors or {@link predecessors} for incoming neighbors. + * @see {@link successors} for outgoing neighbors in a directed graph + * @see {@link predecessors} for incoming neighbors in a directed graph * @category queries + * @since 3.18.0 */ export const neighborsDirected = /*#__PURE__*/dual(3, (graph, nodeIndex, direction) => { - const adjacencyMap = direction === "incoming" ? graph.reverseAdjacency : graph.adjacency; - const adjacencyList = adjacencyMap.get(nodeIndex); - if (adjacencyList === undefined) { - return []; - } - const result = []; - for (const edgeIndex of adjacencyList) { - const edge = graph.edges.get(edgeIndex); - if (edge !== undefined) { - // For incoming direction, we want the source node instead of target - const neighborNode = direction === "incoming" ? edge.source : edge.target; - result.push(neighborNode); - } + if (graph.type === "undirected") { + throw new GraphError({ + message: "Cannot get directed neighbors of undirected graph" + }); } - return result; + return getDirectedNeighbors(graph, nodeIndex, direction); }); /** * Exports a graph to GraphViz DOT format for visualization. * - * @example + * **Example** (Exporting GraphViz DOT) + * * ```ts * import { Graph } from "effect" * @@ -1279,8 +1469,8 @@ export const neighborsDirected = /*#__PURE__*/dual(3, (graph, nodeIndex, directi * // } * ``` * - * @since 4.0.0 - * @category utils + * @category converting + * @since 3.18.0 */ export const toGraphViz = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, options) => { const { @@ -1343,14 +1533,17 @@ const formatMermaidNode = (nodeId, label, shape) => { /** * Exports a graph to Mermaid diagram format for visualization. * + * **Details** + * * Mermaid is a popular diagram-as-code tool that generates flowcharts and other * visualizations from text-based definitions. This function converts Effect Graph * structures to valid Mermaid syntax for use in documentation, web applications, * and visualization tools. * - * @example + * **Example** (Exporting a directed Mermaid diagram) + * * ```ts - * import * as Graph from "effect/Graph" + * import { Graph } from "effect" * * // Basic directed graph export * const graph = Graph.directed((mutable) => { @@ -1371,9 +1564,10 @@ const formatMermaidNode = (nodeId, label, shape) => { * // 0 -->|"2"| 2 * ``` * - * @example + * **Example** (Exporting an undirected Mermaid diagram) + * * ```ts - * import * as Graph from "effect/Graph" + * import { Graph } from "effect" * * // Undirected graph with custom labels and direction * const socialGraph = Graph.undirected<{ name: string }, string>((mutable) => { @@ -1398,9 +1592,10 @@ const formatMermaidNode = (nodeId, label, shape) => { * // 1 ---|"colleagues"| 2 * ``` * - * @example + * **Example** (Customizing Mermaid node shapes) + * * ```ts - * import * as Graph from "effect/Graph" + * import { Graph } from "effect" * * // Advanced styling with node shapes for flowchart * const workflow = Graph.directed<{ type: string; name: string }, string>( @@ -1449,9 +1644,10 @@ const formatMermaidNode = (nodeId, label, shape) => { * // 2 --> 3 * ``` * - * @example + * **Example** (Visualizing dependency graphs) + * * ```ts - * import * as Graph from "effect/Graph" + * import { Graph } from "effect" * * // Real-world example: Software dependency graph * interface Dependency { @@ -1510,12 +1706,8 @@ const formatMermaidNode = (nodeId, label, shape) => { * // 0 -->|"builds with"| 3 * ``` * - * @param graph - The graph to export (directed or undirected) - * @param options - Optional configuration for the Mermaid output - * @returns Mermaid diagram syntax as a string - * - * @since 4.0.0 - * @category utils + * @category converting + * @since 3.18.0 */ export const toMermaid = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, options) => { // Extract and validate options with defaults @@ -1557,13 +1749,16 @@ export const toMermaid = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, opt // Graph Structure Analysis Algorithms // ============================================================================= /** - * Checks if the graph is acyclic (contains no cycles). + * Checks whether the graph is acyclic (contains no cycles). + * + * **Details** * * Uses depth-first search to detect back edges, which indicate cycles. * For directed graphs, any back edge creates a cycle. For undirected graphs, * a back edge that doesn't go to the immediate parent creates a cycle. * - * @example + * **Example** (Checking cycles) + * * ```ts * import { Graph } from "effect" * @@ -1587,14 +1782,48 @@ export const toMermaid = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, opt * console.log(Graph.isAcyclic(cyclic)) // false * ``` * - * @since 4.0.0 * @category algorithms + * @since 3.18.0 */ export const isAcyclic = graph => { // Use existing cycle flag if available if (Option.isSome(graph.acyclic)) { return graph.acyclic.value; } + if (graph.type === "undirected") { + const visited = new Set(); + for (const startNode of graph.nodes.keys()) { + if (visited.has(startNode)) { + continue; + } + visited.add(startNode); + const stack = [{ + node: startNode, + parent: null + }]; + while (stack.length > 0) { + const { + node, + parent + } = stack.pop(); + const nodeNeighbors = getUndirectedNeighbors(graph, node); + for (const neighbor of nodeNeighbors) { + if (!visited.has(neighbor)) { + visited.add(neighbor); + stack.push({ + node: neighbor, + parent: node + }); + } else if (neighbor !== parent) { + graph.acyclic = Option.some(false); + return false; + } + } + } + } + graph.acyclic = Option.some(true); + return true; + } // Stack-safe DFS cycle detection using iterative approach const visited = new Set(); const recursionStack = new Set(); @@ -1621,7 +1850,7 @@ export const isAcyclic = graph => { visited.add(node); recursionStack.add(node); // Get neighbors for this node - const nodeNeighbors = Array.from(neighborsDirected(graph, node, "outgoing")); + const nodeNeighbors = getDirectedNeighbors(graph, node, "outgoing"); stack[stack.length - 1] = [node, nodeNeighbors, 0, false]; continue; } @@ -1649,13 +1878,16 @@ export const isAcyclic = graph => { return true; }; /** - * Checks if an undirected graph is bipartite. + * Checks whether an undirected graph is bipartite. + * + * **Details** * * A bipartite graph is one whose vertices can be divided into two disjoint sets * such that no two vertices within the same set are adjacent. Uses BFS coloring * to determine bipartiteness. * - * @example + * **Example** (Checking bipartite graphs) + * * ```ts * import { Graph } from "effect" * @@ -1683,8 +1915,8 @@ export const isAcyclic = graph => { * console.log(Graph.isBipartite(triangle)) // false * ``` * - * @since 4.0.0 * @category algorithms + * @since 3.18.0 */ export const isBipartite = graph => { const coloring = new Map(); @@ -1746,11 +1978,14 @@ const getUndirectedNeighbors = (graph, nodeIndex) => { } return Array.from(neighbors); }; +const getTraversalNeighbors = (graph, nodeIndex, direction) => graph.type === "undirected" ? getUndirectedNeighbors(graph, nodeIndex) : getDirectedNeighbors(graph, nodeIndex, direction); +const getTraversableNeighbor = (graph, current, edge) => graph.type === "undirected" && edge.target === current ? edge.source : edge.target; /** - * Find connected components in an undirected graph. + * Finds connected components in an undirected graph. * Each component is represented as an array of node indices. * - * @example + * **Example** (Finding connected components) + * * ```ts * import { Graph } from "effect" * @@ -1767,8 +2002,8 @@ const getUndirectedNeighbors = (graph, nodeIndex) => { * console.log(components) // [[0, 1], [2, 3]] * ``` * - * @since 4.0.0 * @category algorithms + * @since 3.18.0 */ export const connectedComponents = graph => { const visited = new Set(); @@ -1798,10 +2033,15 @@ export const connectedComponents = graph => { return components; }; /** - * Find strongly connected components in a directed graph using Kosaraju's algorithm. + * Finds strongly connected components in a directed graph using Kosaraju's algorithm. * Each SCC is represented as an array of node indices. * - * @example + * **Gotchas** + * + * Throws a `GraphError` when used with an undirected graph. + * + * **Example** (Finding strongly connected components) + * * ```ts * import { Graph } from "effect" * @@ -1818,10 +2058,15 @@ export const connectedComponents = graph => { * console.log(sccs) // [[0, 1, 2]] * ``` * - * @since 4.0.0 * @category algorithms + * @since 3.18.0 */ export const stronglyConnectedComponents = graph => { + if (graph.type === "undirected") { + throw new GraphError({ + message: "Cannot find strongly connected components of undirected graph" + }); + } const visited = new Set(); const finishOrder = []; for (const startNode of graph.nodes.keys()) { @@ -1837,7 +2082,7 @@ export const stronglyConnectedComponents = graph => { continue; } visited.add(node); - const nodeNeighborsList = neighbors(graph, node); + const nodeNeighborsList = getDirectedNeighbors(graph, node, "outgoing"); stack[stack.length - 1] = [node, nodeNeighborsList, 0, false]; continue; } @@ -1890,13 +2135,31 @@ export const stronglyConnectedComponents = graph => { } return sccs; }; +const validateNonNegativeEdgeWeights = (graph, cost, algorithm) => { + const edgeWeights = new Map(); + for (const [edgeIndex, edgeData] of graph.edges) { + const weight = cost(edgeData.data); + if (weight < 0 || Number.isNaN(weight)) { + throw new GraphError({ + message: `${algorithm} requires non-negative edge weights` + }); + } + edgeWeights.set(edgeIndex, weight); + } + return edgeWeights; +}; /** - * Find the shortest path between two nodes using Dijkstra's algorithm. + * Finds the shortest path from the configured source node to the target node + * using Dijkstra's algorithm. + * + * **Details** + * + * Edge costs must be non-negative. Returns `Option.none()` when the target is + * not reachable, and throws a `GraphError` when either endpoint is missing or a + * negative edge cost is encountered. * - * Dijkstra's algorithm works with non-negative edge weights and finds the shortest - * path from a source node to a target node in O((V + E) log V) time complexity. + * **Example** (Finding shortest paths with Dijkstra) * - * @example * ```ts * import { Graph } from "effect" * @@ -1921,8 +2184,8 @@ export const stronglyConnectedComponents = graph => { * } * ``` * - * @since 4.0.0 * @category algorithms + * @since 3.18.0 */ export const dijkstra = /*#__PURE__*/dual(2, (graph, config) => { // Validate that source and target nodes exist @@ -1932,6 +2195,7 @@ export const dijkstra = /*#__PURE__*/dual(2, (graph, config) => { if (!graph.nodes.has(config.target)) { throw missingNode(config.target); } + const edgeWeights = validateNonNegativeEdgeWeights(graph, config.cost, "Dijkstra's algorithm"); // Early return if source equals target if (config.source === config.target) { return Option.some({ @@ -1982,14 +2246,8 @@ export const dijkstra = /*#__PURE__*/dual(2, (graph, config) => { for (const edgeIndex of adjacencyList) { const edge = graph.edges.get(edgeIndex); if (edge !== undefined) { - const neighbor = edge.target; - const cost = config.cost(edge.data); - // Validate non-negative weights - if (cost < 0) { - throw new GraphError({ - message: "Dijkstra's algorithm requires non-negative edge weights" - }); - } + const neighbor = getTraversableNeighbor(graph, currentNode, edge); + const cost = edgeWeights.get(edgeIndex); const newDistance = currentDistance + cost; const neighborDistance = distances.get(neighbor); // Relaxation step @@ -2037,14 +2295,17 @@ export const dijkstra = /*#__PURE__*/dual(2, (graph, config) => { }); }); /** - * Find shortest paths between all pairs of nodes using Floyd-Warshall algorithm. + * Finds shortest paths between all pairs of nodes using the Floyd-Warshall + * algorithm. * - * Floyd-Warshall algorithm computes shortest paths between all pairs of nodes in O(V³) time. - * It can handle negative edge weights and detect negative cycles. + * **Details** * - * Throws if a negative cycle is detected that affects the path to target. + * Computes distances, reconstructed node paths, and edge-data paths for every + * source and target pair in O(V^3) time. Negative edge weights are allowed, but + * a `GraphError` is thrown if any negative cycle is detected. + * + * **Example** (Finding all-pairs shortest paths) * - * @example * ```ts * import { Graph } from "effect" * @@ -2062,8 +2323,8 @@ export const dijkstra = /*#__PURE__*/dual(2, (graph, config) => { * const pathAToC = result.paths.get(0)?.get(2) // [0, 1, 2] * ``` * - * @since 4.0.0 * @category algorithms + * @since 3.18.0 */ export const floydWarshall = /*#__PURE__*/dual(2, (graph, cost) => { // Get all nodes for Floyd-Warshall algorithm (needs array for nested iteration) @@ -2095,6 +2356,14 @@ export const floydWarshall = /*#__PURE__*/dual(2, (graph, cost) => { next.get(i).set(j, j); edgeMatrix.get(i).set(j, edgeData.data); } + if (graph.type === "undirected") { + const reverseWeight = distances.get(j).get(i); + if (weight < reverseWeight) { + distances.get(j).set(i, weight); + next.get(j).set(i, i); + edgeMatrix.get(j).set(i, edgeData.data); + } + } } // Floyd-Warshall main loop for (const k of allNodes) { @@ -2159,13 +2428,18 @@ export const floydWarshall = /*#__PURE__*/dual(2, (graph, cost) => { }; }); /** - * Find the shortest path between two nodes using A* pathfinding algorithm. + * Finds the shortest path from the configured source node to the target node + * using the A* pathfinding algorithm. + * + * **Details** + * + * The edge-cost function must return non-negative weights, and the heuristic + * should be consistent to preserve shortest-path guarantees. Returns + * `Option.none()` when the target is not reachable, and throws a `GraphError` + * when either endpoint is missing or a negative edge cost is encountered. * - * A* is an extension of Dijkstra's algorithm that uses a heuristic function to guide - * the search towards the target, potentially finding paths faster than Dijkstra's. - * The heuristic must be admissible (never overestimate the actual cost). + * **Example** (Finding shortest paths with A-star) * - * @example * ```ts * import { Graph } from "effect" * @@ -2196,8 +2470,8 @@ export const floydWarshall = /*#__PURE__*/dual(2, (graph, cost) => { * } * ``` * - * @since 4.0.0 * @category algorithms + * @since 3.18.0 */ export const astar = /*#__PURE__*/dual(2, (graph, config) => { // Validate that source and target nodes exist @@ -2207,6 +2481,7 @@ export const astar = /*#__PURE__*/dual(2, (graph, config) => { if (!graph.nodes.has(config.target)) { throw missingNode(config.target); } + const edgeWeights = validateNonNegativeEdgeWeights(graph, config.cost, "A* algorithm"); // Early return if source equals target if (config.source === config.target) { return Option.some({ @@ -2272,14 +2547,8 @@ export const astar = /*#__PURE__*/dual(2, (graph, config) => { for (const edgeIndex of adjacencyList) { const edge = graph.edges.get(edgeIndex); if (edge !== undefined) { - const neighbor = edge.target; - const weight = config.cost(edge.data); - // Validate non-negative weights - if (weight < 0) { - throw new GraphError({ - message: "A* algorithm requires non-negative edge weights" - }); - } + const neighbor = getTraversableNeighbor(graph, currentNode, edge); + const weight = edgeWeights.get(edgeIndex); const tentativeGScore = currentGScore + weight; const neighborGScore = gScore.get(neighbor); // If this path to neighbor is better than any previous one @@ -2335,13 +2604,17 @@ export const astar = /*#__PURE__*/dual(2, (graph, config) => { }); }); /** - * Find the shortest path between two nodes using Bellman-Ford algorithm. + * Finds the shortest path from the configured source node to the target node + * using the Bellman-Ford algorithm. + * + * **Details** + * + * Negative edge weights are allowed. Returns `Option.none()` when the target is + * unreachable or when a negative cycle affects the path to the target. Throws a + * `GraphError` when either endpoint is missing. * - * Bellman-Ford algorithm can handle negative edge weights and detects negative cycles. - * It has O(VE) time complexity, slower than Dijkstra's but more versatile. - * Returns Option.none() if a negative cycle is detected that affects the path. + * **Example** (Finding shortest paths with Bellman-Ford) * - * @example * ```ts * import { Graph } from "effect" * @@ -2366,8 +2639,8 @@ export const astar = /*#__PURE__*/dual(2, (graph, config) => { * } * ``` * - * @since 4.0.0 * @category algorithms + * @since 3.18.0 */ export const bellmanFord = /*#__PURE__*/dual(2, (graph, config) => { // Validate that source and target nodes exist @@ -2403,6 +2676,14 @@ export const bellmanFord = /*#__PURE__*/dual(2, (graph, config) => { weight, edgeData: edgeData.data }); + if (graph.type === "undirected" && edgeData.source !== edgeData.target) { + edges.push({ + source: edgeData.target, + target: edgeData.source, + weight, + edgeData: edgeData.data + }); + } } // Relax edges up to V-1 times const nodeCount = graph.nodes.size; @@ -2439,14 +2720,8 @@ export const bellmanFord = /*#__PURE__*/dual(2, (graph, config) => { if (affectedNodes.has(node)) continue; affectedNodes.add(node); // Add all nodes reachable from this node - const adjacencyList = graph.adjacency.get(node); - if (adjacencyList !== undefined) { - for (const edgeIndex of adjacencyList) { - const edge = graph.edges.get(edgeIndex); - if (edge !== undefined) { - queue.push(edge.target); - } - } + for (const neighbor of getTraversalNeighbors(graph, node, "outgoing")) { + queue.push(neighbor); } } // If target is affected by a negative cycle, no shortest path exists. @@ -2481,13 +2756,16 @@ export const bellmanFord = /*#__PURE__*/dual(2, (graph, config) => { }); }); /** - * Concrete class for iterables that produce [NodeIndex, NodeData] tuples. + * Represents an iterable wrapper used by graph traversal and listing APIs. * - * This class provides a common abstraction for all iterables that return node data, - * including traversal iterators (DFS, BFS, etc.) and element iterators (nodes, externals). - * It uses a mapEntry function pattern for flexible iteration and transformation. + * **Details** + * + * A `Walker` yields `[index, data]` pairs lazily and can be viewed as just the + * indices, just the values, or mapped entries with `indices`, `values`, + * `entries`, and `visit`. + * + * **Example** (Working with node walkers) * - * @example * ```ts * import { Graph } from "effect" * @@ -2511,8 +2789,8 @@ export const bellmanFord = /*#__PURE__*/dual(2, (graph, config) => { * const nodeEntries = Array.from(Graph.entries(allNodes)) // [[0, "A"], [1, "B"]] * ``` * - * @since 4.0.0 * @category models + * @since 3.18.0 */ export class Walker { // @ts-ignore @@ -2520,11 +2798,14 @@ export class Walker { /** * Visits each element and maps it to a value using the provided function. * + * **Details** + * * Takes a function that receives the index and data, * and returns an iterable of the mapped values. Skips elements that * no longer exist in the graph. * - * @example + * **Example** (Visiting walker elements) + * * ```ts * import { Graph } from "effect" * @@ -2548,7 +2829,6 @@ export class Walker { * ``` * * @since 4.0.0 - * @category iterators */ visit; constructor( @@ -2559,7 +2839,8 @@ export class Walker { * and returns an iterable of the mapped values. Skips elements that * no longer exist in the graph. * - * @example + * **Example** (Visiting walker elements) + * * ```ts * import { Graph } from "effect" * @@ -2582,8 +2863,8 @@ export class Walker { * console.log(custom) // [{ id: 0, name: "A" }, { id: 1, name: "B" }] * ``` * - * @since 4.0.0 * @category iterators + * @since 4.0.0 */ visit) { this.visit = visit; @@ -2593,7 +2874,8 @@ export class Walker { /** * Returns an iterator over the indices in the walker. * - * @example + * **Example** (Iterating walker indices) + * * ```ts * import { Graph } from "effect" * @@ -2608,14 +2890,15 @@ export class Walker { * console.log(indices) // [0, 1] * ``` * - * @since 4.0.0 - * @category utilities + * @category iterators + * @since 3.18.0 */ export const indices = walker => walker.visit((index, _) => index); /** * Returns an iterator over the values (data) in the walker. * - * @example + * **Example** (Iterating walker values) + * * ```ts * import { Graph } from "effect" * @@ -2630,14 +2913,15 @@ export const indices = walker => walker.visit((index, _) => index); * console.log(values) // ["A", "B"] * ``` * - * @since 4.0.0 - * @category utilities + * @category iterators + * @since 3.18.0 */ export const values = walker => walker.visit((_, data) => data); /** * Returns an iterator over [index, data] entries in the walker. * - * @example + * **Example** (Iterating walker entries) + * * ```ts * import { Graph } from "effect" * @@ -2652,17 +2936,22 @@ export const values = walker => walker.visit((_, data) => data); * console.log(entries) // [[0, "A"], [1, "B"]] * ``` * - * @since 4.0.0 - * @category utilities + * @category iterators + * @since 3.18.0 */ export const entries = walker => walker.visit((index, data) => [index, data]); /** - * Creates a new DFS iterator with optional configuration. + * Creates a lazy depth-first traversal iterator from the configured start + * nodes. + * + * **Details** * - * The iterator maintains a stack of nodes to visit and tracks discovered nodes. - * It provides lazy evaluation of the depth-first search. + * If no start nodes are supplied, the iterator is empty. The `direction` option + * chooses whether to follow outgoing or incoming edges. Throws a `GraphError` + * if any configured start node does not exist. + * + * **Example** (Traversing depth-first) * - * @example * ```ts * import { Graph } from "effect" * @@ -2685,8 +2974,8 @@ export const entries = walker => walker.visit((index, data) => [index, data]); * // Can be used programmatically * ``` * - * @since 4.0.0 * @category iterators + * @since 3.18.0 */ export const dfs = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = {}) => { const start = config.start ?? []; @@ -2712,7 +3001,7 @@ export const dfs = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = if (Option.isNone(nodeDataOption)) { continue; } - const neighbors = neighborsDirected(graph, current, direction); + const neighbors = getTraversalNeighbors(graph, current, direction); for (let i = neighbors.length - 1; i >= 0; i--) { const neighbor = neighbors[i]; if (!discovered.has(neighbor)) { @@ -2736,12 +3025,17 @@ export const dfs = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = })); }); /** - * Creates a new BFS iterator with optional configuration. + * Creates a lazy breadth-first traversal iterator from the configured start + * nodes. + * + * **Details** * - * The iterator maintains a queue of nodes to visit and tracks discovered nodes. - * It provides lazy evaluation of the breadth-first search. + * If no start nodes are supplied, the iterator is empty. The `direction` option + * chooses whether to follow outgoing or incoming edges. Throws a `GraphError` + * if any configured start node does not exist. + * + * **Example** (Traversing breadth-first) * - * @example * ```ts * import { Graph } from "effect" * @@ -2764,8 +3058,8 @@ export const dfs = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = * // Can be used programmatically * ``` * - * @since 4.0.0 * @category iterators + * @since 3.18.0 */ export const bfs = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = {}) => { const start = config.start ?? []; @@ -2785,7 +3079,7 @@ export const bfs = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = const current = queue.shift(); if (!discovered.has(current)) { discovered.add(current); - const neighbors = neighborsDirected(graph, current, direction); + const neighbors = getTraversalNeighbors(graph, current, direction); for (const neighbor of neighbors) { if (!discovered.has(neighbor)) { queue.push(neighbor); @@ -2815,10 +3109,13 @@ export const bfs = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = /** * Creates a new topological sort iterator with optional configuration. * + * **Details** + * * The iterator uses Kahn's algorithm to lazily produce nodes in topological order. * Throws an error if the graph contains cycles. * - * @example + * **Example** (Sorting topologically) + * * ```ts * import { Graph } from "effect" * @@ -2839,7 +3136,7 @@ export const bfs = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = * // With initial nodes * const topo2 = Graph.topo(graph, { initials: [0] }) * - * // Throws error for cyclic graph + * // Check before sorting a cyclic graph * const cyclicGraph = Graph.directed((mutable) => { * const a = Graph.addNode(mutable, "A") * const b = Graph.addNode(mutable, "B") @@ -2847,17 +3144,20 @@ export const bfs = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = * Graph.addEdge(mutable, b, a, 2) // Creates cycle * }) * - * try { - * Graph.topo(cyclicGraph) // Throws: "Cannot perform topological sort on cyclic graph" - * } catch (error) { - * console.log((error as Error).message) + * if (!Graph.isAcyclic(cyclicGraph)) { + * console.log("cyclic graph") // cyclic graph * } * ``` * - * @since 4.0.0 * @category iterators + * @since 3.18.0 */ export const topo = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = {}) => { + if (graph.type === "undirected") { + throw new GraphError({ + message: "Cannot perform topological sort on undirected graph" + }); + } // Check if graph is acyclic first if (!isAcyclic(graph)) { throw new GraphError({ @@ -2875,6 +3175,7 @@ export const topo = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = [Symbol.iterator]: () => { const inDegree = new Map(); const remaining = new Set(); + const initialSet = new Set(initials); const queue = [...initials]; // Initialize in-degree counts for (const [nodeIndex] of graph.nodes) { @@ -2886,12 +3187,17 @@ export const topo = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = const currentInDegree = inDegree.get(edgeData.target) || 0; inDegree.set(edgeData.target, currentInDegree + 1); } - // Add nodes with zero in-degree to queue if no initials provided - if (initials.length === 0) { - for (const [nodeIndex, degree] of inDegree) { - if (degree === 0) { - queue.push(nodeIndex); - } + for (const nodeIndex of initials) { + if (inDegree.get(nodeIndex) !== 0) { + throw new GraphError({ + message: `Initial node ${nodeIndex} has incoming edges` + }); + } + } + // Add remaining zero in-degree nodes after prioritized initials. + for (const [nodeIndex, degree] of inDegree) { + if (degree === 0 && !initialSet.has(nodeIndex)) { + queue.push(nodeIndex); } } const nextMapped = () => { @@ -2900,7 +3206,7 @@ export const topo = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = if (remaining.has(current)) { remaining.delete(current); // Process outgoing edges, reducing in-degree of targets - const neighbors = neighborsDirected(graph, current, "outgoing"); + const neighbors = getDirectedNeighbors(graph, current, "outgoing"); for (const neighbor of neighbors) { if (remaining.has(neighbor)) { const currentInDegree = inDegree.get(neighbor) || 0; @@ -2934,13 +3240,17 @@ export const topo = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = })); }); /** - * Creates a new DFS postorder iterator with optional configuration. + * Creates a lazy depth-first postorder traversal iterator from the configured + * start nodes. + * + * **Details** * - * The iterator maintains a stack with visit state tracking and emits nodes - * in postorder (after all descendants have been processed). Essential for - * dependency resolution and tree destruction algorithms. + * Nodes are emitted after their reachable descendants have been processed. If + * no start nodes are supplied, the iterator is empty. The `direction` option + * chooses whether to follow outgoing or incoming edges. + * + * **Example** (Traversing in postorder) * - * @example * ```ts * import { Graph } from "effect" * @@ -2959,8 +3269,8 @@ export const topo = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = * } * ``` * - * @since 4.0.0 * @category iterators + * @since 3.18.0 */ export const dfsPostOrder = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = {}) => { const start = config.start ?? []; @@ -2992,7 +3302,7 @@ export const dfsPostOrder = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, } if (!current.visitedChildren) { current.visitedChildren = true; - const neighbors = neighborsDirected(graph, current.node, direction); + const neighbors = getTraversalNeighbors(graph, current.node, direction); for (let i = neighbors.length - 1; i >= 0; i--) { const neighbor = neighbors[i]; if (!discovered.has(neighbor) && !finished.has(neighbor)) { @@ -3031,10 +3341,13 @@ export const dfsPostOrder = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, /** * Creates an iterator over all node indices in the graph. * + * **Details** + * * The iterator produces node indices in the order they were added to the graph. * This provides access to all nodes regardless of connectivity. * - * @example + * **Example** (Iterating all nodes) + * * ```ts * import { Graph } from "effect" * @@ -3049,8 +3362,8 @@ export const dfsPostOrder = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, * console.log(indices) // [0, 1, 2] * ``` * - * @since 4.0.0 * @category iterators + * @since 3.18.0 */ export const nodes = graph => new Walker(f => ({ [Symbol.iterator]() { @@ -3077,10 +3390,13 @@ export const nodes = graph => new Walker(f => ({ /** * Creates an iterator over all edge indices in the graph. * + * **Details** + * * The iterator produces edge indices in the order they were added to the graph. * This provides access to all edges regardless of connectivity. * - * @example + * **Example** (Iterating all edges) + * * ```ts * import { Graph } from "effect" * @@ -3096,8 +3412,8 @@ export const nodes = graph => new Walker(f => ({ * console.log(indices) // [0, 1] * ``` * - * @since 4.0.0 * @category iterators + * @since 3.18.0 */ export const edges = graph => new Walker(f => ({ [Symbol.iterator]() { @@ -3122,13 +3438,16 @@ export const edges = graph => new Walker(f => ({ } })); /** - * Creates an iterator over external nodes (nodes without edges in specified direction). + * Creates an iterator over external nodes (nodes without edges in the specified direction). + * + * **Details** * - * External nodes are nodes that have no outgoing edges (direction="outgoing") or - * no incoming edges (direction="incoming"). These are useful for finding + * External nodes have no outgoing edges (`direction: "outgoing"`) or no + * incoming edges (`direction: "incoming"`). These are useful for finding * sources, sinks, or isolated nodes. * - * @example + * **Example** (Iterating external nodes) + * * ```ts * import { Graph } from "effect" * @@ -3155,8 +3474,8 @@ export const edges = graph => new Walker(f => ({ * console.log(sources) // [0, 3] * ``` * - * @since 4.0.0 * @category iterators + * @since 3.18.0 */ export const externals = /*#__PURE__*/dual(args => isGraph(args[0]), (graph, config = {}) => { const direction = config.direction ?? "outgoing"; diff --git a/.opencode/node_modules/effect/dist/Graph.js.map b/.opencode/node_modules/effect/dist/Graph.js.map index 81b4f1d83f7afc94959be9a372e3c30a44f49a04..410c3e0227a596dd97badfef93d07c3750976d5d 100644 --- a/.opencode/node_modules/effect/dist/Graph.js.map +++ b/.opencode/node_modules/effect/dist/Graph.js.map @@ -1 +1 @@ -{"version":3,"file":"Graph.js","names":["Data","Equal","dual","Hash","NodeInspectSymbol","Option","pipeArguments","hasProperty","TypeId","Edge","Class","ProtoGraph","Symbol","iterator","nodes","toJSON","symbol","that","isGraph","size","edges","type","nodeIndex","nodeData","has","otherNodeData","get","equals","edgeIndex","edgeData","otherEdge","hash","string","number","_id","nodeCount","edgeCount","toString","pipe","arguments","GraphError","TaggedError","missingNode","node","message","u","directed","mutate","graph","Object","create","Map","adjacency","reverseAdjacency","nextNodeIndex","nextEdgeIndex","acyclic","some","mutable","beginMutation","endMutation","undirected","set","f","addNode","data","getNode","none","hasNode","findNode","predicate","index","findNodes","results","push","findEdge","source","target","findEdges","updateNode","currentData","newData","updateEdge","currentEdge","mapNodes","mapEdges","reverse","clear","sourceEdges","targetEdges","filterMapNodes","nodesToRemove","result","isSome","value","removeNode","filterMapEdges","edgesToRemove","removeEdge","filterNodes","filterEdges","invalidateCycleFlagOnRemoval","_tag","invalidateCycleFlagOnAddition","addEdge","sourceAdjacency","undefined","targetReverseAdjacency","targetAdjacency","sourceReverseAdjacency","outgoingEdges","edge","incomingEdges","removeEdgeInternal","delete","wasRemoved","indexOf","splice","getEdge","fromUndefinedOr","hasEdge","adjacencyList","neighbors","getUndirectedNeighbors","neighborsDirected","direction","adjacencyMap","neighborNode","toGraphViz","args","options","edgeLabel","String","graphName","nodeLabel","isDirected","graphType","edgeOperator","lines","label","replace","join","escapeMermaidLabel","formatMermaidNode","nodeId","shape","toMermaid","diagramType","nodeShape","finalDiagramType","formattedNode","sourceId","targetId","isAcyclic","visited","Set","recursionStack","startNode","keys","stack","length","neighborIndex","isFirstVisit","pop","add","nodeNeighbors","Array","from","neighbor","isBipartite","coloring","discovered","isBipartiteGraph","queue","current","shift","currentColor","neighborColor","otherNode","connectedComponents","components","component","stronglyConnectedComponents","finishOrder","nodeNeighborsList","sccs","i","scc","predecessor","dijkstra","config","path","distance","costs","distances","previous","Infinity","priorityQueue","minIndex","currentNode","currentDistance","cost","newDistance","neighborDistance","unshift","prev","floydWarshall","allNodes","next","edgeMatrix","j","weight","currentWeight","k","distIK","distKJ","distIJ","paths","weights","nextNode","astar","targetNodeData","isNone","gScore","fScore","sourceNodeData","h","heuristic","openSet","currentGScore","tentativeGScore","neighborGScore","neighborNodeData","bellmanFord","hasUpdate","sourceDistance","targetDistance","affectedNodes","Walker","visit","constructor","indices","walker","_","values","entries","dfs","start","nextMapped","nodeDataOption","done","bfs","topo","initials","inDegree","remaining","currentInDegree","degree","newInDegree","dfsPostOrder","finished","visitedChildren","nodeToEmit","nodeMap","edgeMap","externals","nodeIterator"],"sources":["../src/Graph.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA,OAAO,KAAKA,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,SAASC,iBAAiB,QAAQ,kBAAkB;AACpD,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,WAAW,QAAQ,gBAAgB;AAG5C,MAAMC,MAAM,GAAG,2BAA2B;AAkB1C;;;;;;AAMA,OAAM,MAAOC,IAAQ,SAAQT,IAAI,CAACU,KAIhC;AAiFF;AACA;AACA;AAEA;AACA,MAAMC,UAAU,GAAG;EACjB,CAACH,MAAM,GAAGA,MAAM;EAChB,CAACI,MAAM,CAACC,QAAQ,IAAC;IACf,OAAO,IAAI,CAACC,KAAK,CAACF,MAAM,CAACC,QAAQ,CAAC,EAAE;EACtC,CAAC;EACD,CAACT,iBAAiB,IAAC;IACjB,OAAO,IAAI,CAACW,MAAM,EAAE;EACtB,CAAC;EACD,CAACd,KAAK,CAACe,MAAM,EAAyBC,IAAiB;IACrD,IAAIC,OAAO,CAACD,IAAI,CAAC,EAAE;MACjB,IACE,IAAI,CAACH,KAAK,CAACK,IAAI,KAAKF,IAAI,CAACH,KAAK,CAACK,IAAI,IACnC,IAAI,CAACC,KAAK,CAACD,IAAI,KAAKF,IAAI,CAACG,KAAK,CAACD,IAAI,IACnC,IAAI,CAACE,IAAI,KAAKJ,IAAI,CAACI,IAAI,EACvB;QACA,OAAO,KAAK;MACd;MACA;MACA,KAAK,MAAM,CAACC,SAAS,EAAEC,QAAQ,CAAC,IAAI,IAAI,CAACT,KAAK,EAAE;QAC9C,IAAI,CAACG,IAAI,CAACH,KAAK,CAACU,GAAG,CAACF,SAAS,CAAC,EAAE;UAC9B,OA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6C,EAC7C8I,MAAA,GAA0B,EAAE,KACX;EACjB,MAAMjE,SAAS,GAAGiE,MAAM,CAACjE,SAAS,IAAI,UAAU;EAEhD,OAAO,IAAIiH,MAAM,CAAE/K,CAAC,KAAM;IACxB,CAACnD,MAAM,CAACC,QAAQ,GAAG,MAAK;MACtB,MAAM0P,OAAO,GAAGvN,KAAK,CAAClC,KAAK;MAC3B,MAAMgH,YAAY,GAAGD,SAAS,KAAK,UAAU,GACzC7E,KAAK,CAACK,gBAAgB,GACtBL,KAAK,CAACI,SAAS;MAEnB,MAAMsN,YAAY,GAAGH,OAAO,CAAClB,OAAO,EAAE;MAEtC,MAAMG,UAAU,GAAGA,CAAA,KAAK;QACtB,IAAI1E,OAAO,GAAG4F,YAAY,CAAC1D,IAAI,EAAE;QACjC,OAAO,CAAClC,OAAO,CAAC4E,IAAI,EAAE;UACpB,MAAM,CAACpO,SAAS,EAAEC,QAAQ,CAAC,GAAGuJ,OAAO,CAAChF,KAAK;UAC3C,MAAM2B,aAAa,GAAGK,YAAY,CAACpG,GAAG,CAACJ,SAAS,CAAC;UAEjD;UACA,IAAImG,aAAa,KAAKf,SAAS,IAAIe,aAAa,CAACuC,MAAM,KAAK,CAAC,EAAE;YAC7D,OAAO;cAAE0F,IAAI,EAAE,KAAK;cAAE5J,KAAK,EAAE/B,CAAC,CAACzC,SAAS,EAAEC,QAAQ;YAAC,CAAE;UACvD;UACAuJ,OAAO,GAAG4F,YAAY,CAAC1D,IAAI,EAAE;QAC/B;QAEA,OAAO;UAAE0C,IAAI,EAAE,IAAI;UAAE5J,KAAK,EAAEY;QAAS,CAAW;MAClD,CAAC;MAED,OAAO;QAAEsG,IAAI,EAAEwC;MAAU,CAAE;IAC7B;GACD,CAAC,CAAC;AACL,CAAC,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Graph.js","names":["Data","Equal","dual","Hash","NodeInspectSymbol","Option","pipeArguments","hasProperty","TypeId","Edge","Class","ProtoGraph","Symbol","iterator","nodes","toJSON","symbol","that","isGraph","size","edges","type","nodeIndex","nodeData","has","otherNodeData","get","equals","edgeIndex","edgeData","otherEdge","hash","string","number","_id","nodeCount","edgeCount","toString","pipe","arguments","GraphError","TaggedError","missingNode","node","message","u","directed","mutate","graph","Object","create","Map","adjacency","reverseAdjacency","nextNodeIndex","nextEdgeIndex","acyclic","some","mutable","beginMutation","endMutation","undirected","set","f","addNode","data","getNode","none","hasNode","findNode","predicate","index","findNodes","results","push","findEdge","source","target","findEdges","updateNode","currentData","newData","updateEdge","currentEdge","mapNodes","mapEdges","rebuildAdjacency","clear","keys","reverse","filterMapNodes","nodesToRemove","result","isSome","value","removeNode","filterMapEdges","edgesToRemove","removeEdge","filterNodes","filterEdges","invalidateCycleFlagOnRemoval","_tag","invalidateCycleFlagOnAddition","addEdge","sourceAdjacency","undefined","targetReverseAdjacency","targetAdjacency","sourceReverseAdjacency","outgoingEdges","edge","incomingEdges","removeEdgeInternal","delete","wasRemoved","indexOf","splice","getEdge","fromUndefinedOr","hasEdge","adjacencyList","neighbor","getDirectedNeighbors","direction","adjacencyMap","neighbors","getUndirectedNeighbors","successors","predecessors","neighborsDirected","toGraphViz","args","options","edgeLabel","String","graphName","nodeLabel","isDirected","graphType","edgeOperator","lines","label","replace","join","escapeMermaidLabel","formatMermaidNode","nodeId","shape","toMermaid","diagramType","nodeShape","finalDiagramType","formattedNode","sourceId","targetId","isAcyclic","visited","Set","startNode","add","stack","parent","length","pop","nodeNeighbors","recursionStack","neighborIndex","isFirstVisit","isBipartite","coloring","discovered","isBipartiteGraph","queue","current","shift","currentColor","neighborColor","otherNode","Array","from","getTraversalNeighbors","getTraversableNeighbor","connectedComponents","components","component","stronglyConnectedComponents","finishOrder","nodeNeighborsList","sccs","i","scc","predecessor","validateNonNegativeEdgeWeights","cost","algorithm","edgeWeights","weight","Number","isNaN","dijkstra","config","path","distance","costs","distances","previous","Infinity","priorityQueue","minIndex","currentNode","currentDistance","newDistance","neighborDistance","unshift","prev","floydWarshall","allNodes","next","edgeMatrix","j","currentWeight","reverseWeight","k","distIK","distKJ","distIJ","paths","weights","nextNode","astar","targetNodeData","isNone","gScore","fScore","sourceNodeData","h","heuristic","openSet","currentGScore","tentativeGScore","neighborGScore","neighborNodeData","bellmanFord","hasUpdate","sourceDistance","targetDistance","affectedNodes","Walker","visit","constructor","indices","walker","_","values","entries","dfs","start","nextMapped","nodeDataOption","done","bfs","topo","initials","inDegree","remaining","initialSet","currentInDegree","degree","newInDegree","dfsPostOrder","finished","visitedChildren","nodeToEmit","nodeMap","edgeMap","externals","nodeIterator"],"sources":["../src/Graph.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;AAWA,OAAO,KAAKA,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,SAASC,iBAAiB,QAAQ,kBAAkB;AACpD,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,WAAW,QAAQ,gBAAgB;AAG5C,MAAMC,MAAM,GAAG,2BAA2B;AAkD1C;;;;;;;;;;;;;;;AAeA,OAAM,MAAOC,IAAQ,SAAQT,IAAI,CAACU,KAIhC;AA+JF;AACA;AACA;AAEA;AACA,MAAMC,UAAU,GAAG;EACjB,CAACH,MAAM,GAAGA,MAAM;EAChB,CAACI,MAAM,CAACC,QAAQ,IAAC;IACf,OAAO,IAAI,CAACC,KAAK,CAACF,MAAM,CAACC,QAAQ,CAAC,EAAE;EACtC,CAAC;EACD,CAACT,iBAAiB,IAAC;IACjB,OAAO,IAAI,CAACW,MAAM,EAAE;EACtB,CAAC;EACD,CAACd,KAAK,CAACe,MAAM,EAAyBC,IAAiB;IACrD,IAAIC,OAAO,CAACD,IAAI,CAAC,EAAE;MACjB,IACE,IAAI,CAACH,KAAK,CAACK,IAAI,KAAKF,IAAI,CAACH,KAA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AAE,CACnCpF,KAA6C,EAC7CyJ,MAAA,GAA0B,EAAE,KACX;EACjB,MAAM7E,SAAS,GAAG6E,MAAM,CAAC7E,SAAS,IAAI,UAAU;EAEhD,OAAO,IAAI4H,MAAM,CAAEzL,CAAC,KAAM;IACxB,CAACnD,MAAM,CAACC,QAAQ,GAAG,MAAK;MACtB,MAAMqQ,OAAO,GAAGlO,KAAK,CAAClC,KAAK;MAC3B,MAAM+G,YAAY,GAAGD,SAAS,KAAK,UAAU,GACzC5E,KAAK,CAACK,gBAAgB,GACtBL,KAAK,CAACI,SAAS;MAEnB,MAAMiO,YAAY,GAAGH,OAAO,CAACnB,OAAO,EAAE;MAEtC,MAAMG,UAAU,GAAGA,CAAA,KAAK;QACtB,IAAIpF,OAAO,GAAGuG,YAAY,CAAC3D,IAAI,EAAE;QACjC,OAAO,CAAC5C,OAAO,CAACsF,IAAI,EAAE;UACpB,MAAM,CAAC9O,SAAS,EAAEC,QAAQ,CAAC,GAAGuJ,OAAO,CAAChF,KAAK;UAC3C,MAAM2B,aAAa,GAAGI,YAAY,CAACnG,GAAG,CAACJ,SAAS,CAAC;UAEjD;UACA,IAAImG,aAAa,KAAKf,SAAS,IAAIe,aAAa,CAAC0C,MAAM,KAAK,CAAC,EAAE;YAC7D,OAAO;cAAEiG,IAAI,EAAE,KAAK;cAAEtK,KAAK,EAAE/B,CAAC,CAACzC,SAAS,EAAEC,QAAQ;YAAC,CAAE;UACvD;UACAuJ,OAAO,GAAGuG,YAAY,CAAC3D,IAAI,EAAE;QAC/B;QAEA,OAAO;UAAE0C,IAAI,EAAE,IAAI;UAAEtK,KAAK,EAAEY;QAAS,CAAW;MAClD,CAAC;MAED,OAAO;QAAEgH,IAAI,EAAEwC;MAAU,CAAE;IAC7B;GACD,CAAC,CAAC;AACL,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/HKT.d.ts b/.opencode/node_modules/effect/dist/HKT.d.ts index 565a729f8c526da7c91aa7e9877a6fb88ac418f5..ec05cc69081e4fe2e4108449219ba7b706444fb1 100644 --- a/.opencode/node_modules/effect/dist/HKT.d.ts +++ b/.opencode/node_modules/effect/dist/HKT.d.ts @@ -1,71 +1,71 @@ /** - * This module provides utilities for Higher-Kinded Types (HKT) in TypeScript. + * Provides type-level helpers for generic code over container-like types. * - * Higher-Kinded Types are types that take other types as parameters, similar to how - * functions take values as parameters. They enable generic programming over type - * constructors, allowing you to write code that works with any container type - * (like Array, Option, Effect, etc.) in a uniform way. - * - * The HKT system in Effect uses TypeLambdas to encode type-level functions that - * can represent complex type relationships with multiple type parameters, including - * contravariant, covariant, and invariant positions. - * - * @example - * ```ts - * import type { HKT } from "effect" - * - * // Define a TypeLambda for Array - * interface ArrayTypeLambda extends HKT.TypeLambda { - * readonly type: Array - * } - * - * // Use Kind to get the concrete type - * type MyArray = HKT.Kind - * // MyArray is Array - * - * // Define a TypeClass that works with any HKT - * interface Functor extends HKT.TypeClass { - * map( - * fa: HKT.Kind, - * f: (a: A) => B - * ): HKT.Kind - * } - * ``` + * TypeScript cannot directly abstract over shapes such as `Option`, + * `ReadonlyArray`, or `Effect`. This module represents those shapes + * with `TypeLambda` and applies concrete type arguments with `Kind`. It is + * mostly useful when defining generic helpers or type classes that should work + * across several data types. * * @since 2.0.0 */ import type * as Types from "./Types.ts"; /** - * A unique symbol used to identify TypeClass implementations. + * Defines the unique symbol used to associate `TypeClass` implementations with their `TypeLambda`. + * + * **When to use** + * + * Use when you need to define a custom type class that exposes the `TypeLambda` + * it operates on. + * + * **Details** + * + * This symbol links a type class shape with its compile-time type lambda. It is + * intended for type-class definitions and has no runtime behavior. * - * This symbol is used internally by the HKT system to associate type classes - * with their corresponding TypeLambda. It provides a way to link runtime - * type class instances with their compile-time type information. + * **Example** (Linking a type class to a type lambda) * - * @example * ```ts * import type { HKT } from "effect" * - * interface MyTypeClass extends HKT.TypeClass { - * // TypeClass methods here + * interface IdentityTypeLambda extends HKT.TypeLambda { + * readonly type: this["Target"] * } * - * // The URI symbol helps TypeScript understand the relationship - * // between the type class and its type lambda + * interface IdentityTypeClass extends HKT.TypeClass { + * readonly [HKT.URI]?: IdentityTypeLambda + * readonly of: (value: A) => HKT.Kind + * } + * + * const identity: IdentityTypeClass = { + * of: (value) => value + * } + * + * type LinkedTypeLambda = typeof identity[typeof HKT.URI] + * + * const value: HKT.Kind, never, never, never, string> = identity.of("ok") + * console.log(value) // "ok" * ``` * - * @since 2.0.0 * @category symbols + * @since 2.0.0 */ export declare const URI: unique symbol; /** * Base interface for type classes that work with Higher-Kinded Types. * - * A TypeClass defines operations that can be performed on any type constructor - * that matches the given TypeLambda. This enables writing generic code that + * **When to use** + * + * Use to define type class interfaces parameterized by a `TypeLambda`. + * + * **Details** + * + * A `TypeClass` defines operations that can be performed on any type constructor + * that matches the given `TypeLambda`. This enables writing generic code that * works across different container types like Array, Option, Effect, etc. * - * @example + * **Example** (Defining higher-kinded type classes) + * * ```ts * import type { HKT } from "effect" * @@ -86,8 +86,8 @@ export declare const URI: unique symbol; * } * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface TypeClass { readonly [URI]?: F; @@ -95,17 +95,20 @@ export interface TypeClass { /** * Base interface for defining Higher-Kinded Type parameters. * - * A TypeLambda encodes the "shape" of a type constructor, specifying how many - * type parameters it takes and their variance (contravariant, covariant, or invariant). - * This allows representing complex types like `Effect` in a uniform way. + * **When to use** + * + * Use to encode a type constructor for higher-kinded generic programming. + * + * **Details** + * + * A `TypeLambda` encodes the "shape" of a type constructor, specifying how many + * type parameters it takes and their variance (contravariant, covariant, or + * invariant). The four parameters are `In` for contravariant input, `Out2` for + * covariant output often used for errors, `Out1` for covariant output often used + * for context or environment, and `Target` for the invariant main type. * - * The four parameters represent: - * - `In`: Contravariant input parameter - * - `Out2`: Covariant output parameter (often used for errors) - * - `Out1`: Covariant output parameter (often used for context/environment) - * - `Target`: Invariant target parameter (the main type) + * **Example** (Defining type lambdas) * - * @example * ```ts * import type { Effect, HKT } from "effect" * @@ -125,8 +128,8 @@ export interface TypeClass { * } * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface TypeLambda { readonly In: unknown; @@ -135,17 +138,22 @@ export interface TypeLambda { readonly Target: unknown; } /** - * Applies type parameters to a TypeLambda to get the concrete type. + * Applies type parameters to a `TypeLambda` to get the concrete type. + * + * **When to use** + * + * Use to apply a `TypeLambda` to type parameters and obtain its concrete type. + * + * **Details** * - * This type-level function takes a TypeLambda and four type parameters, - * then "applies" them to get the actual type. It handles the variance - * correctly, ensuring contravariant parameters are used as inputs and - * covariant parameters as outputs. + * This type-level function takes a `TypeLambda` and four type parameters, then + * "applies" them to get the actual type. It handles variance correctly, ensuring + * contravariant parameters are used as inputs and covariant parameters as + * outputs. This is the core mechanism that allows HKT to transform abstract type + * constructors into concrete types by applying arguments. * - * This is the core mechanism that allows HKT to work - it transforms - * abstract type constructors into concrete types by applying arguments. + * **Example** (Applying type lambdas) * - * @example * ```ts * import type { Effect, HKT, Option } from "effect" * @@ -181,8 +189,8 @@ export interface TypeLambda { * > * ``` * + * @category utility types * @since 2.0.0 - * @category type utils */ export type Kind = F extends { readonly type: unknown; diff --git a/.opencode/node_modules/effect/dist/HKT.d.ts.map b/.opencode/node_modules/effect/dist/HKT.d.ts.map index de9a0ca09ef93ff334d9f934bfe588ca8b6c069e..557eaf287ed6e1e0e2ae8a6362f9e2ecf4f32644 100644 --- a/.opencode/node_modules/effect/dist/HKT.d.ts.map +++ b/.opencode/node_modules/effect/dist/HKT.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"HKT.d.ts","sourceRoot":"","sources":["../src/HKT.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAExC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,EAAE,OAAO,MAAM,CAAA;AA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EAAE,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,CAAA;IACpC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IACpC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IACpC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;CACzC,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Hash.d.ts b/.opencode/node_modules/effect/dist/Hash.d.ts index 2ca02abb71fe9066b2e5188e1adea37d301040dc..fa1685ed84e05fa17e808e1413b8de83acf4367b 100644 --- a/.opencode/node_modules/effect/dist/Hash.d.ts +++ b/.opencode/node_modules/effect/dist/Hash.d.ts @@ -1,16 +1,33 @@ /** - * The unique identifier used to identify objects that implement the Hash interface. + * Defines the unique identifier used to identify objects that implement the Hash interface. * + * **When to use** + * + * Use as the computed property key for the method that supplies a custom hash + * value on a `Hash` implementor. + * + * @see {@link Hash} for the interface implemented with this symbol + * @see {@link isHash} for checking whether a value implements `Hash` + * @see {@link hash} for computing hash values + * + * @category symbols * @since 2.0.0 */ export declare const symbol = "~effect/interfaces/Hash"; /** * A type that represents an object that can be hashed. * + * **When to use** + * + * Use to let a custom type provide its own stable hash value. + * + * **Details** + * * Objects implementing this interface provide a method to compute their hash value, * which is used for efficient comparison and storage operations. * - * @example + * **Example** (Implementing Hash) + * * ```ts * import { Hash } from "effect" * @@ -35,21 +52,27 @@ export interface Hash { /** * Computes a hash value for any given value. * + * **When to use** + * + * Use to compute an Effect hash for primitives, collections, and hashable + * objects. + * + * **Details** + * * This function can hash primitives (numbers, strings, booleans, etc.) as well as * objects, arrays, and other complex data structures. It automatically handles * different types and provides a consistent hash value for equivalent inputs. * - * **⚠️ CRITICAL IMMUTABILITY REQUIREMENT**: Objects being hashed must be treated as - * immutable after their first hash computation. Hash results are cached, so mutating - * an object after hashing will lead to stale cached values and broken hash-based - * operations. For mutable objects, use referential equality by implementing custom - * `Hash` interface that hashes the object reference, not its content. + * **Gotchas** * - * **FORBIDDEN**: Modifying objects after `Hash.hash()` has been called on them - * **ALLOWED**: Using immutable objects, or mutable objects with custom `Hash` interface - * that uses referential equality (hashes the object reference, not content) + * Objects being hashed must be treated as immutable after their first hash + * computation. Hash results are cached, so mutating an object after hashing will + * lead to stale cached values and broken hash-based operations. For mutable + * objects, implement a custom `Hash` interface that hashes the object reference + * rather than its content. + * + * **Example** (Hashing different values) * - * @example * ```ts * import { Hash } from "effect" * @@ -61,7 +84,7 @@ export interface Hash { * // Hash objects and arrays * console.log(Hash.hash({ name: "John", age: 30 })) * console.log(Hash.hash([1, 2, 3])) - * console.log(Hash.hash(new Date("2023-01-01"))) + * console.log(Hash.hash({ id: "user-1", roles: ["admin", "editor"] })) * ``` * * @category hashing @@ -71,11 +94,18 @@ export declare const hash: (self: A) => number; /** * Generates a random hash value for an object and caches it. * + * **When to use** + * + * Use to hash an object by reference identity instead of structural content. + * + * **Details** + * * This function creates a random hash value for objects that don't have their own * hash implementation. The hash value is cached using a WeakMap, so the same object * will always return the same hash value during its lifetime. * - * @example + * **Example** (Hashing objects by reference) + * * ```ts * import { Hash } from "effect" * @@ -96,16 +126,22 @@ export declare const random: (self: A) => number; /** * Combines two hash values into a single hash value. * - * This function takes two hash values and combines them using a mathematical - * operation to produce a new hash value. It's useful for creating hash values - * of composite structures. + * **When to use** + * + * Use to build a hash for a composite value by folding together hash values for + * its parts. + * + * **Details** + * + * Supports both direct and pipeable usage. The implementation combines two + * hash values with `(self * 53) ^ b`. + * + * **Example** (Combining hash values) * - * @example * ```ts - * import { Hash } from "effect" // combined hash value + * import { Hash, pipe } from "effect" * * // Can also be used with pipe - * import { pipe } from "effect" * * const hash1 = Hash.hash("hello") * const hash2 = Hash.hash("world") @@ -116,6 +152,9 @@ export declare const random: (self: A) => number; * const result = pipe(hash1, Hash.combine(hash2)) * ``` * + * @see {@link hash} for computing hash values from arbitrary inputs + * @see {@link structureKeys} for hashing selected object fields without manual combination + * * @category hashing * @since 2.0.0 */ @@ -123,16 +162,22 @@ export declare const combine: { /** * Combines two hash values into a single hash value. * - * This function takes two hash values and combines them using a mathematical - * operation to produce a new hash value. It's useful for creating hash values - * of composite structures. + * **When to use** + * + * Use to build a hash for a composite value by folding together hash values for + * its parts. + * + * **Details** + * + * Supports both direct and pipeable usage. The implementation combines two + * hash values with `(self * 53) ^ b`. + * + * **Example** (Combining hash values) * - * @example * ```ts - * import { Hash } from "effect" // combined hash value + * import { Hash, pipe } from "effect" * * // Can also be used with pipe - * import { pipe } from "effect" * * const hash1 = Hash.hash("hello") * const hash2 = Hash.hash("world") @@ -143,6 +188,9 @@ export declare const combine: { * const result = pipe(hash1, Hash.combine(hash2)) * ``` * + * @see {@link hash} for computing hash values from arbitrary inputs + * @see {@link structureKeys} for hashing selected object fields without manual combination + * * @category hashing * @since 2.0.0 */ @@ -150,16 +198,22 @@ export declare const combine: { /** * Combines two hash values into a single hash value. * - * This function takes two hash values and combines them using a mathematical - * operation to produce a new hash value. It's useful for creating hash values - * of composite structures. + * **When to use** + * + * Use to build a hash for a composite value by folding together hash values for + * its parts. + * + * **Details** + * + * Supports both direct and pipeable usage. The implementation combines two + * hash values with `(self * 53) ^ b`. + * + * **Example** (Combining hash values) * - * @example * ```ts - * import { Hash } from "effect" // combined hash value + * import { Hash, pipe } from "effect" * * // Can also be used with pipe - * import { pipe } from "effect" * * const hash1 = Hash.hash("hello") * const hash2 = Hash.hash("world") @@ -170,18 +224,28 @@ export declare const combine: { * const result = pipe(hash1, Hash.combine(hash2)) * ``` * + * @see {@link hash} for computing hash values from arbitrary inputs + * @see {@link structureKeys} for hashing selected object fields without manual combination + * * @category hashing * @since 2.0.0 */ (self: number, b: number): number; }; /** - * Optimizes a hash value by applying bit manipulation techniques. + * Applies bit manipulation techniques to optimize a hash value. + * + * **When to use** + * + * Use to improve the bit distribution of a raw numeric hash value. + * + * **Details** * * This function takes a hash value and applies bitwise operations to improve * the distribution of hash values, reducing the likelihood of collisions. * - * @example + * **Example** (Optimizing a hash value) + * * ```ts * import { Hash } from "effect" * @@ -198,12 +262,19 @@ export declare const combine: { */ export declare const optimize: (n: number) => number; /** - * Checks if a value implements the Hash interface. + * Checks whether a value implements the Hash interface. + * + * **When to use** + * + * Use to detect whether an unknown value provides a custom hash implementation. + * + * **Details** * * This function determines whether a given value has the Hash symbol property, * indicating that it can provide its own hash value implementation. * - * @example + * **Example** (Checking for Hash support) + * * ```ts * import { Hash } from "effect" * @@ -226,11 +297,18 @@ export declare const isHash: (u: unknown) => u is Hash; /** * Computes a hash value for a number. * + * **When to use** + * + * Use to hash a JavaScript number with Effect's numeric hash semantics. + * + * **Details** + * * This function creates a hash value for numeric inputs, handling special cases * like NaN, Infinity, and -Infinity with distinct hash values. It uses bitwise operations to ensure good distribution * of hash values across different numeric inputs. * - * @example + * **Example** (Hashing numbers) + * * ```ts * import { Hash } from "effect" * @@ -250,11 +328,19 @@ export declare const number: (n: number) => number; /** * Computes a hash value for a string using the djb2 algorithm. * + * **When to use** + * + * Use when you need a string field to contribute to a custom structural hash + * implementation. + * + * **Details** + * * This function implements a variation of the djb2 hash algorithm, which is * known for its good distribution properties and speed. It processes each * character of the string to produce a consistent hash value. * - * @example + * **Example** (Hashing strings) + * * ```ts * import { Hash } from "effect" * @@ -273,11 +359,18 @@ export declare const string: (str: string) => number; /** * Computes a hash value for an object using only the specified keys. * + * **When to use** + * + * Use to hash an object by a selected set of property keys. + * + * **Details** + * * This function allows you to hash an object by considering only specific keys, * which is useful when you want to create a hash based on a subset of an object's * properties. * - * @example + * **Example** (Hashing selected object keys) + * * ```ts * import { Hash } from "effect" * @@ -301,13 +394,19 @@ export declare const string: (str: string) => number; */ export declare const structureKeys: (o: object, keys: Iterable) => number; /** - * Computes a hash value for an object using all of its enumerable keys. + * Computes a structural hash for an object using Effect's object key collection. + * + * **When to use** + * + * Use to hash an object from all structural keys collected by Effect. + * + * **Details** + * + * The hash is based on the object's structural keys and their values, including + * symbol keys and relevant prototype keys for non-plain objects. * - * This function creates a hash value based on all enumerable properties of an object. - * It's a convenient way to hash an entire object structure when you want to consider - * all its properties. + * **Example** (Hashing object structures) * - * @example * ```ts * import { Hash } from "effect" * @@ -328,13 +427,24 @@ export declare const structureKeys: (o: object, keys: Iterable) => */ export declare const structure: (o: A) => number; /** - * Computes a hash value for an array by hashing all of its elements. + * Computes a hash value for an iterable by hashing all of its elements. * - * This function creates a hash value based on all elements in the array. - * The order of elements matters, so arrays with the same elements in different - * orders will produce different hash values. + * **When to use** + * + * Use to hash the values yielded by an iterable with Effect hash semantics. + * + * **Details** + * + * The implementation folds element hashes from the seed `6151` with XOR and + * then optimizes the final hash. + * + * **Gotchas** + * + * A hash is not an equality proof. Because this implementation uses XOR, + * reordered inputs can produce the same hash. + * + * **Example** (Hashing arrays) * - * @example * ```ts * import { Hash } from "effect" * @@ -344,13 +454,14 @@ export declare const structure: (o: A) => number; * * console.log(Hash.array(arr1)) // hash of [1, 2, 3] * console.log(Hash.array(arr2)) // same hash as arr1 - * console.log(Hash.array(arr3)) // different hash (different order) + * console.log(Hash.array(arr3)) // may match reordered inputs * - * // Arrays with same elements in same order produce same hash * console.log(Hash.array(arr1) === Hash.array(arr2)) // true - * console.log(Hash.array(arr1) === Hash.array(arr3)) // false + * console.log(Hash.array(arr1) === Hash.array(arr3)) // true * ``` * + * @see {@link hash} for the general-purpose hash dispatcher + * * @category hashing * @since 2.0.0 */ diff --git a/.opencode/node_modules/effect/dist/Hash.d.ts.map b/.opencode/node_modules/effect/dist/Hash.d.ts.map index b87845edc44ddb6d32f3086136d0dfb3ff2ff92c..9a9d8e9b9b85d4d4273a614b6b5ab1aecf7d7e57 100644 --- a/.opencode/node_modules/effect/dist/Hash.d.ts.map +++ b/.opencode/node_modules/effect/dist/Hash.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Hash.d.ts","sourceRoot":"","sources":["../src/Hash.ts"],"names":[],"mappings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;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,QAAQ,GAAI,GAAG,MAAM,KAAG,MAAqD,CAAA;AAE1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,MAAM,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,IAA8B,CAAA;AAEvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,MAAM,GAAI,GAAG,MAAM,WAkB/B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,MAAM,GAAI,KAAK,MAAM,WAMjC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,aAAa,GAAI,GAAG,MAAM,EAAE,MAAM,QAAQ,CAAC,WAAW,CAAC,WAMnE,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,EAAE,GAAG,CAAC,WAA0C,CAAA;AAU1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,MAAiC,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Hash.js b/.opencode/node_modules/effect/dist/Hash.js index b00641a70493462c751e9f85ae107f7ed4548196..865619a02b9e3fe02ac595ba719cc6cca36e7eeb 100644 --- a/.opencode/node_modules/effect/dist/Hash.js +++ b/.opencode/node_modules/effect/dist/Hash.js @@ -1,9 +1,11 @@ /** - * This module provides utilities for hashing values in TypeScript. - * - * Hashing is the process of converting data into a fixed-size numeric value, - * typically used for data structures like hash tables, equality comparisons, - * and efficient data storage. + * Computes Effect hash values and defines the interface for objects that want + * to provide their own hash implementation. Hashes are small numeric + * fingerprints used by Effect data structures to bucket values quickly; they + * are not cryptographic digests and they are not proof that two values are + * equal. The module also includes helpers for primitive, structure, array, and + * reference-based hashes, plus functions for combining and optimizing numeric + * hash values. * * @since 2.0.0 */ @@ -11,29 +13,45 @@ import { dual } from "./Function.js"; import { byReferenceInstances, getAllObjectKeys } from "./internal/equal.js"; import { hasProperty } from "./Predicate.js"; /** - * The unique identifier used to identify objects that implement the Hash interface. + * Defines the unique identifier used to identify objects that implement the Hash interface. + * + * **When to use** + * + * Use as the computed property key for the method that supplies a custom hash + * value on a `Hash` implementor. * + * @see {@link Hash} for the interface implemented with this symbol + * @see {@link isHash} for checking whether a value implements `Hash` + * @see {@link hash} for computing hash values + * + * @category symbols * @since 2.0.0 */ export const symbol = "~effect/interfaces/Hash"; /** * Computes a hash value for any given value. * + * **When to use** + * + * Use to compute an Effect hash for primitives, collections, and hashable + * objects. + * + * **Details** + * * This function can hash primitives (numbers, strings, booleans, etc.) as well as * objects, arrays, and other complex data structures. It automatically handles * different types and provides a consistent hash value for equivalent inputs. * - * **⚠️ CRITICAL IMMUTABILITY REQUIREMENT**: Objects being hashed must be treated as - * immutable after their first hash computation. Hash results are cached, so mutating - * an object after hashing will lead to stale cached values and broken hash-based - * operations. For mutable objects, use referential equality by implementing custom - * `Hash` interface that hashes the object reference, not its content. + * **Gotchas** + * + * Objects being hashed must be treated as immutable after their first hash + * computation. Hash results are cached, so mutating an object after hashing will + * lead to stale cached values and broken hash-based operations. For mutable + * objects, implement a custom `Hash` interface that hashes the object reference + * rather than its content. * - * **FORBIDDEN**: Modifying objects after `Hash.hash()` has been called on them - * **ALLOWED**: Using immutable objects, or mutable objects with custom `Hash` interface - * that uses referential equality (hashes the object reference, not content) + * **Example** (Hashing different values) * - * @example * ```ts * import { Hash } from "effect" * @@ -45,7 +63,7 @@ export const symbol = "~effect/interfaces/Hash"; * // Hash objects and arrays * console.log(Hash.hash({ name: "John", age: 30 })) * console.log(Hash.hash([1, 2, 3])) - * console.log(Hash.hash(new Date("2023-01-01"))) + * console.log(Hash.hash({ id: "user-1", roles: ["admin", "editor"] })) * ``` * * @category hashing @@ -106,11 +124,18 @@ export const hash = self => { /** * Generates a random hash value for an object and caches it. * + * **When to use** + * + * Use to hash an object by reference identity instead of structural content. + * + * **Details** + * * This function creates a random hash value for objects that don't have their own * hash implementation. The hash value is cached using a WeakMap, so the same object * will always return the same hash value during its lifetime. * - * @example + * **Example** (Hashing objects by reference) + * * ```ts * import { Hash } from "effect" * @@ -136,16 +161,22 @@ export const random = self => { /** * Combines two hash values into a single hash value. * - * This function takes two hash values and combines them using a mathematical - * operation to produce a new hash value. It's useful for creating hash values - * of composite structures. + * **When to use** + * + * Use to build a hash for a composite value by folding together hash values for + * its parts. + * + * **Details** + * + * Supports both direct and pipeable usage. The implementation combines two + * hash values with `(self * 53) ^ b`. + * + * **Example** (Combining hash values) * - * @example * ```ts - * import { Hash } from "effect" // combined hash value + * import { Hash, pipe } from "effect" * * // Can also be used with pipe - * import { pipe } from "effect" * * const hash1 = Hash.hash("hello") * const hash2 = Hash.hash("world") @@ -156,17 +187,27 @@ export const random = self => { * const result = pipe(hash1, Hash.combine(hash2)) * ``` * + * @see {@link hash} for computing hash values from arbitrary inputs + * @see {@link structureKeys} for hashing selected object fields without manual combination + * * @category hashing * @since 2.0.0 */ export const combine = /*#__PURE__*/dual(2, (self, b) => self * 53 ^ b); /** - * Optimizes a hash value by applying bit manipulation techniques. + * Applies bit manipulation techniques to optimize a hash value. + * + * **When to use** + * + * Use to improve the bit distribution of a raw numeric hash value. + * + * **Details** * * This function takes a hash value and applies bitwise operations to improve * the distribution of hash values, reducing the likelihood of collisions. * - * @example + * **Example** (Optimizing a hash value) + * * ```ts * import { Hash } from "effect" * @@ -183,12 +224,19 @@ export const combine = /*#__PURE__*/dual(2, (self, b) => self * 53 ^ b); */ export const optimize = n => n & 0xbfffffff | n >>> 1 & 0x40000000; /** - * Checks if a value implements the Hash interface. + * Checks whether a value implements the Hash interface. + * + * **When to use** + * + * Use to detect whether an unknown value provides a custom hash implementation. + * + * **Details** * * This function determines whether a given value has the Hash symbol property, * indicating that it can provide its own hash value implementation. * - * @example + * **Example** (Checking for Hash support) + * * ```ts * import { Hash } from "effect" * @@ -211,11 +259,18 @@ export const isHash = u => hasProperty(u, symbol); /** * Computes a hash value for a number. * + * **When to use** + * + * Use to hash a JavaScript number with Effect's numeric hash semantics. + * + * **Details** + * * This function creates a hash value for numeric inputs, handling special cases * like NaN, Infinity, and -Infinity with distinct hash values. It uses bitwise operations to ensure good distribution * of hash values across different numeric inputs. * - * @example + * **Example** (Hashing numbers) + * * ```ts * import { Hash } from "effect" * @@ -253,11 +308,19 @@ export const number = n => { /** * Computes a hash value for a string using the djb2 algorithm. * + * **When to use** + * + * Use when you need a string field to contribute to a custom structural hash + * implementation. + * + * **Details** + * * This function implements a variation of the djb2 hash algorithm, which is * known for its good distribution properties and speed. It processes each * character of the string to produce a consistent hash value. * - * @example + * **Example** (Hashing strings) + * * ```ts * import { Hash } from "effect" * @@ -283,11 +346,18 @@ export const string = str => { /** * Computes a hash value for an object using only the specified keys. * + * **When to use** + * + * Use to hash an object by a selected set of property keys. + * + * **Details** + * * This function allows you to hash an object by considering only specific keys, * which is useful when you want to create a hash based on a subset of an object's * properties. * - * @example + * **Example** (Hashing selected object keys) + * * ```ts * import { Hash } from "effect" * @@ -317,13 +387,19 @@ export const structureKeys = (o, keys) => { return optimize(h); }; /** - * Computes a hash value for an object using all of its enumerable keys. + * Computes a structural hash for an object using Effect's object key collection. + * + * **When to use** + * + * Use to hash an object from all structural keys collected by Effect. * - * This function creates a hash value based on all enumerable properties of an object. - * It's a convenient way to hash an entire object structure when you want to consider - * all its properties. + * **Details** + * + * The hash is based on the object's structural keys and their values, including + * symbol keys and relevant prototype keys for non-plain objects. + * + * **Example** (Hashing object structures) * - * @example * ```ts * import { Hash } from "effect" * @@ -351,13 +427,24 @@ const iterableWith = (seed, f) => iter => { return optimize(h); }; /** - * Computes a hash value for an array by hashing all of its elements. + * Computes a hash value for an iterable by hashing all of its elements. + * + * **When to use** * - * This function creates a hash value based on all elements in the array. - * The order of elements matters, so arrays with the same elements in different - * orders will produce different hash values. + * Use to hash the values yielded by an iterable with Effect hash semantics. + * + * **Details** + * + * The implementation folds element hashes from the seed `6151` with XOR and + * then optimizes the final hash. + * + * **Gotchas** + * + * A hash is not an equality proof. Because this implementation uses XOR, + * reordered inputs can produce the same hash. + * + * **Example** (Hashing arrays) * - * @example * ```ts * import { Hash } from "effect" * @@ -367,13 +454,14 @@ const iterableWith = (seed, f) => iter => { * * console.log(Hash.array(arr1)) // hash of [1, 2, 3] * console.log(Hash.array(arr2)) // same hash as arr1 - * console.log(Hash.array(arr3)) // different hash (different order) + * console.log(Hash.array(arr3)) // may match reordered inputs * - * // Arrays with same elements in same order produce same hash * console.log(Hash.array(arr1) === Hash.array(arr2)) // true - * console.log(Hash.array(arr1) === Hash.array(arr3)) // false + * console.log(Hash.array(arr1) === Hash.array(arr3)) // true * ``` * + * @see {@link hash} for the general-purpose hash dispatcher + * * @category hashing * @since 2.0.0 */ diff --git a/.opencode/node_modules/effect/dist/Hash.js.map b/.opencode/node_modules/effect/dist/Hash.js.map index cffdcc77bc6a111fea56a5898904072c1ac27947..186c7601015c84acfeb02cbe07bcdf2edb1e0798 100644 --- a/.opencode/node_modules/effect/dist/Hash.js.map +++ b/.opencode/node_modules/effect/dist/Hash.js.map @@ -1 +1 @@ -{"version":3,"file":"Hash.js","names":["dual","byReferenceInstances","getAllObjectKeys","hasProperty","symbol","hash","self","number","string","toString","String","Date","toISOString","RegExp","has","random","hashCache","get","h","withVisitedTracking","isHash","Array","isArray","ArrayBuffer","isView","array","Map","hashMap","Set","hashSet","structure","set","Error","randomHashCache","Math","floor","Number","MAX_SAFE_INTEGER","combine","b","optimize","n","u","Infinity","str","i","length","charCodeAt","structureKeys","o","keys","key","iterableWith","seed","f","iter","element","k","v","WeakMap","visitedObjects","WeakSet","obj","fn","add","result","delete"],"sources":["../src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D,MAAM7B,OAAO,gBAAoCuB,YAAY,cAAC5C,MAAM,CAAC,KAAK,CAAC,EAAEH,IAAI,CAAC;AAElF,MAAM4B,eAAe,gBAAG,IAAI0B,OAAO,EAAe;AAClD,MAAM3C,SAAS,gBAAG,IAAI2C,OAAO,EAAe;AAC5C,MAAMC,cAAc,gBAAG,IAAIC,OAAO,EAAU;AAE5C,SAAS1C,mBAAmBA,CAAI2C,GAAW,EAAEC,EAAW;EACtD,IAAIH,cAAc,CAAC9C,GAAG,CAACgD,GAAG,CAAC,EAAE;IAC3B,OAAOtD,MAAM,CAAC,YAAY,CAAM;EAClC;EACAoD,cAAc,CAACI,GAAG,CAACF,GAAG,CAAC;EACvB,MAAMG,MAAM,GAAGF,EAAE,EAAE;EACnBH,cAAc,CAACM,MAAM,CAACJ,GAAG,CAAC;EAC1B,OAAOG,MAAM;AACf","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Hash.js","names":["dual","byReferenceInstances","getAllObjectKeys","hasProperty","symbol","hash","self","number","string","toString","String","Date","toISOString","RegExp","has","random","hashCache","get","h","withVisitedTracking","isHash","Array","isArray","ArrayBuffer","isView","array","Map","hashMap","Set","hashSet","structure","set","Error","randomHashCache","Math","floor","Number","MAX_SAFE_INTEGER","combine","b","optimize","n","u","Infinity","str","i","length","charCodeAt","structureKeys","o","keys","key","iterableWith","seed","f","iter","element","k","v","WeakMap","visitedObjects","WeakSet","obj","fn","add","result","delete"],"sources":["../src/Hash.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAWA,SAASA,IAAI,QAAQ,eAAe;AACpC,SAASC,oBAAoB,EAAEC,gBAAgB,QAAQ,qBAAqB;AAC5E,SAASC,WAAW,QAAQ,gBAAgB;AAE5C;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,MAAM,GAAG,yBAAyB;AAsC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,OAAO,MAAMC,IAAI,GAA+BC,IAAO,I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EAAU;AAE5C,SAAS1C,mBAAmBA,CAAI2C,GAAW,EAAEC,EAAW;EACtD,IAAIH,cAAc,CAAC9C,GAAG,CAACgD,GAAG,CAAC,EAAE;IAC3B,OAAOtD,MAAM,CAAC,YAAY,CAAM;EAClC;EACAoD,cAAc,CAACI,GAAG,CAACF,GAAG,CAAC;EACvB,MAAMG,MAAM,GAAGF,EAAE,EAAE;EACnBH,cAAc,CAACM,MAAM,CAACJ,GAAG,CAAC;EAC1B,OAAOG,MAAM;AACf","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/HashMap.d.ts b/.opencode/node_modules/effect/dist/HashMap.d.ts index 9c823ee78946127e1da76ccd6a0cdfd5c01322c5..c4638b505bbacfe33427e3e16fdfb3b571ffd044 100644 --- a/.opencode/node_modules/effect/dist/HashMap.d.ts +++ b/.opencode/node_modules/effect/dist/HashMap.d.ts @@ -1,4 +1,12 @@ /** + * Stores key/value entries in an immutable hash map. + * + * A `HashMap` hashes keys and resolves matches with Effect's + * structural equality rules. Lookup, insertion, removal, and transformation + * operations return new maps, while temporary mutation helpers support efficient + * batch updates. This module also includes constructors, iteration, conversion, + * mapping, filtering, and reducing helpers. + * * @since 2.0.0 */ import type { Equal } from "./Equal.ts"; @@ -13,9 +21,10 @@ declare const TypeId = "~effect/collections/HashMap"; * insertion, and deletion operations. It uses a Hash Array Mapped Trie (HAMT) internally * for structural sharing and optimal performance. * - * @example + * **Example** (Using basic HashMap operations) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * // Create a HashMap * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) @@ -32,8 +41,8 @@ declare const TypeId = "~effect/collections/HashMap"; * console.log(HashMap.size(updated)) // 4 * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface HashMap extends Iterable<[Key, Value]>, Equal, Pipeable, Inspectable { readonly [TypeId]: typeof TypeId; @@ -42,9 +51,10 @@ export interface HashMap extends Iterable<[Key, Value]>, Equ * The HashMap namespace contains type-level utilities and helper types * for working with HashMap instances. * - * @example + * **Example** (Extracting HashMap types) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * // Create a concrete HashMap for type extraction * const inventory = HashMap.make( @@ -70,7 +80,6 @@ export interface HashMap extends Iterable<[Key, Value]>, Equ * ``` * * @since 2.0.0 - * @category models */ export declare namespace HashMap { /** @@ -78,10 +87,10 @@ export declare namespace HashMap { * Takes an Option representing the current value and returns an Option * representing the new value. * - * @example + * **Example** (Updating values from Options) + * * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * @@ -93,16 +102,17 @@ export declare namespace HashMap { * console.log(HashMap.get(updated, "a")) // Option.some(2) * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ type UpdateFn = (option: Option) => Option; /** * This type-level utility extracts the key type `K` from a `HashMap` type. * - * @example + * **Example** (Extracting key types) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * // Create a HashMap to extract key type from * const userMap = HashMap.make( @@ -117,16 +127,18 @@ export declare namespace HashMap { * const getUserById = (id: UserKey) => HashMap.get(userMap, id) * console.log(getUserById("alice")) // Option.some({ name: "Alice", age: 30 }) * ``` + * + * @category utility types * @since 2.0.0 - * @category type-level */ type Key> = [T] extends [HashMap] ? _K : never; /** * This type-level utility extracts the value type `V` from a `HashMap` type. * - * @example + * **Example** (Extracting value types) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * // Create a HashMap with user data * const userMap = HashMap.make( @@ -145,16 +157,18 @@ export declare namespace HashMap { * const alice = HashMap.get(userMap, "alice") * // alice has type Option thanks to type extraction * ``` + * + * @category utility types * @since 2.0.0 - * @category type-level */ type Value> = [T] extends [HashMap] ? _V : never; /** * This type-level utility extracts the entry type `[K, V]` from a `HashMap` type. * - * @example + * **Example** (Extracting entry types) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * // Create a product catalog HashMap * const catalog = HashMap.make( @@ -170,21 +184,23 @@ export declare namespace HashMap { * return `${productId}: $${product.price} (${product.category})` * } * - * // Convert to entries and process - * const descriptions = HashMap.toEntries(catalog).map(processEntry) - * console.log(descriptions) // ["laptop: $999 (electronics)", "book: $29 (education)"] + * // Convert to entries, process, and sort for deterministic output + * const descriptions = HashMap.toEntries(catalog).map(processEntry).sort() + * console.log(descriptions) // ["book: $29 (education)", "laptop: $999 (electronics)"] * ``` + * + * @category utility types * @since 3.9.0 - * @category type-level */ type Entry> = [Key, Value]; } /** - * Checks if a value is a HashMap. + * Checks whether a value is a HashMap. + * + * **Example** (Checking HashMap values) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * const notMap = { a: 1 } @@ -194,16 +210,17 @@ export declare namespace HashMap { * console.log(HashMap.isHashMap(null)) // false * ``` * - * @since 2.0.0 * @category refinements + * @since 2.0.0 */ export declare const isHashMap: { /** - * Checks if a value is a HashMap. + * Checks whether a value is a HashMap. + * + * **Example** (Checking HashMap values) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * const notMap = { a: 1 } @@ -213,16 +230,17 @@ export declare const isHashMap: { * console.log(HashMap.isHashMap(null)) // false * ``` * - * @since 2.0.0 * @category refinements + * @since 2.0.0 */ (u: Iterable): u is HashMap; /** - * Checks if a value is a HashMap. + * Checks whether a value is a HashMap. + * + * **Example** (Checking HashMap values) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * const notMap = { a: 1 } @@ -232,49 +250,52 @@ export declare const isHashMap: { * console.log(HashMap.isHashMap(null)) // false * ``` * - * @since 2.0.0 * @category refinements + * @since 2.0.0 */ (u: unknown): u is HashMap; }; /** * Creates a new empty `HashMap`. * - * @example + * **Example** (Creating an empty HashMap) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.empty() * console.log(HashMap.isEmpty(map)) // true * console.log(HashMap.size(map)) // 0 * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const empty: () => HashMap; /** * Constructs a new `HashMap` from an array of key/value pairs. * - * @example + * **Example** (Creating a HashMap from entries) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * console.log(HashMap.size(map)) // 3 * console.log(HashMap.get(map, "b")) // Option.some(2) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const make: >(...entries: Entries) => HashMap; /** * Creates a new `HashMap` from an iterable collection of key/value pairs. * - * @example + * **Example** (Creating a HashMap from an iterable) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const entries = [["a", 1], ["b", 2], ["c", 3]] as const * const map = HashMap.fromIterable(entries) @@ -282,16 +303,17 @@ export declare const make: >( * console.log(HashMap.get(map, "a")) // Option.some(1) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const fromIterable: (entries: Iterable) => HashMap; /** - * Checks if the `HashMap` contains any entries. + * Checks whether the `HashMap` contains no entries. + * + * **Example** (Checking for empty HashMaps) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const emptyMap = HashMap.empty() * const nonEmptyMap = HashMap.make(["a", 1]) @@ -300,17 +322,18 @@ export declare const fromIterable: (entries: Iterable) => * console.log(HashMap.isEmpty(nonEmptyMap)) // false * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export declare const isEmpty: (self: HashMap) => boolean; /** - * Safely lookup the value for the specified key in the `HashMap` using the + * Looks up the value for the specified key in the `HashMap` safely using the * internal hashing function. * - * @example + * **Example** (Looking up values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * @@ -322,17 +345,18 @@ export declare const isEmpty: (self: HashMap) => boolean; * console.log(value) // Option.some(2) * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export declare const get: { /** - * Safely lookup the value for the specified key in the `HashMap` using the + * Looks up the value for the specified key in the `HashMap` safely using the * internal hashing function. * - * @example + * **Example** (Looking up values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * @@ -344,17 +368,18 @@ export declare const get: { * console.log(value) // Option.some(2) * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (key: K1): (self: HashMap) => Option; /** - * Safely lookup the value for the specified key in the `HashMap` using the + * Looks up the value for the specified key in the `HashMap` safely using the * internal hashing function. * - * @example + * **Example** (Looking up values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * @@ -366,18 +391,18 @@ export declare const get: { * console.log(value) // Option.some(2) * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (self: HashMap, key: K1): Option; }; /** - * Lookup the value for the specified key in the `HashMap` using a custom hash. + * Looks up the value for the specified key in the `HashMap` safely using a custom hash. + * + * **Example** (Looking up values with a hash) * - * @example * ```ts - * import { Hash } from "effect" - * import * as HashMap from "effect/HashMap" + * import { Hash, HashMap } from "effect" * * // Useful when implementing custom equality for complex keys * const userMap = HashMap.make( @@ -398,17 +423,17 @@ export declare const get: { * console.log(notFound) // Option.none() * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export declare const getHash: { /** - * Lookup the value for the specified key in the `HashMap` using a custom hash. + * Looks up the value for the specified key in the `HashMap` safely using a custom hash. + * + * **Example** (Looking up values with a hash) * - * @example * ```ts - * import { Hash } from "effect" - * import * as HashMap from "effect/HashMap" + * import { Hash, HashMap } from "effect" * * // Useful when implementing custom equality for complex keys * const userMap = HashMap.make( @@ -429,17 +454,17 @@ export declare const getHash: { * console.log(notFound) // Option.none() * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (key: K1, hash: number): (self: HashMap) => Option; /** - * Lookup the value for the specified key in the `HashMap` using a custom hash. + * Looks up the value for the specified key in the `HashMap` safely using a custom hash. + * + * **Example** (Looking up values with a hash) * - * @example * ```ts - * import { Hash } from "effect" - * import * as HashMap from "effect/HashMap" + * import { Hash, HashMap } from "effect" * * // Useful when implementing custom equality for complex keys * const userMap = HashMap.make( @@ -460,22 +485,29 @@ export declare const getHash: { * console.log(notFound) // Option.none() * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (self: HashMap, key: K1, hash: number): Option; }; /** - * Unsafely lookup the value for the specified key in the `HashMap` using the + * Looks up the value for the specified key in the `HashMap` unsafely using the * internal hashing function. * - * ⚠️ **Warning**: This function throws an error if the key is not found. - * Use `HashMap.get` for safe access that returns `Option`. + * **When to use** + * + * Use when reading from a `HashMap` by a key known to exist, and throwing is an + * acceptable programming error for a missing key. + * + * **Gotchas** + * + * This function throws an error if the key is not found. Use `HashMap.get` for + * safe access that returns `Option`. + * + * **Example** (Unsafely looking up values) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const config = HashMap.make( * ["api_url", "https://api.example.com"], @@ -497,21 +529,28 @@ export declare const getHash: { * // Error: "HashMap.getUnsafe: key not found" * ``` * - * @since 2.0.0 * @category unsafe + * @since 4.0.0 */ export declare const getUnsafe: { /** - * Unsafely lookup the value for the specified key in the `HashMap` using the + * Looks up the value for the specified key in the `HashMap` unsafely using the * internal hashing function. * - * ⚠️ **Warning**: This function throws an error if the key is not found. - * Use `HashMap.get` for safe access that returns `Option`. + * **When to use** + * + * Use when reading from a `HashMap` by a key known to exist, and throwing is an + * acceptable programming error for a missing key. + * + * **Gotchas** + * + * This function throws an error if the key is not found. Use `HashMap.get` for + * safe access that returns `Option`. + * + * **Example** (Unsafely looking up values) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const config = HashMap.make( * ["api_url", "https://api.example.com"], @@ -533,21 +572,28 @@ export declare const getUnsafe: { * // Error: "HashMap.getUnsafe: key not found" * ``` * - * @since 2.0.0 * @category unsafe + * @since 4.0.0 */ (key: K1): (self: HashMap) => V; /** - * Unsafely lookup the value for the specified key in the `HashMap` using the + * Looks up the value for the specified key in the `HashMap` unsafely using the * internal hashing function. * - * ⚠️ **Warning**: This function throws an error if the key is not found. - * Use `HashMap.get` for safe access that returns `Option`. + * **When to use** + * + * Use when reading from a `HashMap` by a key known to exist, and throwing is an + * acceptable programming error for a missing key. + * + * **Gotchas** + * + * This function throws an error if the key is not found. Use `HashMap.get` for + * safe access that returns `Option`. + * + * **Example** (Unsafely looking up values) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const config = HashMap.make( * ["api_url", "https://api.example.com"], @@ -569,17 +615,18 @@ export declare const getUnsafe: { * // Error: "HashMap.getUnsafe: key not found" * ``` * - * @since 2.0.0 * @category unsafe + * @since 4.0.0 */ (self: HashMap, key: K1): V; }; /** - * Checks if the specified key has an entry in the `HashMap`. + * Checks whether the specified key has an entry in the `HashMap`. + * + * **Example** (Checking for keys) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * @@ -591,16 +638,17 @@ export declare const getUnsafe: { * console.log(hasB) // true * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export declare const has: { /** - * Checks if the specified key has an entry in the `HashMap`. + * Checks whether the specified key has an entry in the `HashMap`. + * + * **Example** (Checking for keys) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * @@ -612,16 +660,17 @@ export declare const has: { * console.log(hasB) // true * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (key: K1): (self: HashMap) => boolean; /** - * Checks if the specified key has an entry in the `HashMap`. + * Checks whether the specified key has an entry in the `HashMap`. + * + * **Example** (Checking for keys) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * @@ -633,19 +682,19 @@ export declare const has: { * console.log(hasB) // true * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (self: HashMap, key: K1): boolean; }; /** - * Checks if the specified key has an entry in the `HashMap` using a custom + * Checks whether the specified key has an entry in the `HashMap` using a custom * hash. * - * @example + * **Example** (Checking keys with a hash) + * * ```ts - * import { Hash } from "effect" - * import * as HashMap from "effect/HashMap" + * import { Hash, HashMap } from "effect" * * // Create a map with case-sensitive keys * const userMap = HashMap.make( @@ -657,23 +706,26 @@ export declare const has: { * const exactHash = Hash.string("Admin") * console.log(HashMap.hasHash(userMap, "Admin", exactHash)) // true * - * // Check case-insensitive by using custom hash - * const caseInsensitiveHash = Hash.string("admin".toLowerCase()) - * console.log(HashMap.hasHash(userMap, "admin", caseInsensitiveHash)) // false (different hash) + * // A matching hash does not override key equality + * console.log(HashMap.hasHash(userMap, "admin", exactHash)) // false + * + * // A different hash also cannot find the existing key + * const lowercaseHash = Hash.string("admin") + * console.log(HashMap.hasHash(userMap, "Admin", lowercaseHash)) // false * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export declare const hasHash: { /** - * Checks if the specified key has an entry in the `HashMap` using a custom + * Checks whether the specified key has an entry in the `HashMap` using a custom * hash. * - * @example + * **Example** (Checking keys with a hash) + * * ```ts - * import { Hash } from "effect" - * import * as HashMap from "effect/HashMap" + * import { Hash, HashMap } from "effect" * * // Create a map with case-sensitive keys * const userMap = HashMap.make( @@ -685,23 +737,26 @@ export declare const hasHash: { * const exactHash = Hash.string("Admin") * console.log(HashMap.hasHash(userMap, "Admin", exactHash)) // true * - * // Check case-insensitive by using custom hash - * const caseInsensitiveHash = Hash.string("admin".toLowerCase()) - * console.log(HashMap.hasHash(userMap, "admin", caseInsensitiveHash)) // false (different hash) + * // A matching hash does not override key equality + * console.log(HashMap.hasHash(userMap, "admin", exactHash)) // false + * + * // A different hash also cannot find the existing key + * const lowercaseHash = Hash.string("admin") + * console.log(HashMap.hasHash(userMap, "Admin", lowercaseHash)) // false * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (key: K1, hash: number): (self: HashMap) => boolean; /** - * Checks if the specified key has an entry in the `HashMap` using a custom + * Checks whether the specified key has an entry in the `HashMap` using a custom * hash. * - * @example + * **Example** (Checking keys with a hash) + * * ```ts - * import { Hash } from "effect" - * import * as HashMap from "effect/HashMap" + * import { Hash, HashMap } from "effect" * * // Create a map with case-sensitive keys * const userMap = HashMap.make( @@ -713,62 +768,68 @@ export declare const hasHash: { * const exactHash = Hash.string("Admin") * console.log(HashMap.hasHash(userMap, "Admin", exactHash)) // true * - * // Check case-insensitive by using custom hash - * const caseInsensitiveHash = Hash.string("admin".toLowerCase()) - * console.log(HashMap.hasHash(userMap, "admin", caseInsensitiveHash)) // false (different hash) + * // A matching hash does not override key equality + * console.log(HashMap.hasHash(userMap, "admin", exactHash)) // false + * + * // A different hash also cannot find the existing key + * const lowercaseHash = Hash.string("admin") + * console.log(HashMap.hasHash(userMap, "Admin", lowercaseHash)) // false * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (self: HashMap, key: K1, hash: number): boolean; }; /** - * Checks if an element matching the given predicate exists in the given `HashMap`. + * Checks whether an element matching the given predicate exists in the given `HashMap`. + * + * **Example** (Checking entries by predicate) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const hm = HashMap.make([1, "a"]) * HashMap.hasBy(hm, (value, key) => value === "a" && key === 1) // -> true * HashMap.hasBy(hm, (value) => value === "b") // -> false * ``` * - * @since 3.16.0 * @category elements + * @since 3.16.0 */ export declare const hasBy: { /** - * Checks if an element matching the given predicate exists in the given `HashMap`. + * Checks whether an element matching the given predicate exists in the given `HashMap`. + * + * **Example** (Checking entries by predicate) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const hm = HashMap.make([1, "a"]) * HashMap.hasBy(hm, (value, key) => value === "a" && key === 1) // -> true * HashMap.hasBy(hm, (value) => value === "b") // -> false * ``` * - * @since 3.16.0 * @category elements + * @since 3.16.0 */ (predicate: (value: NoInfer, key: NoInfer) => boolean): (self: HashMap) => boolean; /** - * Checks if an element matching the given predicate exists in the given `HashMap`. + * Checks whether an element matching the given predicate exists in the given `HashMap`. + * + * **Example** (Checking entries by predicate) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const hm = HashMap.make([1, "a"]) * HashMap.hasBy(hm, (value, key) => value === "a" && key === 1) // -> true * HashMap.hasBy(hm, (value) => value === "b") // -> false * ``` * - * @since 3.16.0 * @category elements + * @since 3.16.0 */ (self: HashMap, predicate: (value: NoInfer, key: NoInfer) => boolean): boolean; }; @@ -776,9 +837,10 @@ export declare const hasBy: { * Sets the specified key to the specified value using the internal hashing * function. * - * @example + * **Example** (Setting a value) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1]) * const map2 = HashMap.set(map1, "b", 2) @@ -790,17 +852,18 @@ export declare const hasBy: { * console.log(HashMap.size(map1)) // 1 * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ export declare const set: { /** * Sets the specified key to the specified value using the internal hashing * function. * - * @example + * **Example** (Setting a value) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1]) * const map2 = HashMap.set(map1, "b", 2) @@ -812,17 +875,18 @@ export declare const set: { * console.log(HashMap.size(map1)) // 1 * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ (key: K, value: V): (self: HashMap) => HashMap; /** * Sets the specified key to the specified value using the internal hashing * function. * - * @example + * **Example** (Setting a value) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1]) * const map2 = HashMap.set(map1, "b", 2) @@ -834,49 +898,52 @@ export declare const set: { * console.log(HashMap.size(map1)) // 1 * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ (self: HashMap, key: K, value: V): HashMap; }; /** * Returns an `IterableIterator` of the keys within the `HashMap`. * - * @example + * **Example** (Iterating keys) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const keys = Array.from(HashMap.keys(map)) * console.log(keys.sort()) // ["a", "b", "c"] * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export declare const keys: (self: HashMap) => IterableIterator; /** * Returns an `IterableIterator` of the values within the `HashMap`. * - * @example + * **Example** (Iterating values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const values = Array.from(HashMap.values(map)) * console.log(values.sort()) // [1, 2, 3] * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export declare const values: (self: HashMap) => IterableIterator; /** * Returns an `Array` of the values within the `HashMap`. * - * @example + * **Example** (Converting values to an array) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const employees = HashMap.make( * ["alice", { department: "engineering", salary: 90000 }], @@ -897,16 +964,17 @@ export declare const values: (self: HashMap) => IterableIterator; * console.log(engineers.length) // 2 * ``` * - * @since 3.13.0 * @category getters + * @since 3.13.0 */ export declare const toValues: (self: HashMap) => Array; /** * Returns an `IterableIterator` of the entries within the `HashMap`. * - * @example + * **Example** (Iterating entries) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * // Create a configuration map * const config = HashMap.make( @@ -915,32 +983,30 @@ export declare const toValues: (self: HashMap) => Array; * ["cache.enabled", "true"] * ) * - * // Get entries iterator for processing - * const entries = HashMap.entries(config) + * // Sort the derived array for deterministic output + * const settings = Array.from(HashMap.entries(config)) + * .sort(([left], [right]) => left.localeCompare(right)) + * .map(([key, value]) => `Setting ${key} = ${value}`) * - * // Process each configuration entry - * for (const [key, value] of entries) { - * console.log(`Setting ${key} = ${value}`) - * } - * // Setting database.host = localhost - * // Setting database.port = 5432 - * // Setting cache.enabled = true + * console.log(settings) + * // ["Setting cache.enabled = true", "Setting database.host = localhost", "Setting database.port = 5432"] * * // Convert to array when you need all entries at once * const allEntries = Array.from(HashMap.entries(config)) * console.log(allEntries.length) // 3 * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export declare const entries: (self: HashMap) => IterableIterator<[K, V]>; /** * Returns an `Array<[K, V]>` of the entries within the `HashMap`. * - * @example + * **Example** (Converting entries to an array) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const gameScores = HashMap.make( * ["alice", 1250], @@ -963,16 +1029,17 @@ export declare const entries: (self: HashMap) => IterableIterator<[K * const sortedMap = HashMap.fromIterable(scoreEntries) * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export declare const toEntries: (self: HashMap) => Array<[K, V]>; /** * Returns the number of entries within the `HashMap`. * - * @example + * **Example** (Getting the size) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const emptyMap = HashMap.empty() * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) @@ -981,16 +1048,22 @@ export declare const toEntries: (self: HashMap) => Array<[K, V]>; * console.log(HashMap.size(map)) // 3 * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export declare const size: (self: HashMap) => number; /** - * Marks the `HashMap` as mutable for performance optimization during batch operations. + * Creates a transient mutable `HashMap` for efficient batched updates. + * + * **Details** + * + * Apply updates to the returned map, then call `endMutation` to finish the + * mutation window and use the result as an immutable `HashMap`. + * + * **Example** (Beginning batch mutation) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1]) * @@ -1007,16 +1080,17 @@ export declare const size: (self: HashMap) => number; * console.log(HashMap.size(result)) // 2 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export declare const beginMutation: (self: HashMap) => HashMap; /** * Marks the `HashMap` as immutable, completing the mutation cycle. * - * @example + * **Example** (Ending batch mutation) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * // Start with an existing map * const original = HashMap.make(["x", 10], ["y", 20]) @@ -1037,16 +1111,23 @@ export declare const beginMutation: (self: HashMap) => HashMap * console.log(HashMap.get(final, "z")) // Option.some(30) * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export declare const endMutation: (self: HashMap) => HashMap; /** - * Mutates the `HashMap` within the context of the provided function. + * Runs a batch of updates against a transient mutable copy of the `HashMap` + * and returns the finalized immutable result. + * + * **Details** + * + * The callback may call mutation-oriented helpers such as `set` and `remove` + * on the transient map. + * + * **Example** (Applying batched mutations) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1]) * const map2 = HashMap.mutate(map1, (mutable) => { @@ -1056,16 +1137,23 @@ export declare const endMutation: (self: HashMap) => HashMap; * // Returns a new HashMap with mutations applied * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export declare const mutate: { /** - * Mutates the `HashMap` within the context of the provided function. + * Runs a batch of updates against a transient mutable copy of the `HashMap` + * and returns the finalized immutable result. + * + * **Details** + * + * The callback may call mutation-oriented helpers such as `set` and `remove` + * on the transient map. + * + * **Example** (Applying batched mutations) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1]) * const map2 = HashMap.mutate(map1, (mutable) => { @@ -1075,16 +1163,23 @@ export declare const mutate: { * // Returns a new HashMap with mutations applied * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ (f: (self: HashMap) => void): (self: HashMap) => HashMap; /** - * Mutates the `HashMap` within the context of the provided function. + * Runs a batch of updates against a transient mutable copy of the `HashMap` + * and returns the finalized immutable result. + * + * **Details** + * + * The callback may call mutation-oriented helpers such as `set` and `remove` + * on the transient map. + * + * **Example** (Applying batched mutations) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1]) * const map2 = HashMap.mutate(map1, (mutable) => { @@ -1094,23 +1189,24 @@ export declare const mutate: { * // Returns a new HashMap with mutations applied * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ (self: HashMap, f: (self: HashMap) => void): HashMap; }; /** - * Set or remove the specified key in the `HashMap` using the specified - * update function. The value of the specified key will be computed using the - * provided hash. + * Sets or removes the specified key using an update function. * - * The update function will be invoked with the current value of the key if it - * exists, or `None` if no such value exists. + * **Details** + * + * The update function receives `Some(value)` when the key exists or `None` + * when it does not. Returning `Some(newValue)` stores the value, and returning + * `None` removes the key or leaves it absent. + * + * **Example** (Updating values with Options) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * @@ -1122,22 +1218,23 @@ export declare const mutate: { * console.log(HashMap.get(updated, "a")) // Option.some(2) * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ export declare const modifyAt: { /** - * Set or remove the specified key in the `HashMap` using the specified - * update function. The value of the specified key will be computed using the - * provided hash. + * Sets or removes the specified key using an update function. + * + * **Details** + * + * The update function receives `Some(value)` when the key exists or `None` + * when it does not. Returning `Some(newValue)` stores the value, and returning + * `None` removes the key or leaves it absent. * - * The update function will be invoked with the current value of the key if it - * exists, or `None` if no such value exists. + * **Example** (Updating values with Options) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * @@ -1149,22 +1246,23 @@ export declare const modifyAt: { * console.log(HashMap.get(updated, "a")) // Option.some(2) * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ (key: K, f: HashMap.UpdateFn): (self: HashMap) => HashMap; /** - * Set or remove the specified key in the `HashMap` using the specified - * update function. The value of the specified key will be computed using the - * provided hash. + * Sets or removes the specified key using an update function. * - * The update function will be invoked with the current value of the key if it - * exists, or `None` if no such value exists. + * **Details** + * + * The update function receives `Some(value)` when the key exists or `None` + * when it does not. Returning `Some(newValue)` stores the value, and returning + * `None` removes the key or leaves it absent. + * + * **Example** (Updating values with Options) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * @@ -1176,26 +1274,25 @@ export declare const modifyAt: { * console.log(HashMap.get(updated, "a")) // Option.some(2) * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ (self: HashMap, key: K, f: HashMap.UpdateFn): HashMap; }; /** - * Alter the value of the specified key in the `HashMap` using the specified - * update function. The value of the specified key will be computed using the - * provided hash. + * Sets or removes the specified key using a precomputed hash and an update + * function. + * + * **Details** * - * The update function will be invoked with the current value of the key if it - * exists, or `None` if no such value exists. + * The update function receives `Some(value)` when the key exists or `None` + * when it does not. Returning `Some(newValue)` stores the value, and returning + * `None` removes the key or leaves it absent. * - * This function will always either update or insert a value into the `HashMap`. + * **Example** (Updating values with a hash) * - * @example * ```ts - * import { Hash } from "effect" - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { Hash, HashMap, Option } from "effect" * * // Useful when working with precomputed hashes for performance * const counters = HashMap.make(["downloads", 100], ["views", 250]) @@ -1229,25 +1326,24 @@ export declare const modifyAt: { * console.log(HashMap.get(withClicks, "clicks")) // Option.some(1) * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ export declare const modifyHash: { /** - * Alter the value of the specified key in the `HashMap` using the specified - * update function. The value of the specified key will be computed using the - * provided hash. + * Sets or removes the specified key using a precomputed hash and an update + * function. + * + * **Details** * - * The update function will be invoked with the current value of the key if it - * exists, or `None` if no such value exists. + * The update function receives `Some(value)` when the key exists or `None` + * when it does not. Returning `Some(newValue)` stores the value, and returning + * `None` removes the key or leaves it absent. * - * This function will always either update or insert a value into the `HashMap`. + * **Example** (Updating values with a hash) * - * @example * ```ts - * import { Hash } from "effect" - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { Hash, HashMap, Option } from "effect" * * // Useful when working with precomputed hashes for performance * const counters = HashMap.make(["downloads", 100], ["views", 250]) @@ -1281,25 +1377,24 @@ export declare const modifyHash: { * console.log(HashMap.get(withClicks, "clicks")) // Option.some(1) * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ (key: K, hash: number, f: HashMap.UpdateFn): (self: HashMap) => HashMap; /** - * Alter the value of the specified key in the `HashMap` using the specified - * update function. The value of the specified key will be computed using the - * provided hash. + * Sets or removes the specified key using a precomputed hash and an update + * function. * - * The update function will be invoked with the current value of the key if it - * exists, or `None` if no such value exists. + * **Details** * - * This function will always either update or insert a value into the `HashMap`. + * The update function receives `Some(value)` when the key exists or `None` + * when it does not. Returning `Some(newValue)` stores the value, and returning + * `None` removes the key or leaves it absent. + * + * **Example** (Updating values with a hash) * - * @example * ```ts - * import { Hash } from "effect" - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { Hash, HashMap, Option } from "effect" * * // Useful when working with precomputed hashes for performance * const counters = HashMap.make(["downloads", 100], ["views", 250]) @@ -1333,17 +1428,18 @@ export declare const modifyHash: { * console.log(HashMap.get(withClicks, "clicks")) // Option.some(1) * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ (self: HashMap, key: K, hash: number, f: HashMap.UpdateFn): HashMap; }; /** * Updates the value of the specified key within the `HashMap` if it exists. * - * @example + * **Example** (Modifying existing values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const map2 = HashMap.modify(map1, "a", (value) => value * 3) @@ -1352,16 +1448,17 @@ export declare const modifyHash: { * console.log(HashMap.get(map2, "b")) // Option.some(2) * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ export declare const modify: { /** * Updates the value of the specified key within the `HashMap` if it exists. * - * @example + * **Example** (Modifying existing values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const map2 = HashMap.modify(map1, "a", (value) => value * 3) @@ -1370,16 +1467,17 @@ export declare const modify: { * console.log(HashMap.get(map2, "b")) // Option.some(2) * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ (key: K, f: (v: V) => V): (self: HashMap) => HashMap; /** * Updates the value of the specified key within the `HashMap` if it exists. * - * @example + * **Example** (Modifying existing values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const map2 = HashMap.modify(map1, "a", (value) => value * 3) @@ -1388,17 +1486,23 @@ export declare const modify: { * console.log(HashMap.get(map2, "b")) // Option.some(2) * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ (self: HashMap, key: K, f: (v: V) => V): HashMap; }; /** - * Performs a union of this `HashMap` and that `HashMap`. + * Combines two `HashMap`s into one. + * + * **Details** + * + * Entries from `that` are inserted into `self`; when both maps contain an + * equal key, the value from `that` replaces the value from `self`. + * + * **Example** (Combining HashMaps) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const map2 = HashMap.make(["b", 20], ["c", 3]) @@ -1408,16 +1512,22 @@ export declare const modify: { * console.log(HashMap.get(union, "b")) // Option.some(20) - map2 wins * ``` * - * @since 2.0.0 * @category combining + * @since 2.0.0 */ export declare const union: { /** - * Performs a union of this `HashMap` and that `HashMap`. + * Combines two `HashMap`s into one. + * + * **Details** + * + * Entries from `that` are inserted into `self`; when both maps contain an + * equal key, the value from `that` replaces the value from `self`. + * + * **Example** (Combining HashMaps) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const map2 = HashMap.make(["b", 20], ["c", 3]) @@ -1427,16 +1537,22 @@ export declare const union: { * console.log(HashMap.get(union, "b")) // Option.some(20) - map2 wins * ``` * - * @since 2.0.0 * @category combining + * @since 2.0.0 */ (that: HashMap): (self: HashMap) => HashMap; /** - * Performs a union of this `HashMap` and that `HashMap`. + * Combines two `HashMap`s into one. + * + * **Details** + * + * Entries from `that` are inserted into `self`; when both maps contain an + * equal key, the value from `that` replaces the value from `self`. + * + * **Example** (Combining HashMaps) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const map2 = HashMap.make(["b", 20], ["c", 3]) @@ -1446,18 +1562,19 @@ export declare const union: { * console.log(HashMap.get(union, "b")) // Option.some(20) - map2 wins * ``` * - * @since 2.0.0 * @category combining + * @since 2.0.0 */ (self: HashMap, that: HashMap): HashMap; }; /** - * Remove the entry for the specified key in the `HashMap` using the internal + * Removes the entry for the specified key in the `HashMap` using the internal * hashing function. * - * @example + * **Example** (Removing a key) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const map2 = HashMap.remove(map1, "b") @@ -1467,17 +1584,18 @@ export declare const union: { * console.log(HashMap.has(map2, "a")) // true * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ export declare const remove: { /** - * Remove the entry for the specified key in the `HashMap` using the internal + * Removes the entry for the specified key in the `HashMap` using the internal * hashing function. * - * @example + * **Example** (Removing a key) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const map2 = HashMap.remove(map1, "b") @@ -1487,17 +1605,18 @@ export declare const remove: { * console.log(HashMap.has(map2, "a")) // true * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ (key: K): (self: HashMap) => HashMap; /** - * Remove the entry for the specified key in the `HashMap` using the internal + * Removes the entry for the specified key in the `HashMap` using the internal * hashing function. * - * @example + * **Example** (Removing a key) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const map2 = HashMap.remove(map1, "b") @@ -1507,17 +1626,18 @@ export declare const remove: { * console.log(HashMap.has(map2, "a")) // true * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ (self: HashMap, key: K): HashMap; }; /** * Removes all entries in the `HashMap` which have the specified keys. * - * @example + * **Example** (Removing multiple keys) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4]) * const map2 = HashMap.removeMany(map1, ["b", "d"]) @@ -1527,16 +1647,17 @@ export declare const remove: { * console.log(HashMap.has(map2, "c")) // true * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ export declare const removeMany: { /** * Removes all entries in the `HashMap` which have the specified keys. * - * @example + * **Example** (Removing multiple keys) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4]) * const map2 = HashMap.removeMany(map1, ["b", "d"]) @@ -1546,16 +1667,17 @@ export declare const removeMany: { * console.log(HashMap.has(map2, "c")) // true * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ (keys: Iterable): (self: HashMap) => HashMap; /** * Removes all entries in the `HashMap` which have the specified keys. * - * @example + * **Example** (Removing multiple keys) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4]) * const map2 = HashMap.removeMany(map1, ["b", "d"]) @@ -1565,17 +1687,18 @@ export declare const removeMany: { * console.log(HashMap.has(map2, "c")) // true * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ (self: HashMap, keys: Iterable): HashMap; }; /** * Sets multiple key-value pairs in the `HashMap`. * - * @example + * **Example** (Setting multiple entries) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const newEntries = [["c", 3], ["d", 4], ["a", 10]] as const // "a" will be overwritten @@ -1586,16 +1709,17 @@ export declare const removeMany: { * console.log(HashMap.get(map2, "c")) // Option.some(3) * ``` * - * @since 2.0.0 - * @category transformations + * @category transforming + * @since 4.0.0 */ export declare const setMany: { /** * Sets multiple key-value pairs in the `HashMap`. * - * @example + * **Example** (Setting multiple entries) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const newEntries = [["c", 3], ["d", 4], ["a", 10]] as const // "a" will be overwritten @@ -1606,16 +1730,17 @@ export declare const setMany: { * console.log(HashMap.get(map2, "c")) // Option.some(3) * ``` * - * @since 2.0.0 - * @category transformations + * @category transforming + * @since 4.0.0 */ (entries: Iterable): (self: HashMap) => HashMap; /** * Sets multiple key-value pairs in the `HashMap`. * - * @example + * **Example** (Setting multiple entries) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const newEntries = [["c", 3], ["d", 4], ["a", 10]] as const // "a" will be overwritten @@ -1626,17 +1751,18 @@ export declare const setMany: { * console.log(HashMap.get(map2, "c")) // Option.some(3) * ``` * - * @since 2.0.0 - * @category transformations + * @category transforming + * @since 4.0.0 */ (self: HashMap, entries: Iterable): HashMap; }; /** * Maps over the entries of the `HashMap` using the specified function. * - * @example + * **Example** (Mapping values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const map2 = HashMap.map(map1, (value, key) => `${key}:${value * 2}`) @@ -1645,16 +1771,17 @@ export declare const setMany: { * console.log(HashMap.get(map2, "b")) // Option.some("b:4") * ``` * - * @since 2.0.0 * @category mapping + * @since 2.0.0 */ export declare const map: { /** * Maps over the entries of the `HashMap` using the specified function. * - * @example + * **Example** (Mapping values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const map2 = HashMap.map(map1, (value, key) => `${key}:${value * 2}`) @@ -1663,16 +1790,17 @@ export declare const map: { * console.log(HashMap.get(map2, "b")) // Option.some("b:4") * ``` * - * @since 2.0.0 * @category mapping + * @since 2.0.0 */ (f: (value: V, key: K) => A): (self: HashMap) => HashMap; /** * Maps over the entries of the `HashMap` using the specified function. * - * @example + * **Example** (Mapping values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const map2 = HashMap.map(map1, (value, key) => `${key}:${value * 2}`) @@ -1681,19 +1809,22 @@ export declare const map: { * console.log(HashMap.get(map2, "b")) // Option.some("b:4") * ``` * - * @since 2.0.0 * @category mapping + * @since 2.0.0 */ (self: HashMap, f: (value: V, key: K) => A): HashMap; }; /** - * Chains over the entries of the `HashMap` using the specified function. + * Maps each entry to a `HashMap` and flattens the results. * - * **NOTE**: the hash and equal of both maps have to be the same. + * **Gotchas** + * + * The hash and equality behavior of both maps have to be the same. + * + * **Example** (FlatMapping values) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const map2 = HashMap.flatMap( @@ -1706,18 +1837,21 @@ export declare const map: { * console.log(HashMap.get(map2, "b2")) // Option.some(4) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ export declare const flatMap: { /** - * Chains over the entries of the `HashMap` using the specified function. + * Maps each entry to a `HashMap` and flattens the results. * - * **NOTE**: the hash and equal of both maps have to be the same. + * **Gotchas** + * + * The hash and equality behavior of both maps have to be the same. + * + * **Example** (FlatMapping values) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const map2 = HashMap.flatMap( @@ -1730,18 +1864,21 @@ export declare const flatMap: { * console.log(HashMap.get(map2, "b2")) // Option.some(4) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ (f: (value: A, key: K) => HashMap): (self: HashMap) => HashMap; /** - * Chains over the entries of the `HashMap` using the specified function. + * Maps each entry to a `HashMap` and flattens the results. * - * **NOTE**: the hash and equal of both maps have to be the same. + * **Gotchas** + * + * The hash and equality behavior of both maps have to be the same. + * + * **Example** (FlatMapping values) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const map2 = HashMap.flatMap( @@ -1754,17 +1891,18 @@ export declare const flatMap: { * console.log(HashMap.get(map2, "b2")) // Option.some(4) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ (self: HashMap, f: (value: A, key: K) => HashMap): HashMap; }; /** * Applies the specified function to the entries of the `HashMap`. * - * @example + * **Example** (Iterating with side effects) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * const collected: Array<[string, number]> = [] @@ -1776,16 +1914,17 @@ export declare const flatMap: { * console.log(collected.sort()) // [["a", 1], ["b", 2]] * ``` * - * @since 2.0.0 * @category traversing + * @since 2.0.0 */ export declare const forEach: { /** * Applies the specified function to the entries of the `HashMap`. * - * @example + * **Example** (Iterating with side effects) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * const collected: Array<[string, number]> = [] @@ -1797,16 +1936,17 @@ export declare const forEach: { * console.log(collected.sort()) // [["a", 1], ["b", 2]] * ``` * - * @since 2.0.0 * @category traversing + * @since 2.0.0 */ (f: (value: V, key: K) => void): (self: HashMap) => void; /** * Applies the specified function to the entries of the `HashMap`. * - * @example + * **Example** (Iterating with side effects) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * const collected: Array<[string, number]> = [] @@ -1818,17 +1958,18 @@ export declare const forEach: { * console.log(collected.sort()) // [["a", 1], ["b", 2]] * ``` * - * @since 2.0.0 * @category traversing + * @since 2.0.0 */ (self: HashMap, f: (value: V, key: K) => void): void; }; /** * Reduces the specified state over the entries of the `HashMap`. * - * @example + * **Example** (Reducing values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const sum = HashMap.reduce(map, 0, (acc, value) => acc + value) @@ -1836,16 +1977,17 @@ export declare const forEach: { * console.log(sum) // 6 * ``` * - * @since 2.0.0 * @category folding + * @since 2.0.0 */ export declare const reduce: { /** * Reduces the specified state over the entries of the `HashMap`. * - * @example + * **Example** (Reducing values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const sum = HashMap.reduce(map, 0, (acc, value) => acc + value) @@ -1853,16 +1995,17 @@ export declare const reduce: { * console.log(sum) // 6 * ``` * - * @since 2.0.0 * @category folding + * @since 2.0.0 */ (zero: Z, f: (accumulator: Z, value: V, key: K) => Z): (self: HashMap) => Z; /** * Reduces the specified state over the entries of the `HashMap`. * - * @example + * **Example** (Reducing values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const sum = HashMap.reduce(map, 0, (acc, value) => acc + value) @@ -1870,17 +2013,18 @@ export declare const reduce: { * console.log(sum) // 6 * ``` * - * @since 2.0.0 * @category folding + * @since 2.0.0 */ (self: HashMap, zero: Z, f: (accumulator: Z, value: V, key: K) => Z): Z; }; /** * Filters entries out of a `HashMap` using the specified predicate. * - * @example + * **Example** (Filtering entries) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4]) * const map2 = HashMap.filter(map1, (value) => value % 2 === 0) @@ -1891,16 +2035,17 @@ export declare const reduce: { * console.log(HashMap.has(map2, "a")) // false * ``` * - * @since 2.0.0 * @category filtering + * @since 2.0.0 */ export declare const filter: { /** * Filters entries out of a `HashMap` using the specified predicate. * - * @example + * **Example** (Filtering entries) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4]) * const map2 = HashMap.filter(map1, (value) => value % 2 === 0) @@ -1911,16 +2056,17 @@ export declare const filter: { * console.log(HashMap.has(map2, "a")) // false * ``` * - * @since 2.0.0 * @category filtering + * @since 2.0.0 */ (f: (a: NoInfer, k: K) => boolean): (self: HashMap) => HashMap; /** * Filters entries out of a `HashMap` using the specified predicate. * - * @example + * **Example** (Filtering entries) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4]) * const map2 = HashMap.filter(map1, (value) => value % 2 === 0) @@ -1931,18 +2077,18 @@ export declare const filter: { * console.log(HashMap.has(map2, "a")) // false * ``` * - * @since 2.0.0 * @category filtering + * @since 2.0.0 */ (self: HashMap, f: (a: A, k: K) => boolean): HashMap; }; /** * Filters out `None` values from a `HashMap` of `Options`s. * - * @example + * **Example** (Compacting Option values) + * * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const map1 = HashMap.make( * ["a", Option.some(1)], @@ -1956,18 +2102,18 @@ export declare const filter: { * console.log(HashMap.has(map2, "b")) // false * ``` * - * @since 2.0.0 * @category filtering + * @since 2.0.0 */ export declare const compact: (self: HashMap>) => HashMap; /** * Maps over the entries of the `HashMap` using the specified filter and keeps * only successful results. * - * @example + * **Example** (Filtering and mapping Results) + * * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Result from "effect/Result" + * import { HashMap, Result } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4]) * const map2 = HashMap.filterMap( @@ -1980,18 +2126,18 @@ export declare const compact: (self: HashMap>) => HashMap(f: (input: A, key: K) => Result): (self: HashMap) => HashMap; /** * Maps over the entries of the `HashMap` using the specified filter and keeps * only successful results. * - * @example + * **Example** (Filtering and mapping Results) + * * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Result from "effect/Result" + * import { HashMap, Result } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4]) * const map2 = HashMap.filterMap( @@ -2028,8 +2174,8 @@ export declare const filterMap: { * console.log(HashMap.get(map2, "d")) // Option.some(8) * ``` * - * @since 2.0.0 * @category filtering + * @since 2.0.0 */ (self: HashMap, f: (input: A, key: K) => Result): HashMap; }; @@ -2037,15 +2183,15 @@ export declare const filterMap: { * Returns the first element that satisfies the specified * predicate, or `None` if no such element exists. * - * @example + * **Example** (Finding the first matching entry) + * * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) - * const result = HashMap.findFirst(map, (value) => value > 1) - * console.log(result) // Option.some(["c", 3]) - * console.log(Option.getOrElse(result, () => ["", 0])) // ["c", 3] + * const result = HashMap.findFirst(map, (value, key) => key === "b" && value > 1) + * console.log(result) // Option.some(["b", 2]) + * console.log(Option.getOrElse(result, () => ["", 0])) // ["b", 2] * ``` * * @category elements @@ -2056,15 +2202,15 @@ export declare const findFirst: { * Returns the first element that satisfies the specified * predicate, or `None` if no such element exists. * - * @example + * **Example** (Finding the first matching entry) + * * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) - * const result = HashMap.findFirst(map, (value) => value > 1) - * console.log(result) // Option.some(["c", 3]) - * console.log(Option.getOrElse(result, () => ["", 0])) // ["c", 3] + * const result = HashMap.findFirst(map, (value, key) => key === "b" && value > 1) + * console.log(result) // Option.some(["b", 2]) + * console.log(Option.getOrElse(result, () => ["", 0])) // ["b", 2] * ``` * * @category elements @@ -2075,15 +2221,15 @@ export declare const findFirst: { * Returns the first element that satisfies the specified * predicate, or `None` if no such element exists. * - * @example + * **Example** (Finding the first matching entry) + * * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) - * const result = HashMap.findFirst(map, (value) => value > 1) - * console.log(result) // Option.some(["c", 3]) - * console.log(Option.getOrElse(result, () => ["", 0])) // ["c", 3] + * const result = HashMap.findFirst(map, (value, key) => key === "b" && value > 1) + * console.log(result) // Option.some(["b", 2]) + * console.log(Option.getOrElse(result, () => ["", 0])) // ["b", 2] * ``` * * @category elements @@ -2092,11 +2238,12 @@ export declare const findFirst: { (self: HashMap, predicate: (a: A, k: K) => boolean): Option<[K, A]>; }; /** - * Checks if any entry in a hashmap meets a specific condition. + * Checks whether any entry in a hashmap meets a specific condition. + * + * **Example** (Checking for any matching entry) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * @@ -2104,16 +2251,17 @@ export declare const findFirst: { * console.log(HashMap.some(map, (value) => value > 5)) // false * ``` * - * @since 3.13.0 * @category elements + * @since 3.13.0 */ export declare const some: { /** - * Checks if any entry in a hashmap meets a specific condition. + * Checks whether any entry in a hashmap meets a specific condition. + * + * **Example** (Checking for any matching entry) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * @@ -2121,16 +2269,17 @@ export declare const some: { * console.log(HashMap.some(map, (value) => value > 5)) // false * ``` * - * @since 3.13.0 * @category elements + * @since 3.13.0 */ (predicate: (a: NoInfer, k: K) => boolean): (self: HashMap) => boolean; /** - * Checks if any entry in a hashmap meets a specific condition. + * Checks whether any entry in a hashmap meets a specific condition. + * + * **Example** (Checking for any matching entry) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * @@ -2138,17 +2287,18 @@ export declare const some: { * console.log(HashMap.some(map, (value) => value > 5)) // false * ``` * - * @since 3.13.0 * @category elements + * @since 3.13.0 */ (self: HashMap, predicate: (a: A, k: K) => boolean): boolean; }; /** - * Checks if all entries in a hashmap meets a specific condition. + * Checks whether all entries in a hashmap meets a specific condition. + * + * **Example** (Checking all entries) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * @@ -2156,19 +2306,17 @@ export declare const some: { * console.log(HashMap.every(map, (value) => value > 1)) // false * ``` * - * @param self - The hashmap to check. - * @param predicate - The condition to test entries (value, key). - * - * @since 3.14.0 * @category elements + * @since 3.14.0 */ export declare const every: { /** - * Checks if all entries in a hashmap meets a specific condition. + * Checks whether all entries in a hashmap meets a specific condition. + * + * **Example** (Checking all entries) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * @@ -2176,19 +2324,17 @@ export declare const every: { * console.log(HashMap.every(map, (value) => value > 1)) // false * ``` * - * @param self - The hashmap to check. - * @param predicate - The condition to test entries (value, key). - * - * @since 3.14.0 * @category elements + * @since 3.14.0 */ (predicate: (a: NoInfer, k: K) => boolean): (self: HashMap) => boolean; /** - * Checks if all entries in a hashmap meets a specific condition. + * Checks whether all entries in a hashmap meets a specific condition. + * + * **Example** (Checking all entries) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * @@ -2196,11 +2342,8 @@ export declare const every: { * console.log(HashMap.every(map, (value) => value > 1)) // false * ``` * - * @param self - The hashmap to check. - * @param predicate - The condition to test entries (value, key). - * - * @since 3.14.0 * @category elements + * @since 3.14.0 */ (self: HashMap, predicate: (a: A, k: K) => boolean): boolean; }; diff --git a/.opencode/node_modules/effect/dist/HashMap.d.ts.map b/.opencode/node_modules/effect/dist/HashMap.d.ts.map index 8c3dd8a342798f7c70785e8b6a0c6d9c30421978..72962c02425732a9f94af29ea7e71ee4cfe31f06 100644 --- a/.opencode/node_modules/effect/dist/HashMap.d.ts.map +++ b/.opencode/node_modules/effect/dist/HashMap.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"HashMap.d.ts","sourceRoot":"","sources":["../src/HashMap.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEzC,QAAA,MAAM,MAAM,gCAAyB,CAAA;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAE,SAAQ,QAAQ,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW;IACvG,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,O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AAC,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAA;CACxD,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/HashMap.js b/.opencode/node_modules/effect/dist/HashMap.js index d9e87055723d3b6e17b0646e262873419ff9c7a8..8cf175a247bcd62414179acc1a4fdcd28531f733 100644 --- a/.opencode/node_modules/effect/dist/HashMap.js +++ b/.opencode/node_modules/effect/dist/HashMap.js @@ -1,14 +1,23 @@ /** + * Stores key/value entries in an immutable hash map. + * + * A `HashMap` hashes keys and resolves matches with Effect's + * structural equality rules. Lookup, insertion, removal, and transformation + * operations return new maps, while temporary mutation helpers support efficient + * batch updates. This module also includes constructors, iteration, conversion, + * mapping, filtering, and reducing helpers. + * * @since 2.0.0 */ import * as internal from "./internal/hashMap.js"; const TypeId = internal.HashMapTypeId; /** - * Checks if a value is a HashMap. + * Checks whether a value is a HashMap. + * + * **Example** (Checking HashMap values) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * const notMap = { a: 1 } @@ -18,48 +27,51 @@ const TypeId = internal.HashMapTypeId; * console.log(HashMap.isHashMap(null)) // false * ``` * - * @since 2.0.0 * @category refinements + * @since 2.0.0 */ export const isHashMap = internal.isHashMap; /** * Creates a new empty `HashMap`. * - * @example + * **Example** (Creating an empty HashMap) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.empty() * console.log(HashMap.isEmpty(map)) // true * console.log(HashMap.size(map)) // 0 * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const empty = internal.empty; /** * Constructs a new `HashMap` from an array of key/value pairs. * - * @example + * **Example** (Creating a HashMap from entries) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * console.log(HashMap.size(map)) // 3 * console.log(HashMap.get(map, "b")) // Option.some(2) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const make = internal.make; /** * Creates a new `HashMap` from an iterable collection of key/value pairs. * - * @example + * **Example** (Creating a HashMap from an iterable) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const entries = [["a", 1], ["b", 2], ["c", 3]] as const * const map = HashMap.fromIterable(entries) @@ -67,16 +79,17 @@ export const make = internal.make; * console.log(HashMap.get(map, "a")) // Option.some(1) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const fromIterable = internal.fromIterable; /** - * Checks if the `HashMap` contains any entries. + * Checks whether the `HashMap` contains no entries. + * + * **Example** (Checking for empty HashMaps) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const emptyMap = HashMap.empty() * const nonEmptyMap = HashMap.make(["a", 1]) @@ -85,17 +98,18 @@ export const fromIterable = internal.fromIterable; * console.log(HashMap.isEmpty(nonEmptyMap)) // false * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export const isEmpty = internal.isEmpty; /** - * Safely lookup the value for the specified key in the `HashMap` using the + * Looks up the value for the specified key in the `HashMap` safely using the * internal hashing function. * - * @example + * **Example** (Looking up values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * @@ -107,17 +121,17 @@ export const isEmpty = internal.isEmpty; * console.log(value) // Option.some(2) * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export const get = internal.get; /** - * Lookup the value for the specified key in the `HashMap` using a custom hash. + * Looks up the value for the specified key in the `HashMap` safely using a custom hash. + * + * **Example** (Looking up values with a hash) * - * @example * ```ts - * import { Hash } from "effect" - * import * as HashMap from "effect/HashMap" + * import { Hash, HashMap } from "effect" * * // Useful when implementing custom equality for complex keys * const userMap = HashMap.make( @@ -138,21 +152,28 @@ export const get = internal.get; * console.log(notFound) // Option.none() * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export const getHash = internal.getHash; /** - * Unsafely lookup the value for the specified key in the `HashMap` using the + * Looks up the value for the specified key in the `HashMap` unsafely using the * internal hashing function. * - * ⚠️ **Warning**: This function throws an error if the key is not found. - * Use `HashMap.get` for safe access that returns `Option`. + * **When to use** + * + * Use when reading from a `HashMap` by a key known to exist, and throwing is an + * acceptable programming error for a missing key. + * + * **Gotchas** + * + * This function throws an error if the key is not found. Use `HashMap.get` for + * safe access that returns `Option`. + * + * **Example** (Unsafely looking up values) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const config = HashMap.make( * ["api_url", "https://api.example.com"], @@ -174,16 +195,17 @@ export const getHash = internal.getHash; * // Error: "HashMap.getUnsafe: key not found" * ``` * - * @since 2.0.0 * @category unsafe + * @since 4.0.0 */ export const getUnsafe = internal.getUnsafe; /** - * Checks if the specified key has an entry in the `HashMap`. + * Checks whether the specified key has an entry in the `HashMap`. + * + * **Example** (Checking for keys) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * @@ -195,18 +217,18 @@ export const getUnsafe = internal.getUnsafe; * console.log(hasB) // true * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export const has = internal.has; /** - * Checks if the specified key has an entry in the `HashMap` using a custom + * Checks whether the specified key has an entry in the `HashMap` using a custom * hash. * - * @example + * **Example** (Checking keys with a hash) + * * ```ts - * import { Hash } from "effect" - * import * as HashMap from "effect/HashMap" + * import { Hash, HashMap } from "effect" * * // Create a map with case-sensitive keys * const userMap = HashMap.make( @@ -218,38 +240,43 @@ export const has = internal.has; * const exactHash = Hash.string("Admin") * console.log(HashMap.hasHash(userMap, "Admin", exactHash)) // true * - * // Check case-insensitive by using custom hash - * const caseInsensitiveHash = Hash.string("admin".toLowerCase()) - * console.log(HashMap.hasHash(userMap, "admin", caseInsensitiveHash)) // false (different hash) + * // A matching hash does not override key equality + * console.log(HashMap.hasHash(userMap, "admin", exactHash)) // false + * + * // A different hash also cannot find the existing key + * const lowercaseHash = Hash.string("admin") + * console.log(HashMap.hasHash(userMap, "Admin", lowercaseHash)) // false * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export const hasHash = internal.hasHash; /** - * Checks if an element matching the given predicate exists in the given `HashMap`. + * Checks whether an element matching the given predicate exists in the given `HashMap`. + * + * **Example** (Checking entries by predicate) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const hm = HashMap.make([1, "a"]) * HashMap.hasBy(hm, (value, key) => value === "a" && key === 1) // -> true * HashMap.hasBy(hm, (value) => value === "b") // -> false * ``` * - * @since 3.16.0 * @category elements + * @since 3.16.0 */ export const hasBy = internal.hasBy; /** * Sets the specified key to the specified value using the internal hashing * function. * - * @example + * **Example** (Setting a value) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1]) * const map2 = HashMap.set(map1, "b", 2) @@ -261,48 +288,51 @@ export const hasBy = internal.hasBy; * console.log(HashMap.size(map1)) // 1 * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ export const set = internal.set; /** * Returns an `IterableIterator` of the keys within the `HashMap`. * - * @example + * **Example** (Iterating keys) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const keys = Array.from(HashMap.keys(map)) * console.log(keys.sort()) // ["a", "b", "c"] * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export const keys = internal.keys; /** * Returns an `IterableIterator` of the values within the `HashMap`. * - * @example + * **Example** (Iterating values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const values = Array.from(HashMap.values(map)) * console.log(values.sort()) // [1, 2, 3] * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export const values = internal.values; /** * Returns an `Array` of the values within the `HashMap`. * - * @example + * **Example** (Converting values to an array) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const employees = HashMap.make( * ["alice", { department: "engineering", salary: 90000 }], @@ -323,16 +353,17 @@ export const values = internal.values; * console.log(engineers.length) // 2 * ``` * - * @since 3.13.0 * @category getters + * @since 3.13.0 */ export const toValues = self => Array.from(values(self)); /** * Returns an `IterableIterator` of the entries within the `HashMap`. * - * @example + * **Example** (Iterating entries) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * // Create a configuration map * const config = HashMap.make( @@ -341,32 +372,30 @@ export const toValues = self => Array.from(values(self)); * ["cache.enabled", "true"] * ) * - * // Get entries iterator for processing - * const entries = HashMap.entries(config) + * // Sort the derived array for deterministic output + * const settings = Array.from(HashMap.entries(config)) + * .sort(([left], [right]) => left.localeCompare(right)) + * .map(([key, value]) => `Setting ${key} = ${value}`) * - * // Process each configuration entry - * for (const [key, value] of entries) { - * console.log(`Setting ${key} = ${value}`) - * } - * // Setting database.host = localhost - * // Setting database.port = 5432 - * // Setting cache.enabled = true + * console.log(settings) + * // ["Setting cache.enabled = true", "Setting database.host = localhost", "Setting database.port = 5432"] * * // Convert to array when you need all entries at once * const allEntries = Array.from(HashMap.entries(config)) * console.log(allEntries.length) // 3 * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export const entries = internal.entries; /** * Returns an `Array<[K, V]>` of the entries within the `HashMap`. * - * @example + * **Example** (Converting entries to an array) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const gameScores = HashMap.make( * ["alice", 1250], @@ -389,16 +418,17 @@ export const entries = internal.entries; * const sortedMap = HashMap.fromIterable(scoreEntries) * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export const toEntries = self => Array.from(entries(self)); /** * Returns the number of entries within the `HashMap`. * - * @example + * **Example** (Getting the size) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const emptyMap = HashMap.empty() * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) @@ -407,16 +437,22 @@ export const toEntries = self => Array.from(entries(self)); * console.log(HashMap.size(map)) // 3 * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export const size = internal.size; /** - * Marks the `HashMap` as mutable for performance optimization during batch operations. + * Creates a transient mutable `HashMap` for efficient batched updates. + * + * **Details** + * + * Apply updates to the returned map, then call `endMutation` to finish the + * mutation window and use the result as an immutable `HashMap`. + * + * **Example** (Beginning batch mutation) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1]) * @@ -433,16 +469,17 @@ export const size = internal.size; * console.log(HashMap.size(result)) // 2 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export const beginMutation = internal.beginMutation; /** * Marks the `HashMap` as immutable, completing the mutation cycle. * - * @example + * **Example** (Ending batch mutation) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * // Start with an existing map * const original = HashMap.make(["x", 10], ["y", 20]) @@ -463,16 +500,23 @@ export const beginMutation = internal.beginMutation; * console.log(HashMap.get(final, "z")) // Option.some(30) * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export const endMutation = internal.endMutation; /** - * Mutates the `HashMap` within the context of the provided function. + * Runs a batch of updates against a transient mutable copy of the `HashMap` + * and returns the finalized immutable result. + * + * **Details** + * + * The callback may call mutation-oriented helpers such as `set` and `remove` + * on the transient map. + * + * **Example** (Applying batched mutations) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1]) * const map2 = HashMap.mutate(map1, (mutable) => { @@ -482,22 +526,23 @@ export const endMutation = internal.endMutation; * // Returns a new HashMap with mutations applied * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export const mutate = internal.mutate; /** - * Set or remove the specified key in the `HashMap` using the specified - * update function. The value of the specified key will be computed using the - * provided hash. + * Sets or removes the specified key using an update function. + * + * **Details** + * + * The update function receives `Some(value)` when the key exists or `None` + * when it does not. Returning `Some(newValue)` stores the value, and returning + * `None` removes the key or leaves it absent. * - * The update function will be invoked with the current value of the key if it - * exists, or `None` if no such value exists. + * **Example** (Updating values with Options) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * @@ -509,25 +554,24 @@ export const mutate = internal.mutate; * console.log(HashMap.get(updated, "a")) // Option.some(2) * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ export const modifyAt = internal.modifyAt; /** - * Alter the value of the specified key in the `HashMap` using the specified - * update function. The value of the specified key will be computed using the - * provided hash. + * Sets or removes the specified key using a precomputed hash and an update + * function. + * + * **Details** * - * The update function will be invoked with the current value of the key if it - * exists, or `None` if no such value exists. + * The update function receives `Some(value)` when the key exists or `None` + * when it does not. Returning `Some(newValue)` stores the value, and returning + * `None` removes the key or leaves it absent. * - * This function will always either update or insert a value into the `HashMap`. + * **Example** (Updating values with a hash) * - * @example * ```ts - * import { Hash } from "effect" - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { Hash, HashMap, Option } from "effect" * * // Useful when working with precomputed hashes for performance * const counters = HashMap.make(["downloads", 100], ["views", 250]) @@ -561,16 +605,17 @@ export const modifyAt = internal.modifyAt; * console.log(HashMap.get(withClicks, "clicks")) // Option.some(1) * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ export const modifyHash = internal.modifyHash; /** * Updates the value of the specified key within the `HashMap` if it exists. * - * @example + * **Example** (Modifying existing values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const map2 = HashMap.modify(map1, "a", (value) => value * 3) @@ -579,16 +624,22 @@ export const modifyHash = internal.modifyHash; * console.log(HashMap.get(map2, "b")) // Option.some(2) * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ export const modify = internal.modify; /** - * Performs a union of this `HashMap` and that `HashMap`. + * Combines two `HashMap`s into one. + * + * **Details** + * + * Entries from `that` are inserted into `self`; when both maps contain an + * equal key, the value from `that` replaces the value from `self`. + * + * **Example** (Combining HashMaps) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const map2 = HashMap.make(["b", 20], ["c", 3]) @@ -598,17 +649,18 @@ export const modify = internal.modify; * console.log(HashMap.get(union, "b")) // Option.some(20) - map2 wins * ``` * - * @since 2.0.0 * @category combining + * @since 2.0.0 */ export const union = internal.union; /** - * Remove the entry for the specified key in the `HashMap` using the internal + * Removes the entry for the specified key in the `HashMap` using the internal * hashing function. * - * @example + * **Example** (Removing a key) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const map2 = HashMap.remove(map1, "b") @@ -618,16 +670,17 @@ export const union = internal.union; * console.log(HashMap.has(map2, "a")) // true * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ export const remove = internal.remove; /** * Removes all entries in the `HashMap` which have the specified keys. * - * @example + * **Example** (Removing multiple keys) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4]) * const map2 = HashMap.removeMany(map1, ["b", "d"]) @@ -637,16 +690,17 @@ export const remove = internal.remove; * console.log(HashMap.has(map2, "c")) // true * ``` * + * @category transforming * @since 2.0.0 - * @category transformations */ export const removeMany = internal.removeMany; /** * Sets multiple key-value pairs in the `HashMap`. * - * @example + * **Example** (Setting multiple entries) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const newEntries = [["c", 3], ["d", 4], ["a", 10]] as const // "a" will be overwritten @@ -657,16 +711,17 @@ export const removeMany = internal.removeMany; * console.log(HashMap.get(map2, "c")) // Option.some(3) * ``` * - * @since 2.0.0 - * @category transformations + * @category transforming + * @since 4.0.0 */ export const setMany = internal.setMany; /** * Maps over the entries of the `HashMap` using the specified function. * - * @example + * **Example** (Mapping values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const map2 = HashMap.map(map1, (value, key) => `${key}:${value * 2}`) @@ -675,18 +730,21 @@ export const setMany = internal.setMany; * console.log(HashMap.get(map2, "b")) // Option.some("b:4") * ``` * - * @since 2.0.0 * @category mapping + * @since 2.0.0 */ export const map = internal.map; /** - * Chains over the entries of the `HashMap` using the specified function. + * Maps each entry to a `HashMap` and flattens the results. + * + * **Gotchas** * - * **NOTE**: the hash and equal of both maps have to be the same. + * The hash and equality behavior of both maps have to be the same. + * + * **Example** (FlatMapping values) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2]) * const map2 = HashMap.flatMap( @@ -699,16 +757,17 @@ export const map = internal.map; * console.log(HashMap.get(map2, "b2")) // Option.some(4) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ export const flatMap = internal.flatMap; /** * Applies the specified function to the entries of the `HashMap`. * - * @example + * **Example** (Iterating with side effects) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2]) * const collected: Array<[string, number]> = [] @@ -720,16 +779,17 @@ export const flatMap = internal.flatMap; * console.log(collected.sort()) // [["a", 1], ["b", 2]] * ``` * - * @since 2.0.0 * @category traversing + * @since 2.0.0 */ export const forEach = internal.forEach; /** * Reduces the specified state over the entries of the `HashMap`. * - * @example + * **Example** (Reducing values) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * const sum = HashMap.reduce(map, 0, (acc, value) => acc + value) @@ -737,16 +797,17 @@ export const forEach = internal.forEach; * console.log(sum) // 6 * ``` * - * @since 2.0.0 * @category folding + * @since 2.0.0 */ export const reduce = internal.reduce; /** * Filters entries out of a `HashMap` using the specified predicate. * - * @example + * **Example** (Filtering entries) + * * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4]) * const map2 = HashMap.filter(map1, (value) => value % 2 === 0) @@ -757,17 +818,17 @@ export const reduce = internal.reduce; * console.log(HashMap.has(map2, "a")) // false * ``` * - * @since 2.0.0 * @category filtering + * @since 2.0.0 */ export const filter = internal.filter; /** * Filters out `None` values from a `HashMap` of `Options`s. * - * @example + * **Example** (Compacting Option values) + * * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const map1 = HashMap.make( * ["a", Option.some(1)], @@ -781,18 +842,18 @@ export const filter = internal.filter; * console.log(HashMap.has(map2, "b")) // false * ``` * - * @since 2.0.0 * @category filtering + * @since 2.0.0 */ export const compact = internal.compact; /** * Maps over the entries of the `HashMap` using the specified filter and keeps * only successful results. * - * @example + * **Example** (Filtering and mapping Results) + * * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Result from "effect/Result" + * import { HashMap, Result } from "effect" * * const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3], ["d", 4]) * const map2 = HashMap.filterMap( @@ -805,23 +866,23 @@ export const compact = internal.compact; * console.log(HashMap.get(map2, "d")) // Option.some(8) * ``` * - * @since 2.0.0 * @category filtering + * @since 2.0.0 */ export const filterMap = internal.filterMap; /** * Returns the first element that satisfies the specified * predicate, or `None` if no such element exists. * - * @example + * **Example** (Finding the first matching entry) + * * ```ts - * import * as HashMap from "effect/HashMap" - * import * as Option from "effect/Option" + * import { HashMap, Option } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) - * const result = HashMap.findFirst(map, (value) => value > 1) - * console.log(result) // Option.some(["c", 3]) - * console.log(Option.getOrElse(result, () => ["", 0])) // ["c", 3] + * const result = HashMap.findFirst(map, (value, key) => key === "b" && value > 1) + * console.log(result) // Option.some(["b", 2]) + * console.log(Option.getOrElse(result, () => ["", 0])) // ["b", 2] * ``` * * @category elements @@ -829,11 +890,12 @@ export const filterMap = internal.filterMap; */ export const findFirst = internal.findFirst; /** - * Checks if any entry in a hashmap meets a specific condition. + * Checks whether any entry in a hashmap meets a specific condition. + * + * **Example** (Checking for any matching entry) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * @@ -841,16 +903,17 @@ export const findFirst = internal.findFirst; * console.log(HashMap.some(map, (value) => value > 5)) // false * ``` * - * @since 3.13.0 * @category elements + * @since 3.13.0 */ export const some = internal.some; /** - * Checks if all entries in a hashmap meets a specific condition. + * Checks whether all entries in a hashmap meets a specific condition. + * + * **Example** (Checking all entries) * - * @example * ```ts - * import * as HashMap from "effect/HashMap" + * import { HashMap } from "effect" * * const map = HashMap.make(["a", 1], ["b", 2], ["c", 3]) * @@ -858,11 +921,8 @@ export const some = internal.some; * console.log(HashMap.every(map, (value) => value > 1)) // false * ``` * - * @param self - The hashmap to check. - * @param predicate - The condition to test entries (value, key). - * - * @since 3.14.0 * @category elements + * @since 3.14.0 */ export const every = internal.every; //# sourceMappingURL=HashMap.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/HashMap.js.map b/.opencode/node_modules/effect/dist/HashMap.js.map index a10d580c75192b240f96011784c081d8e74af8d6..7de7cf43e59965bf791235b2cbfcb50844bd3f25 100644 --- a/.opencode/node_modules/effect/dist/HashMap.js.map +++ b/.opencode/node_modules/effect/dist/HashMap.js.map @@ -1 +1 @@ -{"version":3,"file":"HashMap.js","names":["internal","TypeId","HashMapTypeId","isHashMap","empty","make","fromIterable","isEmpty","get","getHash","getUnsafe","has","hasHash","hasBy","set","keys","values","toValues","self","Array","from","entries","toEntries","size","beginMutation","endMutation","mutate","modifyAt","modifyHash","modify","union","remove","removeMany","setMany","map","flatMap","forEach","reduce","filter","compact","filterMap","findFirst","some","every"],"sources":["../src/HashMap.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAMA,OAAO,KAAKA,QAAQ,MAAM,uBAAuB;AAMjD,MAAMC,MAAM,GAAGD,QAAQ,CAACE,aAAa;AAkLrC;;;;;;;;;;;;;;;;;;AAkBA,OAAO,MAAMC,SAAS,GAuClBH,QAAQ,CAACG,SAAS;AAEtB;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,KAAK,GAA8CJ,QAAQ,CAACI,KAAK;AAE9E;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,IAAI,GAKbL,QAAQ,CAACK,IAAI;AAEjB;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,YAAY,GAAgEN,QAAQ,CAACM,YAAY;AAE9G;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMC,OAAO,GAA2CP,QAAQ,CAACO,OAAO;AAE/E;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAMC,GAAG,GA6CZR,QAAQ,CAACQ,GAAG;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,MAAMC,OAAO,GA+DhBT,QAAQ,CAACS,OAAO;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAO,MAAMC,SAAS,GAyElBV,QAAQ,CAACU,SAAS;AAEtB;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMC,GAAG,GA2CZX,QAAQ,CAACW,GAAG;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,MA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;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,IAAI,GAmCb1C,QAAQ,CAAC0C,IAAI;AAEjB;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,KAAK,GAyCd3C,QAAQ,CAAC2C,KAAK","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"HashMap.js","names":["internal","TypeId","HashMapTypeId","isHashMap","empty","make","fromIterable","isEmpty","get","getHash","getUnsafe","has","hasHash","hasBy","set","keys","values","toValues","self","Array","from","entries","toEntries","size","beginMutation","endMutation","mutate","modifyAt","modifyHash","modify","union","remove","removeMany","setMany","map","flatMap","forEach","reduce","filter","compact","filterMap","findFirst","some","every"],"sources":["../src/HashMap.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAcA,OAAO,KAAKA,QAAQ,MAAM,uBAAuB;AAMjD,MAAMC,MAAM,GAAGD,QAAQ,CAACE,aAAa;AAyLrC;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,SAAS,GAyClBH,QAAQ,CAACG,SAAS;AAEtB;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,KAAK,GAA8CJ,QAAQ,CAACI,KAAK;AAE9E;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,IAAI,GAKbL,QAAQ,CAACK,IAAI;AAEjB;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMC,YAAY,GAAgEN,QAAQ,CAACM,YAAY;AAE9G;;;;;;;;;;;;;;;;;;AAkBA,OAAO,MAAMC,OAAO,GAA2CP,QAAQ,CAACO,OAAO;AAE/E;;;;;;;;;;;;;;;;;;;;;;AAsBA,OAAO,MAAMC,GAAG,GA+CZR,QAAQ,CAACQ,GAAG;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,MAAMC,OAAO,GA+DhBT,QAAQ,CAACS,OAAO;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,OAAO,MAAMC,SA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MC,OAAO,GAAyDvC,QAAQ,CAACuC,OAAO;AAE7F;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMC,SAAS,GAiDlBxC,QAAQ,CAACwC,SAAS;AAEtB;;;;;;;;;;;;;;;;;;AAkBA,OAAO,MAAMC,SAAS,GAuClBzC,QAAQ,CAACyC,SAAS;AAEtB;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMC,IAAI,GAqCb1C,QAAQ,CAAC0C,IAAI;AAEjB;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMC,KAAK,GAqCd3C,QAAQ,CAAC2C,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/HashRing.d.ts b/.opencode/node_modules/effect/dist/HashRing.d.ts index f1dc1b08eaed8fd8a9a74ade6759d294a5ef7289..d9fe8b51c59b1e41f09a4cf42b54854461b21ad3 100644 --- a/.opencode/node_modules/effect/dist/HashRing.d.ts +++ b/.opencode/node_modules/effect/dist/HashRing.d.ts @@ -2,8 +2,21 @@ import type { Pipeable } from "./Pipeable.ts"; import * as PrimaryKey from "./PrimaryKey.ts"; declare const TypeId: "~effect/cluster/HashRing"; /** - * @since 4.0.0 - * @category Models + * A weighted consistent-hashing ring for assigning inputs to nodes with stable + * remapping as nodes are added or removed. + * + * **When to use** + * + * Use to maintain a mutable weighted hash ring for routing keys or shards to + * nodes identified by `PrimaryKey`. + * + * **Details** + * + * Nodes are identified by their `PrimaryKey` value and can be iterated from the + * ring. + * + * @category models + * @since 3.19.0 */ export interface HashRing extends Pipeable, Iterable { readonly [TypeId]: typeof TypeId; @@ -13,70 +26,171 @@ export interface HashRing extends Pipeable, Ite ring: Array<[hash: number, node: string]>; } /** - * @since 4.0.0 - * @category Guards + * Checks whether a value is a `HashRing`. + * + * **When to use** + * + * Use to narrow an `unknown` value before treating it as a `HashRing`, such as + * values crossing an untyped boundary. + * + * **Details** + * + * The guard checks for the module's internal `TypeId` property and narrows to + * `HashRing`. + * + * **Gotchas** + * + * This is a structural type-id check; it does not validate the ring's `nodes`, + * `ring`, or weight state. + * + * @see {@link HashRing} for the type narrowed by this guard + * @see {@link make} for creating an empty `HashRing` + * + * @category guards + * @since 3.19.0 */ export declare const isHashRing: (u: unknown) => u is HashRing; /** - * @since 4.0.0 - * @category Constructors + * Creates an empty `HashRing`. + * + * **When to use** + * + * Use to create an empty weighted consistent-hashing ring with the default or + * custom virtual-point density. + * + * **Details** + * + * `baseWeight` controls how many virtual points are added for a node with + * weight `1`; it defaults to `128` and is clamped to at least `1`. + * + * @see {@link add} for registering one node after creation + * @see {@link addMany} for registering several nodes after creation + * + * @category constructors + * @since 3.19.0 */ export declare const make: (options?: { readonly baseWeight?: number | undefined; }) => HashRing; /** - * Add new nodes to the ring. If a node already exists in the ring, it + * Adds new nodes to the ring. If a node already exists in the ring, it * will be updated. For example, you can use this to update the node's weight. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to register or update several nodes in a `HashRing` at the same weight. + * + * @category combinators + * @since 3.19.0 */ export declare const addMany: { /** - * Add new nodes to the ring. If a node already exists in the ring, it + * Adds new nodes to the ring. If a node already exists in the ring, it * will be updated. For example, you can use this to update the node's weight. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to register or update several nodes in a `HashRing` at the same weight. + * + * @category combinators + * @since 3.19.0 */ (nodes: Iterable, options?: { readonly weight?: number | undefined; }): (self: HashRing) => HashRing; /** - * Add new nodes to the ring. If a node already exists in the ring, it + * Adds new nodes to the ring. If a node already exists in the ring, it * will be updated. For example, you can use this to update the node's weight. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to register or update several nodes in a `HashRing` at the same weight. + * + * @category combinators + * @since 3.19.0 */ (self: HashRing, nodes: Iterable, options?: { readonly weight?: number | undefined; }): HashRing; }; /** - * Add a new node to the ring. If the node already exists in the ring, it + * Adds a new node to the ring. If the node already exists in the ring, it * will be updated. For example, you can use this to update the node's weight. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to register one node in a `HashRing` so lookups and shard assignments can + * return it, or update that node's weight. + * + * **Details** + * + * Nodes are matched by `PrimaryKey.value`. The weight defaults to `1` and is + * clamped to at least `0.1`. + * + * **Gotchas** + * + * This mutates and returns the same ring instance. + * + * @see {@link addMany} for adding or updating several nodes + * @see {@link remove} for unregistering a node + * @see {@link has} for checking primary-key membership + * + * @category combinators + * @since 3.19.0 */ export declare const add: { /** - * Add a new node to the ring. If the node already exists in the ring, it + * Adds a new node to the ring. If the node already exists in the ring, it * will be updated. For example, you can use this to update the node's weight. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to register one node in a `HashRing` so lookups and shard assignments can + * return it, or update that node's weight. + * + * **Details** + * + * Nodes are matched by `PrimaryKey.value`. The weight defaults to `1` and is + * clamped to at least `0.1`. + * + * **Gotchas** + * + * This mutates and returns the same ring instance. + * + * @see {@link addMany} for adding or updating several nodes + * @see {@link remove} for unregistering a node + * @see {@link has} for checking primary-key membership + * + * @category combinators + * @since 3.19.0 */ (node: A, options?: { readonly weight?: number | undefined; }): (self: HashRing) => HashRing; /** - * Add a new node to the ring. If the node already exists in the ring, it + * Adds a new node to the ring. If the node already exists in the ring, it * will be updated. For example, you can use this to update the node's weight. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to register one node in a `HashRing` so lookups and shard assignments can + * return it, or update that node's weight. + * + * **Details** + * + * Nodes are matched by `PrimaryKey.value`. The weight defaults to `1` and is + * clamped to at least `0.1`. + * + * **Gotchas** + * + * This mutates and returns the same ring instance. + * + * @see {@link addMany} for adding or updating several nodes + * @see {@link remove} for unregistering a node + * @see {@link has} for checking primary-key membership + * + * @category combinators + * @since 3.19.0 */ (self: HashRing, node: A, options?: { readonly weight?: number | undefined; @@ -85,38 +199,137 @@ export declare const add: { /** * Removes the node from the ring. No-op's if the node does not exist. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to remove a node that has left the pool so future lookups and shard + * assignments stop returning it. + * + * **Details** + * + * Removal matches by `PrimaryKey.value`, so any value with the same primary key + * removes the same ring member. + * + * **Gotchas** + * + * This mutates and returns the same ring instance. + * + * @see {@link add} for registering or updating a node + * @see {@link has} for checking membership by primary key + * + * @category combinators + * @since 3.19.0 */ export declare const remove: { /** * Removes the node from the ring. No-op's if the node does not exist. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to remove a node that has left the pool so future lookups and shard + * assignments stop returning it. + * + * **Details** + * + * Removal matches by `PrimaryKey.value`, so any value with the same primary key + * removes the same ring member. + * + * **Gotchas** + * + * This mutates and returns the same ring instance. + * + * @see {@link add} for registering or updating a node + * @see {@link has} for checking membership by primary key + * + * @category combinators + * @since 3.19.0 */ (node: A): (self: HashRing) => HashRing; /** * Removes the node from the ring. No-op's if the node does not exist. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to remove a node that has left the pool so future lookups and shard + * assignments stop returning it. + * + * **Details** + * + * Removal matches by `PrimaryKey.value`, so any value with the same primary key + * removes the same ring member. + * + * **Gotchas** + * + * This mutates and returns the same ring instance. + * + * @see {@link add} for registering or updating a node + * @see {@link has} for checking membership by primary key + * + * @category combinators + * @since 3.19.0 */ (self: HashRing, node: A): HashRing; }; /** - * @since 4.0.0 - * @category Combinators + * Checks whether the ring contains a node with the same `PrimaryKey` value. + * + * **When to use** + * + * Use when you need to know whether registering a node would update an existing + * ring member because another node already has the same primary-key identity. + * + * **Details** + * + * Membership is checked with `self.nodes.has(PrimaryKey.value(node))`, so + * matching is by primary key, not object identity or weight. + * + * @see {@link add} for registering or updating nodes + * @see {@link remove} for removing nodes by the same primary-key identity + * @see {@link get} for routing an input string to a node + * + * @category combinators + * @since 3.19.0 */ export declare const has: { /** - * @since 4.0.0 - * @category Combinators + * Checks whether the ring contains a node with the same `PrimaryKey` value. + * + * **When to use** + * + * Use when you need to know whether registering a node would update an existing + * ring member because another node already has the same primary-key identity. + * + * **Details** + * + * Membership is checked with `self.nodes.has(PrimaryKey.value(node))`, so + * matching is by primary key, not object identity or weight. + * + * @see {@link add} for registering or updating nodes + * @see {@link remove} for removing nodes by the same primary-key identity + * @see {@link get} for routing an input string to a node + * + * @category combinators + * @since 3.19.0 */ (node: A): (self: HashRing) => boolean; /** - * @since 4.0.0 - * @category Combinators + * Checks whether the ring contains a node with the same `PrimaryKey` value. + * + * **When to use** + * + * Use when you need to know whether registering a node would update an existing + * ring member because another node already has the same primary-key identity. + * + * **Details** + * + * Membership is checked with `self.nodes.has(PrimaryKey.value(node))`, so + * matching is by primary key, not object identity or weight. + * + * @see {@link add} for registering or updating nodes + * @see {@link remove} for removing nodes by the same primary-key identity + * @see {@link get} for routing an input string to a node + * + * @category combinators + * @since 3.19.0 */ (self: HashRing, node: A): boolean; }; @@ -124,17 +337,28 @@ export declare const has: { * Gets the node which should handle the given input. Returns undefined if * the hashring has no elements with weight. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to route a single string input key to the current ring member responsible + * for that key. + * + * @see {@link getShards} for assigning fixed shard indexes instead of routing + * one input string at a time + * + * @category combinators + * @since 3.19.0 */ export declare const get: (self: HashRing, input: string) => A | undefined; /** - * Distributes `count` shards across the nodes in the ring, attempting to - * balance the number of shards allocated to each node. Returns undefined if - * the hashring has no elements with weight. + * Computes a balanced shard distribution across the nodes in the ring. + * + * **When to use** + * + * Use to precompute ownership for a fixed number of shard indexes across the + * current ring members. * - * @since 4.0.0 - * @category Combinators + * @category combinators + * @since 3.19.0 */ export declare const getShards: (self: HashRing, count: number) => Array | undefined; export {}; diff --git a/.opencode/node_modules/effect/dist/HashRing.d.ts.map b/.opencode/node_modules/effect/dist/HashRing.d.ts.map index fd6f0b11163a80840fed6f8692028fb8b2aba8ae..dd7d08dd42f01640a2999ed077d8ba0e13cdf72a 100644 --- a/.opencode/node_modules/effect/dist/HashRing.d.ts.map +++ b/.opencode/node_modules/effect/dist/HashRing.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"HashRing.d.ts","sourceRoot":"","sources":["../src/HashRing.ts"],"names":[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I,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,OAAO,CAAA;IAC1E;;;;;;;;;;;;;;;;;;;OAmBG;IACH,CAAC,CAAC,SAAS,UAAU,CAAC,UAAU,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAA;CAIvE,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,GAAG,GAAI,CAAC,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,MAAM,KAAG,CAAC,GAAG,SAO3F,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,MAAM,KAAG,KAAK,CAAC,CAAC,CAAC,GAAG,SA6DxG,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/HashRing.js b/.opencode/node_modules/effect/dist/HashRing.js index 6c4f1b87167db90a4fedc1b4387ddd2bdcb8f320..4dbe353a8dd431c37a5e7f85b537b46de3e06210 100644 --- a/.opencode/node_modules/effect/dist/HashRing.js +++ b/.opencode/node_modules/effect/dist/HashRing.js @@ -1,4 +1,12 @@ /** + * Assigns string inputs to nodes with weighted consistent hashing. + * + * A hash ring minimizes remapping when nodes are added, removed, or reweighted. + * This makes it useful for routing requests, partitioning keys, and + * distributing shards across service instances or storage backends. This module + * can create rings, add or remove nodes by `PrimaryKey`, route an input string + * to a node, and compute shard assignments. + * * @since 4.0.0 */ import { dual } from "./Function.js"; @@ -9,13 +17,48 @@ import { hasProperty } from "./Predicate.js"; import * as PrimaryKey from "./PrimaryKey.js"; const TypeId = "~effect/cluster/HashRing"; /** - * @since 4.0.0 - * @category Guards + * Checks whether a value is a `HashRing`. + * + * **When to use** + * + * Use to narrow an `unknown` value before treating it as a `HashRing`, such as + * values crossing an untyped boundary. + * + * **Details** + * + * The guard checks for the module's internal `TypeId` property and narrows to + * `HashRing`. + * + * **Gotchas** + * + * This is a structural type-id check; it does not validate the ring's `nodes`, + * `ring`, or weight state. + * + * @see {@link HashRing} for the type narrowed by this guard + * @see {@link make} for creating an empty `HashRing` + * + * @category guards + * @since 3.19.0 */ export const isHashRing = u => hasProperty(u, TypeId); /** - * @since 4.0.0 - * @category Constructors + * Creates an empty `HashRing`. + * + * **When to use** + * + * Use to create an empty weighted consistent-hashing ring with the default or + * custom virtual-point density. + * + * **Details** + * + * `baseWeight` controls how many virtual points are added for a node with + * weight `1`; it defaults to `128` and is clamped to at least `1`. + * + * @see {@link add} for registering one node after creation + * @see {@link addMany} for registering several nodes after creation + * + * @category constructors + * @since 3.19.0 */ export const make = options => { const self = Object.create(Proto); @@ -40,11 +83,15 @@ const Proto = { } }; /** - * Add new nodes to the ring. If a node already exists in the ring, it + * Adds new nodes to the ring. If a node already exists in the ring, it * will be updated. For example, you can use this to update the node's weight. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to register or update several nodes in a `HashRing` at the same weight. + * + * @category combinators + * @since 3.19.0 */ export const addMany = /*#__PURE__*/dual(args => isHashRing(args[0]), (self, nodes, options) => { const weight = Math.max(options?.weight ?? 1, 0.1); @@ -82,18 +129,53 @@ function addNodesToRing(self, keys, weight) { self.ring.sort((a, b) => a[0] - b[0]); } /** - * Add a new node to the ring. If the node already exists in the ring, it + * Adds a new node to the ring. If the node already exists in the ring, it * will be updated. For example, you can use this to update the node's weight. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to register one node in a `HashRing` so lookups and shard assignments can + * return it, or update that node's weight. + * + * **Details** + * + * Nodes are matched by `PrimaryKey.value`. The weight defaults to `1` and is + * clamped to at least `0.1`. + * + * **Gotchas** + * + * This mutates and returns the same ring instance. + * + * @see {@link addMany} for adding or updating several nodes + * @see {@link remove} for unregistering a node + * @see {@link has} for checking primary-key membership + * + * @category combinators + * @since 3.19.0 */ export const add = /*#__PURE__*/dual(args => isHashRing(args[0]), (self, node, options) => addMany(self, [node], options)); /** * Removes the node from the ring. No-op's if the node does not exist. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to remove a node that has left the pool so future lookups and shard + * assignments stop returning it. + * + * **Details** + * + * Removal matches by `PrimaryKey.value`, so any value with the same primary key + * removes the same ring member. + * + * **Gotchas** + * + * This mutates and returns the same ring instance. + * + * @see {@link add} for registering or updating a node + * @see {@link has} for checking membership by primary key + * + * @category combinators + * @since 3.19.0 */ export const remove = /*#__PURE__*/dual(2, (self, node) => { const key = PrimaryKey.value(node); @@ -106,16 +188,40 @@ export const remove = /*#__PURE__*/dual(2, (self, node) => { return self; }); /** - * @since 4.0.0 - * @category Combinators + * Checks whether the ring contains a node with the same `PrimaryKey` value. + * + * **When to use** + * + * Use when you need to know whether registering a node would update an existing + * ring member because another node already has the same primary-key identity. + * + * **Details** + * + * Membership is checked with `self.nodes.has(PrimaryKey.value(node))`, so + * matching is by primary key, not object identity or weight. + * + * @see {@link add} for registering or updating nodes + * @see {@link remove} for removing nodes by the same primary-key identity + * @see {@link get} for routing an input string to a node + * + * @category combinators + * @since 3.19.0 */ export const has = /*#__PURE__*/dual(2, (self, node) => self.nodes.has(PrimaryKey.value(node))); /** * Gets the node which should handle the given input. Returns undefined if * the hashring has no elements with weight. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to route a single string input key to the current ring member responsible + * for that key. + * + * @see {@link getShards} for assigning fixed shard indexes instead of routing + * one input string at a time + * + * @category combinators + * @since 3.19.0 */ export const get = (self, input) => { if (self.ring.length === 0) { @@ -126,12 +232,15 @@ export const get = (self, input) => { return self.nodes.get(node)[0]; }; /** - * Distributes `count` shards across the nodes in the ring, attempting to - * balance the number of shards allocated to each node. Returns undefined if - * the hashring has no elements with weight. + * Computes a balanced shard distribution across the nodes in the ring. * - * @since 4.0.0 - * @category Combinators + * **When to use** + * + * Use to precompute ownership for a fixed number of shard indexes across the + * current ring members. + * + * @category combinators + * @since 3.19.0 */ export const getShards = (self, count) => { if (self.ring.length === 0) { diff --git a/.opencode/node_modules/effect/dist/HashRing.js.map b/.opencode/node_modules/effect/dist/HashRing.js.map index 83d10eab5e853ca7407df58da7692b50ffcc8484..01c6b38a4701ce5ec9fe73c5705c782c6476cbc1 100644 --- a/.opencode/node_modules/effect/dist/HashRing.js.map +++ b/.opencode/node_modules/effect/dist/HashRing.js.map @@ -1 +1 @@ -{"version":3,"file":"HashRing.js","names":["dual","Hash","PipeInspectableProto","Iterable","hasProperty","PrimaryKey","TypeId","isHashRing","u","make","options","self","Object","create","Proto","baseWeight","Math","max","totalWeightCache","nodes","Map","ring","Symbol","iterator","map","values","n","toJSON","_id","get","addMany","args","weight","keys","toRemove","node","key","value","entry","Set","add","set","push","filter","has","addNodesToRing","round","i","j","length","string","sort","a","b","remove","delete","input","undefined","index","getIndexForInput","getShards","count","shards","Array","allocations","remaining","exclude","distances","shard","hash","shardHashes","distance","nodeCount","maxPerNode","floor","allAtMax","size","forEach","len","mid","lo","hi","distA","abs","distB","range"],"sources":["../src/HashRing.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,SAASA,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAEzC,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAE7C,MAAMC,MAAM,GAAG,0BAAmC;AAclD;;;;AAIA,OAAO,MAAMC,UAAU,GAAIC,CAAU,IAAyBJ,WAAW,CAACI,CAAC,EAAEF,MAAM,CAAC;AAEpF;;;;AAIA,OAAO,MAAMG,IAAI,GAAqCC,OAErD,IAAiB;EAChB,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACC,KAAK,CAAC;EACjCH,IAAI,CAACI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AAC,EAAE;IACnC,OAAO,CAACA,CAAC,EAAE8B,KAAK,CAAC;EACnB;EACA,MAAMG,KAAK,GAAGrE,IAAI,CAACC,GAAG,CAAC+D,EAAE,EAAEF,GAAG,GAAGE,EAAE,CAAC;EACpC,KAAK,IAAIjC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGsC,KAAK,EAAEtC,CAAC,EAAE,EAAE;IAC9B,IAAIW,KAAK,GAAGsB,EAAE,GAAGjC,CAAC;IAClB,IAAIW,KAAK,IAAI,CAAC,IAAIA,KAAK,GAAGoB,GAAG,IAAI,CAACZ,OAAO,CAACtB,GAAG,CAACvB,IAAI,CAACqC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;MAC7D,OAAO,CAACA,KAAK,EAAE1C,IAAI,CAACmE,GAAG,CAAC9D,IAAI,CAACqC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAGW,IAAI,CAAC,CAAC;IACjD;IACAX,KAAK,GAAGsB,EAAE,GAAGjC,CAAC;IACd,IAAIW,KAAK,IAAI,CAAC,IAAIA,KAAK,GAAGoB,GAAG,IAAI,CAACZ,OAAO,CAACtB,GAAG,CAACvB,IAAI,CAACqC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;MAC7D,OAAO,CAACA,KAAK,EAAE1C,IAAI,CAACmE,GAAG,CAAC9D,IAAI,CAACqC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAGW,IAAI,CAAC,CAAC;IACjD;EACF;EACA,OAAO,CAACjB,CAAC,EAAE8B,KAAK,CAAC;AACnB","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"HashRing.js","names":["dual","Hash","PipeInspectableProto","Iterable","hasProperty","PrimaryKey","TypeId","isHashRing","u","make","options","self","Object","create","Proto","baseWeight","Math","max","totalWeightCache","nodes","Map","ring","Symbol","iterator","map","values","n","toJSON","_id","get","addMany","args","weight","keys","toRemove","node","key","value","entry","Set","add","set","push","filter","has","addNodesToRing","round","i","j","length","string","sort","a","b","remove","delete","input","undefined","index","getIndexForInput","getShards","count","shards","Array","allocations","remaining","exclude","distances","shard","hash","shardHashes","distance","nodeCount","maxPerNode","floor","allAtMax","size","forEach","len","mid","lo","hi","distA","abs","distB","range"],"sources":["../src/HashRing.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAWA,SAASA,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAEzC,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAE7C,MAAMC,MAAM,GAAG,0BAAmC;AA2BlD;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMC,UAAU,GAAIC,CAAU,IAAyBJ,WAAW,CAACI,CAAC,EAAEF,MAAM,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMG,IAAI,GAAqCC,OAErD,IAAiB;EAChB,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACC,KAAK,CAAC;EACjCH,IAAI,CAACI,UAAU,GAAGC,IAAI,CAACC,GAAG,CAACP,OAAO,EAAEK,UAAU,IAAI,GAAG,EAAE,CAAC,CAAC;EACzDJ,IAAI,CAACO,gBAAgB,GAAG,CAAC;EACzBP,IAAI,CAACQ,KAAK,GAAG,IAAIC,GAAG,EAAE;EACtBT,IAAI,CAACU,IAAI,GAAG,EAAE;EACd,OAAOV,IAAI;AACb,CAAC;AAED,MAAMG,KAAK,GAAG;EACZ,GAAGZ,oBAAoB;EACvB,CAACI,MAAM,GAAGA,MAAM;EAChB,CAACgB,MAAM,CAACC,QAAQ,IAAC;IACf,OAAOpB,QAAQ,CAACqB,GAAG,CAAC,IAAI,CAACL,KAAK,CAACM,MAAM,EAAE,EAAE,CAAC,CAACC,CAAC,CAAC,KAAKA,CAAC,CAAC,CAACJ,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,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;MAC7D,OAAO,CAACA,KAAK,EAAE1C,IAAI,CAACmE,GAAG,CAAC9D,IAAI,CAACqC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAGW,IAAI,CAAC,CAAC;IACjD;IACAX,KAAK,GAAGsB,EAAE,GAAGjC,CAAC;IACd,IAAIW,KAAK,IAAI,CAAC,IAAIA,KAAK,GAAGoB,GAAG,IAAI,CAACZ,OAAO,CAACtB,GAAG,CAACvB,IAAI,CAACqC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;MAC7D,OAAO,CAACA,KAAK,EAAE1C,IAAI,CAACmE,GAAG,CAAC9D,IAAI,CAACqC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAGW,IAAI,CAAC,CAAC;IACjD;EACF;EACA,OAAO,CAACjB,CAAC,EAAE8B,KAAK,CAAC;AACnB","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/HashSet.d.ts b/.opencode/node_modules/effect/dist/HashSet.d.ts index 824e3a71053523ef3909c787b8215a8aea7c5768..beb7277fbf14ab8c1100aacc0515fd07ace9a7ce 100644 --- a/.opencode/node_modules/effect/dist/HashSet.d.ts +++ b/.opencode/node_modules/effect/dist/HashSet.d.ts @@ -1,4 +1,12 @@ /** + * Stores unique values in an immutable hash set. + * + * A `HashSet` contains at most one value for each equality class according + * to Effect's `Equal` and `Hash` rules. Membership checks, additions, removals, + * and set operations return new sets. This module also includes constructors, + * union, intersection, difference, subset checks, mapping, filtering, and + * reducing helpers. + * * @since 2.0.0 */ import type { Equal } from "./Equal.ts"; @@ -11,9 +19,10 @@ declare const TypeId = "~effect/collections/HashSet"; * A HashSet is an immutable set data structure that provides efficient storage * and retrieval of unique values. It uses a HashMap internally for optimal performance. * - * @example + * **Example** (Creating and updating a HashSet) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * // Create a HashSet * const set = HashSet.make("apple", "banana", "cherry") @@ -31,8 +40,8 @@ declare const TypeId = "~effect/collections/HashSet"; * console.log(HashSet.size(smaller)) // 2 * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface HashSet extends Iterable, Equal, Pipeable, Inspectable { readonly [TypeId]: typeof TypeId; @@ -41,9 +50,10 @@ export interface HashSet extends Iterable, Equal, Pipeable, In * The HashSet namespace contains type-level utilities and helper types * for working with HashSet instances. * - * @example + * **Example** (Extracting value types from a HashSet) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * // Create a concrete HashSet for type extraction * const fruits = HashSet.make("apple", "banana", "cherry") @@ -58,13 +68,19 @@ export interface HashSet extends Iterable, Equal, Pipeable, In * ``` * * @since 2.0.0 - * @category namespace */ export declare namespace HashSet { /** - * @example + * Extracts the element type from a `HashSet`. + * + * **Details** + * + * For `HashSet.HashSet`, `HashSet.Value<...>` resolves to `A`. + * + * **Example** (Extracting a HashSet value type) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5) * @@ -74,17 +90,18 @@ export declare namespace HashSet { * const processNumber = (n: NumberType) => n * 2 * ``` * - * @since 2.0.0 - * @category type-level + * @category utility types + * @since 4.0.0 */ type Value = T extends HashSet ? V : never; } /** * Creates an empty HashSet. * - * @example + * **Example** (Creating an empty HashSet) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set = HashSet.empty() * @@ -96,16 +113,17 @@ export declare namespace HashSet { * console.log(HashSet.size(withValues)) // 2 * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const empty: () => HashSet; /** * Creates a HashSet from a variable number of values. * - * @example + * **Example** (Creating a HashSet from values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const fruits = HashSet.make("apple", "banana", "cherry") * console.log(HashSet.size(fruits)) // 3 @@ -117,16 +135,17 @@ export declare const empty: () => HashSet; * console.log(HashSet.size(mixed)) // 3 * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const make: >(...values: Values) => HashSet; /** * Creates a HashSet from an iterable collection of values. * - * @example + * **Example** (Creating a HashSet from an iterable) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const fromArray = HashSet.fromIterable(["a", "b", "c", "b", "a"]) * console.log(HashSet.size(fromArray)) // 3 @@ -138,16 +157,17 @@ export declare const make: >(...values: Values * console.log(Array.from(fromString)) // ["h", "e", "l", "o"] * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const fromIterable: (values: Iterable) => HashSet; /** - * Checks if a value is a HashSet. + * Checks whether a value is a HashSet. + * + * **Example** (Checking for a HashSet) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set = HashSet.make(1, 2, 3) * const array = [1, 2, 3] @@ -157,16 +177,17 @@ export declare const fromIterable: (values: Iterable) => HashSet; * console.log(HashSet.isHashSet(null)) // false * ``` * - * @since 2.0.0 * @category guards + * @since 2.0.0 */ export declare const isHashSet: { /** - * Checks if a value is a HashSet. + * Checks whether a value is a HashSet. + * + * **Example** (Checking for a HashSet) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set = HashSet.make(1, 2, 3) * const array = [1, 2, 3] @@ -176,16 +197,17 @@ export declare const isHashSet: { * console.log(HashSet.isHashSet(null)) // false * ``` * - * @since 2.0.0 * @category guards + * @since 2.0.0 */ (u: Iterable): u is HashSet; /** - * Checks if a value is a HashSet. + * Checks whether a value is a HashSet. + * + * **Example** (Checking for a HashSet) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set = HashSet.make(1, 2, 3) * const array = [1, 2, 3] @@ -195,17 +217,18 @@ export declare const isHashSet: { * console.log(HashSet.isHashSet(null)) // false * ``` * - * @since 2.0.0 * @category guards + * @since 2.0.0 */ (u: unknown): u is HashSet; }; /** * Adds a value to the HashSet, returning a new HashSet. * - * @example + * **Example** (Adding values to a HashSet) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set = HashSet.make("a", "b") * const withC = HashSet.add(set, "c") @@ -219,16 +242,17 @@ export declare const isHashSet: { * console.log(HashSet.size(same)) // 2 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export declare const add: { /** * Adds a value to the HashSet, returning a new HashSet. * - * @example + * **Example** (Adding values to a HashSet) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set = HashSet.make("a", "b") * const withC = HashSet.add(set, "c") @@ -242,16 +266,17 @@ export declare const add: { * console.log(HashSet.size(same)) // 2 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ (value: V): (self: HashSet) => HashSet; /** * Adds a value to the HashSet, returning a new HashSet. * - * @example + * **Example** (Adding values to a HashSet) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set = HashSet.make("a", "b") * const withC = HashSet.add(set, "c") @@ -265,25 +290,25 @@ export declare const add: { * console.log(HashSet.size(same)) // 2 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ (self: HashSet, value: V): HashSet; }; /** - * Checks if the HashSet contains the specified value. + * Checks whether the HashSet contains the specified value. + * + * **Example** (Checking HashSet membership) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" // false + * import { Equal, Hash, HashSet } from "effect" * * // Works with any type that implements Equal - * import { Equal, Hash } from "effect" * * const set = HashSet.make("apple", "banana", "cherry") * * console.log(HashSet.has(set, "apple")) // true - * console.log(HashSet.has(set, "grape")) + * console.log(HashSet.has(set, "grape")) // false * * class Person implements Equal.Equal { * constructor(readonly name: string) {} @@ -301,24 +326,24 @@ export declare const add: { * console.log(HashSet.has(people, new Person("Alice"))) // true * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export declare const has: { /** - * Checks if the HashSet contains the specified value. + * Checks whether the HashSet contains the specified value. + * + * **Example** (Checking HashSet membership) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" // false + * import { Equal, Hash, HashSet } from "effect" * * // Works with any type that implements Equal - * import { Equal, Hash } from "effect" * * const set = HashSet.make("apple", "banana", "cherry") * * console.log(HashSet.has(set, "apple")) // true - * console.log(HashSet.has(set, "grape")) + * console.log(HashSet.has(set, "grape")) // false * * class Person implements Equal.Equal { * constructor(readonly name: string) {} @@ -336,24 +361,24 @@ export declare const has: { * console.log(HashSet.has(people, new Person("Alice"))) // true * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (value: V): (self: HashSet) => boolean; /** - * Checks if the HashSet contains the specified value. + * Checks whether the HashSet contains the specified value. + * + * **Example** (Checking HashSet membership) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" // false + * import { Equal, Hash, HashSet } from "effect" * * // Works with any type that implements Equal - * import { Equal, Hash } from "effect" * * const set = HashSet.make("apple", "banana", "cherry") * * console.log(HashSet.has(set, "apple")) // true - * console.log(HashSet.has(set, "grape")) + * console.log(HashSet.has(set, "grape")) // false * * class Person implements Equal.Equal { * constructor(readonly name: string) {} @@ -371,17 +396,18 @@ export declare const has: { * console.log(HashSet.has(people, new Person("Alice"))) // true * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (self: HashSet, value: V): boolean; }; /** * Removes a value from the HashSet, returning a new HashSet. * - * @example + * **Example** (Removing values from a HashSet) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set = HashSet.make("a", "b", "c") * const withoutB = HashSet.remove(set, "b") @@ -395,16 +421,17 @@ export declare const has: { * console.log(HashSet.size(same)) // 3 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export declare const remove: { /** * Removes a value from the HashSet, returning a new HashSet. * - * @example + * **Example** (Removing values from a HashSet) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set = HashSet.make("a", "b", "c") * const withoutB = HashSet.remove(set, "b") @@ -418,16 +445,17 @@ export declare const remove: { * console.log(HashSet.size(same)) // 3 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ (value: V): (self: HashSet) => HashSet; /** * Removes a value from the HashSet, returning a new HashSet. * - * @example + * **Example** (Removing values from a HashSet) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set = HashSet.make("a", "b", "c") * const withoutB = HashSet.remove(set, "b") @@ -441,17 +469,18 @@ export declare const remove: { * console.log(HashSet.size(same)) // 3 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ (self: HashSet, value: V): HashSet; }; /** * Returns the number of values in the HashSet. * - * @example + * **Example** (Getting the HashSet size) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const empty = HashSet.empty() * console.log(HashSet.size(empty)) // 0 @@ -463,16 +492,17 @@ export declare const remove: { * console.log(HashSet.size(withDuplicates)) // 3 * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export declare const size: (self: HashSet) => number; /** - * Checks if the HashSet is empty. + * Checks whether the HashSet is empty. + * + * **Example** (Checking whether a HashSet is empty) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const empty = HashSet.empty() * console.log(HashSet.isEmpty(empty)) // true @@ -481,16 +511,17 @@ export declare const size: (self: HashSet) => number; * console.log(HashSet.isEmpty(nonEmpty)) // false * ``` * - * @since 2.0.0 * @category getters + * @since 4.0.0 */ export declare const isEmpty: (self: HashSet) => boolean; /** * Creates the union of two HashSets. * - * @example + * **Example** (Combining HashSets) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set1 = HashSet.make("a", "b") * const set2 = HashSet.make("b", "c") @@ -500,16 +531,17 @@ export declare const isEmpty: (self: HashSet) => boolean; * console.log(HashSet.size(combined)) // 3 * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ export declare const union: { /** * Creates the union of two HashSets. * - * @example + * **Example** (Combining HashSets) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set1 = HashSet.make("a", "b") * const set2 = HashSet.make("b", "c") @@ -519,16 +551,17 @@ export declare const union: { * console.log(HashSet.size(combined)) // 3 * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ (that: HashSet): (self: HashSet) => HashSet; /** * Creates the union of two HashSets. * - * @example + * **Example** (Combining HashSets) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set1 = HashSet.make("a", "b") * const set2 = HashSet.make("b", "c") @@ -538,17 +571,18 @@ export declare const union: { * console.log(HashSet.size(combined)) // 3 * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ (self: HashSet, that: HashSet): HashSet; }; /** * Creates the intersection of two HashSets. * - * @example + * **Example** (Finding common HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set1 = HashSet.make("a", "b", "c") * const set2 = HashSet.make("b", "c", "d") @@ -558,16 +592,17 @@ export declare const union: { * console.log(HashSet.size(common)) // 2 * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ export declare const intersection: { /** * Creates the intersection of two HashSets. * - * @example + * **Example** (Finding common HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set1 = HashSet.make("a", "b", "c") * const set2 = HashSet.make("b", "c", "d") @@ -577,16 +612,17 @@ export declare const intersection: { * console.log(HashSet.size(common)) // 2 * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ (that: HashSet): (self: HashSet) => HashSet; /** * Creates the intersection of two HashSets. * - * @example + * **Example** (Finding common HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set1 = HashSet.make("a", "b", "c") * const set2 = HashSet.make("b", "c", "d") @@ -596,17 +632,18 @@ export declare const intersection: { * console.log(HashSet.size(common)) // 2 * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ (self: HashSet, that: HashSet): HashSet; }; /** * Creates the difference of two HashSets (elements in the first set that are not in the second). * - * @example + * **Example** (Finding HashSet differences) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set1 = HashSet.make("a", "b", "c") * const set2 = HashSet.make("b", "d") @@ -616,16 +653,17 @@ export declare const intersection: { * console.log(HashSet.size(diff)) // 2 * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ export declare const difference: { /** * Creates the difference of two HashSets (elements in the first set that are not in the second). * - * @example + * **Example** (Finding HashSet differences) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set1 = HashSet.make("a", "b", "c") * const set2 = HashSet.make("b", "d") @@ -635,16 +673,17 @@ export declare const difference: { * console.log(HashSet.size(diff)) // 2 * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ (that: HashSet): (self: HashSet) => HashSet; /** * Creates the difference of two HashSets (elements in the first set that are not in the second). * - * @example + * **Example** (Finding HashSet differences) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set1 = HashSet.make("a", "b", "c") * const set2 = HashSet.make("b", "d") @@ -654,17 +693,18 @@ export declare const difference: { * console.log(HashSet.size(diff)) // 2 * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ (self: HashSet, that: HashSet): HashSet; }; /** - * Checks if a HashSet is a subset of another HashSet. + * Checks whether a HashSet is a subset of another HashSet. + * + * **Example** (Checking subset relationships) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const small = HashSet.make("a", "b") * const large = HashSet.make("a", "b", "c", "d") @@ -676,16 +716,17 @@ export declare const difference: { * console.log(HashSet.isSubset(small, small)) // true * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export declare const isSubset: { /** - * Checks if a HashSet is a subset of another HashSet. + * Checks whether a HashSet is a subset of another HashSet. + * + * **Example** (Checking subset relationships) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const small = HashSet.make("a", "b") * const large = HashSet.make("a", "b", "c", "d") @@ -697,16 +738,17 @@ export declare const isSubset: { * console.log(HashSet.isSubset(small, small)) // true * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (that: HashSet): (self: HashSet) => boolean; /** - * Checks if a HashSet is a subset of another HashSet. + * Checks whether a HashSet is a subset of another HashSet. + * + * **Example** (Checking subset relationships) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const small = HashSet.make("a", "b") * const large = HashSet.make("a", "b", "c", "d") @@ -718,17 +760,18 @@ export declare const isSubset: { * console.log(HashSet.isSubset(small, small)) // true * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (self: HashSet, that: HashSet): boolean; }; /** * Maps each value in the HashSet using the provided function. * - * @example + * **Example** (Mapping HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3) * const doubled = HashSet.map(numbers, (n) => n * 2) @@ -742,16 +785,17 @@ export declare const isSubset: { * console.log(Array.from(lengths).sort()) // [5, 6] (apple=5, banana=6, cherry=6) * ``` * - * @since 2.0.0 * @category mapping + * @since 2.0.0 */ export declare const map: { /** * Maps each value in the HashSet using the provided function. * - * @example + * **Example** (Mapping HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3) * const doubled = HashSet.map(numbers, (n) => n * 2) @@ -765,16 +809,17 @@ export declare const map: { * console.log(Array.from(lengths).sort()) // [5, 6] (apple=5, banana=6, cherry=6) * ``` * - * @since 2.0.0 * @category mapping + * @since 2.0.0 */ (f: (value: V) => U): (self: HashSet) => HashSet; /** * Maps each value in the HashSet using the provided function. * - * @example + * **Example** (Mapping HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3) * const doubled = HashSet.map(numbers, (n) => n * 2) @@ -788,17 +833,18 @@ export declare const map: { * console.log(Array.from(lengths).sort()) // [5, 6] (apple=5, banana=6, cherry=6) * ``` * - * @since 2.0.0 * @category mapping + * @since 2.0.0 */ (self: HashSet, f: (value: V) => U): HashSet; }; /** * Filters the HashSet keeping only values that satisfy the predicate. * - * @example + * **Example** (Filtering HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5, 6) * const evens = HashSet.filter(numbers, (n) => n % 2 === 0) @@ -807,16 +853,17 @@ export declare const map: { * console.log(HashSet.size(evens)) // 3 * ``` * - * @since 2.0.0 * @category filtering + * @since 2.0.0 */ export declare const filter: { /** * Filters the HashSet keeping only values that satisfy the predicate. * - * @example + * **Example** (Filtering HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5, 6) * const evens = HashSet.filter(numbers, (n) => n % 2 === 0) @@ -825,16 +872,17 @@ export declare const filter: { * console.log(HashSet.size(evens)) // 3 * ``` * - * @since 2.0.0 * @category filtering + * @since 2.0.0 */ (refinement: Refinement, U>): (self: HashSet) => HashSet; /** * Filters the HashSet keeping only values that satisfy the predicate. * - * @example + * **Example** (Filtering HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5, 6) * const evens = HashSet.filter(numbers, (n) => n % 2 === 0) @@ -843,16 +891,17 @@ export declare const filter: { * console.log(HashSet.size(evens)) // 3 * ``` * - * @since 2.0.0 * @category filtering + * @since 2.0.0 */ (predicate: Predicate>): (self: HashSet) => HashSet; /** * Filters the HashSet keeping only values that satisfy the predicate. * - * @example + * **Example** (Filtering HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5, 6) * const evens = HashSet.filter(numbers, (n) => n % 2 === 0) @@ -861,16 +910,17 @@ export declare const filter: { * console.log(HashSet.size(evens)) // 3 * ``` * - * @since 2.0.0 * @category filtering + * @since 2.0.0 */ (self: HashSet, refinement: Refinement): HashSet; /** * Filters the HashSet keeping only values that satisfy the predicate. * - * @example + * **Example** (Filtering HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5, 6) * const evens = HashSet.filter(numbers, (n) => n % 2 === 0) @@ -879,17 +929,18 @@ export declare const filter: { * console.log(HashSet.size(evens)) // 3 * ``` * - * @since 2.0.0 * @category filtering + * @since 2.0.0 */ (self: HashSet, predicate: Predicate): HashSet; }; /** - * Tests whether at least one value in the HashSet satisfies the predicate. + * Checks whether at least one value in the HashSet satisfies the predicate. + * + * **Example** (Testing whether some values match) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5) * @@ -900,16 +951,17 @@ export declare const filter: { * console.log(HashSet.some(empty, (n) => n > 0)) // false * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export declare const some: { /** - * Tests whether at least one value in the HashSet satisfies the predicate. + * Checks whether at least one value in the HashSet satisfies the predicate. + * + * **Example** (Testing whether some values match) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5) * @@ -920,16 +972,17 @@ export declare const some: { * console.log(HashSet.some(empty, (n) => n > 0)) // false * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (predicate: Predicate): (self: HashSet) => boolean; /** - * Tests whether at least one value in the HashSet satisfies the predicate. + * Checks whether at least one value in the HashSet satisfies the predicate. + * + * **Example** (Testing whether some values match) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5) * @@ -940,17 +993,18 @@ export declare const some: { * console.log(HashSet.some(empty, (n) => n > 0)) // false * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (self: HashSet, predicate: Predicate): boolean; }; /** - * Tests whether all values in the HashSet satisfy the predicate. + * Checks whether all values in the HashSet satisfy the predicate. + * + * **Example** (Testing whether every value matches) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(2, 4, 6, 8) * @@ -961,16 +1015,17 @@ export declare const some: { * console.log(HashSet.every(empty, (n) => n > 0)) // true (vacuously true) * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export declare const every: { /** - * Tests whether all values in the HashSet satisfy the predicate. + * Checks whether all values in the HashSet satisfy the predicate. + * + * **Example** (Testing whether every value matches) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(2, 4, 6, 8) * @@ -981,16 +1036,17 @@ export declare const every: { * console.log(HashSet.every(empty, (n) => n > 0)) // true (vacuously true) * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (predicate: Predicate): (self: HashSet) => boolean; /** - * Tests whether all values in the HashSet satisfy the predicate. + * Checks whether all values in the HashSet satisfy the predicate. + * + * **Example** (Testing whether every value matches) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(2, 4, 6, 8) * @@ -1001,17 +1057,18 @@ export declare const every: { * console.log(HashSet.every(empty, (n) => n > 0)) // true (vacuously true) * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (self: HashSet, predicate: Predicate): boolean; }; /** * Reduces the HashSet to a single value by iterating through the values and applying an accumulator function. * - * @example + * **Example** (Reducing HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5) * const sum = HashSet.reduce(numbers, 0, (acc, n) => acc + n) @@ -1023,16 +1080,17 @@ export declare const every: { * console.log(concatenated) // Order may vary: "abc", "bac", etc. * ``` * - * @since 2.0.0 * @category folding + * @since 2.0.0 */ export declare const reduce: { /** * Reduces the HashSet to a single value by iterating through the values and applying an accumulator function. * - * @example + * **Example** (Reducing HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5) * const sum = HashSet.reduce(numbers, 0, (acc, n) => acc + n) @@ -1044,16 +1102,17 @@ export declare const reduce: { * console.log(concatenated) // Order may vary: "abc", "bac", etc. * ``` * - * @since 2.0.0 * @category folding + * @since 2.0.0 */ (zero: U, f: (accumulator: U, value: V) => U): (self: HashSet) => U; /** * Reduces the HashSet to a single value by iterating through the values and applying an accumulator function. * - * @example + * **Example** (Reducing HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5) * const sum = HashSet.reduce(numbers, 0, (acc, n) => acc + n) @@ -1065,8 +1124,8 @@ export declare const reduce: { * console.log(concatenated) // Order may vary: "abc", "bac", etc. * ``` * - * @since 2.0.0 * @category folding + * @since 2.0.0 */ (self: HashSet, zero: U, f: (accumulator: U, value: V) => U): U; }; diff --git a/.opencode/node_modules/effect/dist/HashSet.d.ts.map b/.opencode/node_modules/effect/dist/HashSet.d.ts.map index 2f7fa8725e5503ed97bc03e4391d82d9f59a4ff6..2599f95b1db094ceac189f1cf5732324ce341760 100644 --- a/.opencode/node_modules/effect/dist/HashSet.d.ts.map +++ b/.opencode/node_modules/effect/dist/HashSet.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"HashSet.d.ts","sourceRoot":"","sources":["../src/HashSet.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,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AAC,KAAK,CAAC,CAAA;IAC5E;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;CAIrD,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/HashSet.js b/.opencode/node_modules/effect/dist/HashSet.js index e4e28c65c4c2449218bf5291dacc948a4070e505..74125a8f4e0473f54f9f6ba3a0f791c7b950d8ca 100644 --- a/.opencode/node_modules/effect/dist/HashSet.js +++ b/.opencode/node_modules/effect/dist/HashSet.js @@ -1,4 +1,12 @@ /** + * Stores unique values in an immutable hash set. + * + * A `HashSet` contains at most one value for each equality class according + * to Effect's `Equal` and `Hash` rules. Membership checks, additions, removals, + * and set operations return new sets. This module also includes constructors, + * union, intersection, difference, subset checks, mapping, filtering, and + * reducing helpers. + * * @since 2.0.0 */ import * as Dual from "./Function.js"; @@ -7,9 +15,10 @@ const TypeId = internal.HashSetTypeId; /** * Creates an empty HashSet. * - * @example + * **Example** (Creating an empty HashSet) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set = HashSet.empty() * @@ -21,16 +30,17 @@ const TypeId = internal.HashSetTypeId; * console.log(HashSet.size(withValues)) // 2 * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const empty = internal.empty; /** * Creates a HashSet from a variable number of values. * - * @example + * **Example** (Creating a HashSet from values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const fruits = HashSet.make("apple", "banana", "cherry") * console.log(HashSet.size(fruits)) // 3 @@ -42,16 +52,17 @@ export const empty = internal.empty; * console.log(HashSet.size(mixed)) // 3 * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const make = internal.make; /** * Creates a HashSet from an iterable collection of values. * - * @example + * **Example** (Creating a HashSet from an iterable) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const fromArray = HashSet.fromIterable(["a", "b", "c", "b", "a"]) * console.log(HashSet.size(fromArray)) // 3 @@ -63,16 +74,17 @@ export const make = internal.make; * console.log(Array.from(fromString)) // ["h", "e", "l", "o"] * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const fromIterable = internal.fromIterable; /** - * Checks if a value is a HashSet. + * Checks whether a value is a HashSet. + * + * **Example** (Checking for a HashSet) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set = HashSet.make(1, 2, 3) * const array = [1, 2, 3] @@ -82,16 +94,17 @@ export const fromIterable = internal.fromIterable; * console.log(HashSet.isHashSet(null)) // false * ``` * - * @since 2.0.0 * @category guards + * @since 2.0.0 */ export const isHashSet = internal.isHashSet; /** * Adds a value to the HashSet, returning a new HashSet. * - * @example + * **Example** (Adding values to a HashSet) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set = HashSet.make("a", "b") * const withC = HashSet.add(set, "c") @@ -105,24 +118,24 @@ export const isHashSet = internal.isHashSet; * console.log(HashSet.size(same)) // 2 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export const add = /*#__PURE__*/Dual.dual(2, internal.add); /** - * Checks if the HashSet contains the specified value. + * Checks whether the HashSet contains the specified value. + * + * **Example** (Checking HashSet membership) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" // false + * import { Equal, Hash, HashSet } from "effect" * * // Works with any type that implements Equal - * import { Equal, Hash } from "effect" * * const set = HashSet.make("apple", "banana", "cherry") * * console.log(HashSet.has(set, "apple")) // true - * console.log(HashSet.has(set, "grape")) + * console.log(HashSet.has(set, "grape")) // false * * class Person implements Equal.Equal { * constructor(readonly name: string) {} @@ -140,16 +153,17 @@ export const add = /*#__PURE__*/Dual.dual(2, internal.add); * console.log(HashSet.has(people, new Person("Alice"))) // true * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export const has = /*#__PURE__*/Dual.dual(2, internal.has); /** * Removes a value from the HashSet, returning a new HashSet. * - * @example + * **Example** (Removing values from a HashSet) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set = HashSet.make("a", "b", "c") * const withoutB = HashSet.remove(set, "b") @@ -163,16 +177,17 @@ export const has = /*#__PURE__*/Dual.dual(2, internal.has); * console.log(HashSet.size(same)) // 3 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export const remove = /*#__PURE__*/Dual.dual(2, internal.remove); /** * Returns the number of values in the HashSet. * - * @example + * **Example** (Getting the HashSet size) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const empty = HashSet.empty() * console.log(HashSet.size(empty)) // 0 @@ -184,16 +199,17 @@ export const remove = /*#__PURE__*/Dual.dual(2, internal.remove); * console.log(HashSet.size(withDuplicates)) // 3 * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export const size = internal.size; /** - * Checks if the HashSet is empty. + * Checks whether the HashSet is empty. + * + * **Example** (Checking whether a HashSet is empty) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const empty = HashSet.empty() * console.log(HashSet.isEmpty(empty)) // true @@ -202,16 +218,17 @@ export const size = internal.size; * console.log(HashSet.isEmpty(nonEmpty)) // false * ``` * - * @since 2.0.0 * @category getters + * @since 4.0.0 */ export const isEmpty = internal.isEmpty; /** * Creates the union of two HashSets. * - * @example + * **Example** (Combining HashSets) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set1 = HashSet.make("a", "b") * const set2 = HashSet.make("b", "c") @@ -221,16 +238,17 @@ export const isEmpty = internal.isEmpty; * console.log(HashSet.size(combined)) // 3 * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ export const union = /*#__PURE__*/Dual.dual(2, internal.union); /** * Creates the intersection of two HashSets. * - * @example + * **Example** (Finding common HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set1 = HashSet.make("a", "b", "c") * const set2 = HashSet.make("b", "c", "d") @@ -240,16 +258,17 @@ export const union = /*#__PURE__*/Dual.dual(2, internal.union); * console.log(HashSet.size(common)) // 2 * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ export const intersection = /*#__PURE__*/Dual.dual(2, internal.intersection); /** * Creates the difference of two HashSets (elements in the first set that are not in the second). * - * @example + * **Example** (Finding HashSet differences) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const set1 = HashSet.make("a", "b", "c") * const set2 = HashSet.make("b", "d") @@ -259,16 +278,17 @@ export const intersection = /*#__PURE__*/Dual.dual(2, internal.intersection); * console.log(HashSet.size(diff)) // 2 * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ export const difference = /*#__PURE__*/Dual.dual(2, internal.difference); /** - * Checks if a HashSet is a subset of another HashSet. + * Checks whether a HashSet is a subset of another HashSet. + * + * **Example** (Checking subset relationships) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const small = HashSet.make("a", "b") * const large = HashSet.make("a", "b", "c", "d") @@ -280,16 +300,17 @@ export const difference = /*#__PURE__*/Dual.dual(2, internal.difference); * console.log(HashSet.isSubset(small, small)) // true * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export const isSubset = /*#__PURE__*/Dual.dual(2, internal.isSubset); /** * Maps each value in the HashSet using the provided function. * - * @example + * **Example** (Mapping HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3) * const doubled = HashSet.map(numbers, (n) => n * 2) @@ -303,16 +324,17 @@ export const isSubset = /*#__PURE__*/Dual.dual(2, internal.isSubset); * console.log(Array.from(lengths).sort()) // [5, 6] (apple=5, banana=6, cherry=6) * ``` * - * @since 2.0.0 * @category mapping + * @since 2.0.0 */ export const map = /*#__PURE__*/Dual.dual(2, internal.map); /** * Filters the HashSet keeping only values that satisfy the predicate. * - * @example + * **Example** (Filtering HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5, 6) * const evens = HashSet.filter(numbers, (n) => n % 2 === 0) @@ -321,16 +343,17 @@ export const map = /*#__PURE__*/Dual.dual(2, internal.map); * console.log(HashSet.size(evens)) // 3 * ``` * - * @since 2.0.0 * @category filtering + * @since 2.0.0 */ export const filter = /*#__PURE__*/Dual.dual(2, internal.filter); /** - * Tests whether at least one value in the HashSet satisfies the predicate. + * Checks whether at least one value in the HashSet satisfies the predicate. + * + * **Example** (Testing whether some values match) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5) * @@ -341,16 +364,17 @@ export const filter = /*#__PURE__*/Dual.dual(2, internal.filter); * console.log(HashSet.some(empty, (n) => n > 0)) // false * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export const some = /*#__PURE__*/Dual.dual(2, internal.some); /** - * Tests whether all values in the HashSet satisfy the predicate. + * Checks whether all values in the HashSet satisfy the predicate. + * + * **Example** (Testing whether every value matches) * - * @example * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(2, 4, 6, 8) * @@ -361,16 +385,17 @@ export const some = /*#__PURE__*/Dual.dual(2, internal.some); * console.log(HashSet.every(empty, (n) => n > 0)) // true (vacuously true) * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export const every = /*#__PURE__*/Dual.dual(2, internal.every); /** * Reduces the HashSet to a single value by iterating through the values and applying an accumulator function. * - * @example + * **Example** (Reducing HashSet values) + * * ```ts - * import * as HashSet from "effect/HashSet" + * import { HashSet } from "effect" * * const numbers = HashSet.make(1, 2, 3, 4, 5) * const sum = HashSet.reduce(numbers, 0, (acc, n) => acc + n) @@ -382,8 +407,8 @@ export const every = /*#__PURE__*/Dual.dual(2, internal.every); * console.log(concatenated) // Order may vary: "abc", "bac", etc. * ``` * - * @since 2.0.0 * @category folding + * @since 2.0.0 */ export const reduce = /*#__PURE__*/Dual.dual(3, internal.reduce); //# sourceMappingURL=HashSet.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/HashSet.js.map b/.opencode/node_modules/effect/dist/HashSet.js.map index b64a6bd732feb171f91cffb6822eba451bf888df..0378f0d00cf032d28f82414cfd9d2682aa8fa312 100644 --- a/.opencode/node_modules/effect/dist/HashSet.js.map +++ b/.opencode/node_modules/effect/dist/HashSet.js.map @@ -1 +1 @@ -{"version":3,"file":"HashSet.js","names":["Dual","internal","TypeId","HashSetTypeId","empty","make","fromIterable","isHashSet","add","dual","has","remove","size","isEmpty","union","intersection","difference","isSubset","map","filter","some","every","reduce"],"sources":["../src/HashSet.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAKA,OAAO,KAAKA,IAAI,MAAM,eAAe;AAErC,OAAO,KAAKC,QAAQ,MAAM,uBAAuB;AAKjD,MAAMC,MAAM,GAAGD,QAAQ,CAACE,aAAa;AA4ErC;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMC,KAAK,GAAgCH,QAAQ,CAACG,KAAK;AAEhE;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMC,IAAI,GAEcJ,QAAQ,CAACI,IAAI;AAE5C;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMC,YAAY,GAA2CL,QAAQ,CAACK,YAAY;AAEzF;;;;;;;;;;;;;;;;;;AAkBA,OAAO,MAAMC,SAAS,GAuClBN,QAAQ,CAACM,SAAS;AAEtB;;;;;;;;;;;;;;;;;;;;;;AAsBA,OAAO,MAAMC,GAAG,gBA+CZR,IAAI,CAACS,IAAI,CAGX,CAAC,EAAER,QAAQ,CAACO,GAAG,CAAC;AAElB;;;;;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,MAAMC,IAAI,gBAyCbpB,IAAI,CAACS,IAAI,CAGX,CAAC,EAAER,QAAQ,CAACmB,IAAI,CAAC;AAEnB;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,KAAK,gBAyCdrB,IAAI,CAACS,IAAI,CAGX,CAAC,EAAER,QAAQ,CAACoB,KAAK,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMC,MAAM,gBA2CftB,IAAI,CAACS,IAAI,CAGX,CAAC,EAAER,QAAQ,CAACqB,MAAM,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"HashSet.js","names":["Dual","internal","TypeId","HashSetTypeId","empty","make","fromIterable","isHashSet","add","dual","has","remove","size","isEmpty","union","intersection","difference","isSubset","map","filter","some","every","reduce"],"sources":["../src/HashSet.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAaA,OAAO,KAAKA,IAAI,MAAM,eAAe;AAErC,OAAO,KAAKC,QAAQ,MAAM,uBAAuB;AAKjD,MAAMC,MAAM,GAAGD,QAAQ,CAACE,aAAa;AAoFrC;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAMC,KAAK,GAAgCH,QAAQ,CAACG,KAAK;AAEhE;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAMC,IAAI,GAEcJ,QAAQ,CAACI,IAAI;AAE5C;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAMC,YAAY,GAA2CL,QAAQ,CAACK,YAAY;AAEzF;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,SAAS,GAyClBN,QAAQ,CAACM,SAAS;AAEtB;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMC,GAAG,gBAiDZR,IAAI,CAACS,IAAI,CAGX,CAAC,EAAER,QAAQ,CAACO,GAAG,CAAC;AAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,OAAO,MAAME,GAAG,gBAuEZV,IA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,QAAQ,CAACmB,IAAI,CAAC;AAEnB;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMC,KAAK,gBA2CdrB,IAAI,CAACS,IAAI,CAGX,CAAC,EAAER,QAAQ,CAACoB,KAAK,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAMC,MAAM,gBA6CftB,IAAI,CAACS,IAAI,CAGX,CAAC,EAAER,QAAQ,CAACqB,MAAM,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Inspectable.d.ts b/.opencode/node_modules/effect/dist/Inspectable.d.ts index 457222050b38c7f31dc9acd273ae97985138767f..6e8a110db95458f8eb4d0ac8f7ccd098f2c1a134 100644 --- a/.opencode/node_modules/effect/dist/Inspectable.d.ts +++ b/.opencode/node_modules/effect/dist/Inspectable.d.ts @@ -1,11 +1,18 @@ /** - * Symbol used by Node.js for custom object inspection. + * Defines the symbol used by Node.js for custom object inspection. + * + * **When to use** + * + * Use to implement Node.js custom inspection for a value. + * + * **Details** * * This symbol is recognized by Node.js's `util.inspect()` function and the REPL * for custom object representation. When an object has a method with this symbol, * it will be called to determine how the object should be displayed. * - * @example + * **Example** (Defining custom Node inspection) + * * ```ts * import { Inspectable } from "effect" * @@ -21,8 +28,8 @@ * console.log(obj) // Displays: CustomObject(hello) * ``` * - * @since 2.0.0 * @category symbols + * @since 2.0.0 */ export declare const NodeInspectSymbol: unique symbol; /** @@ -30,7 +37,12 @@ export declare const NodeInspectSymbol: unique symbol; * This symbol type is used to implement custom inspection behavior in Node.js * environments. * - * @example + * **When to use** + * + * Use to type methods keyed by the Node.js custom inspection symbol. + * + * **Example** (Typing custom Node inspection) + * * ```ts * import { Inspectable } from "effect" * @@ -46,21 +58,27 @@ export declare const NodeInspectSymbol: unique symbol; * console.log(obj) // CustomObject(test) * ``` * - * @since 2.0.0 * @category symbols + * @since 2.0.0 */ export type NodeInspectSymbol = typeof NodeInspectSymbol; /** * Interface for objects that can be inspected and provide custom string representations. * + * **When to use** + * + * Use to define values with custom string, JSON, and Node.js inspection output. + * + * **Details** + * * Objects implementing this interface can control how they appear in debugging contexts, * JSON serialization, and Node.js inspection. This is particularly useful for creating * custom data types that display meaningful information during development. * - * @example + * **Example** (Implementing inspectable objects) + * * ```ts - * import { Inspectable } from "effect" - * import { format } from "effect/Formatter" + * import { Formatter, Inspectable } from "effect" * * class Result implements Inspectable.Inspectable { * constructor( @@ -69,7 +87,7 @@ export type NodeInspectSymbol = typeof NodeInspectSymbol; * ) {} * * toString(): string { - * return format(this.toJSON()) + * return Formatter.format(this.toJSON()) * } * * toJSON() { @@ -85,8 +103,8 @@ export type NodeInspectSymbol = typeof NodeInspectSymbol; * console.log(success.toString()) // Pretty formatted JSON * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface Inspectable { toString(): string; @@ -94,29 +112,58 @@ export interface Inspectable { [NodeInspectSymbol](): unknown; } /** - * Safely converts a value to a JSON-serializable representation, useful for - * implementing the `toJSON` method of the {@link Inspectable} interface. + * Converts a value to a JSON-serializable representation safely. + * + * **When to use** + * + * Use when you need a safe, JSON-serializable representation of a value + * without risking unhandled errors. + * + * **Details** * * This function attempts to extract JSON data from objects that implement the * `toJSON` method, recursively processes arrays, and handles errors gracefully. * For objects that don't have a `toJSON` method, it applies redaction to * protect sensitive information. * - * @since 2.0.0 + * @see {@link toStringUnknown} for converting unknown values to strings + * + * @category converting + * @since 4.0.0 */ export declare const toJson: (input: unknown) => unknown; /** + * Converts an unknown value to a string for diagnostics. + * + * **When to use** + * + * Use to produce a diagnostic string from a value whose runtime type is unknown. + * + * **Details** + * + * Strings are returned unchanged. Objects are formatted as JSON using the + * provided whitespace setting when possible, and values that cannot be + * formatted are converted with `String`. + * + * @category converting * @since 2.0.0 */ export declare const toStringUnknown: (u: unknown, whitespace?: number | string | undefined) => string; /** * A base prototype object that implements the {@link Inspectable} interface. * + * **When to use** + * + * Use as a prototype for plain objects that should share standard inspectable behavior. + * + * **Details** + * * This object provides default implementations for the {@link Inspectable} methods. * It can be used as a prototype for objects that want to be inspectable, * or as a mixin to add inspection capabilities to existing objects. * - * @example + * **Example** (Using the base inspectable prototype) + * * ```ts * import { Inspectable } from "effect" * @@ -135,17 +182,25 @@ export declare const toStringUnknown: (u: unknown, whitespace?: number | string * MyClass.prototype.constructor = MyClass * ``` * + * @category prototypes * @since 2.0.0 */ export declare const BaseProto: Inspectable; /** - * Abstract base class that implements the Inspectable interface. + * Provides an abstract base class that implements the Inspectable interface. + * + * **When to use** + * + * Use as a base class for inspectable objects that define their own JSON representation. + * + * **Details** * * This class provides a convenient way to create inspectable objects by extending it. * Subclasses only need to implement the `toJSON()` method, and they automatically * get proper `toString()` and Node.js inspection support. * - * @example + * **Example** (Extending the inspectable base class) + * * ```ts * import { Inspectable } from "effect" * @@ -173,13 +228,19 @@ export declare const BaseProto: Inspectable; * console.log(user) // In Node.js, shows the same formatted output * ``` * - * @since 2.0.0 * @category classes + * @since 2.0.0 */ export declare abstract class Class { /** * Returns a JSON representation of this object. * + * **When to use** + * + * Use to provide the JSON representation consumed by inherited inspection methods. + * + * **Details** + * * Subclasses must implement this method to define how the object * should be serialized for debugging and inspection purposes. * @@ -189,12 +250,20 @@ export declare abstract class Class { /** * Node.js custom inspection method. * + * **When to use** + * + * Use to expose the class JSON representation to Node.js inspection. + * * @since 2.0.0 */ [NodeInspectSymbol](): unknown; /** * Returns a formatted string representation of this object. * + * **When to use** + * + * Use to format the class JSON representation as a string. + * * @since 2.0.0 */ toString(): string; diff --git a/.opencode/node_modules/effect/dist/Inspectable.d.ts.map b/.opencode/node_modules/effect/dist/Inspectable.d.ts.map index 4a4df4944de8cf3396ffaedfa5c8d4f4a725d86f..30e52c1258e774b3467d1232e88e6f91c0a7b8e2 100644 --- a/.opencode/node_modules/effect/dist/Inspectable.d.ts.map +++ b/.opencode/node_modules/effect/dist/Inspectable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Inspectable.d.ts","sourceRoot":"","sources":["../src/Inspectable.ts"],"names":[],"mappings":"AA2CA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,iBAAiB,eAA2C,CAAA;AAEzE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAA;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,IAAI,MAAM,CAAA;IAClB,MAAM,IAAI,OAAO,CAAA;IACjB,CAAC,iBAAiB,CAAC,IAAI,OAAO,CAAA;CAC/B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM,GAAI,OAAO,OAAO,KAAG,OAevC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,GAAG,OAAO,EAAE,aAAY,MAAM,GAAG,MAAM,GAAG,SAAa,KAAG,MASzF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,SAAS,EAAE,WAUvB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,8BAAsB,KAAK;IACzB;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,IAAI,OAAO;IAC1B;;;;OAIG;IACH,CAAC,iBAAiB,CAAC;IAGnB;;;;OAIG;IACH,QAAQ;CAGT"} \ No newline at end of file +{"version":3,"file":"Inspectable.d.ts","sourceRoot":"","sources":["../src/Inspectable.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,iBAAiB,eAA2C,CAAA;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAA;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,IAAI,MAAM,CAAA;IAClB,MAAM,IAAI,OAAO,CAAA;IACjB,CAAC,iBAAiB,CAAC,IAAI,OAAO,CAAA;CAC/B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,MAAM,GAAI,OAAO,OAAO,KAAG,OAevC,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,GAAI,GAAG,OAAO,EAAE,aAAY,MAAM,GAAG,MAAM,GAAG,SAAa,KAAG,MASzF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,SAAS,EAAE,WAUvB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,8BAAsB,KAAK;IACzB;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,MAAM,IAAI,OAAO;IAC1B;;;;;;;;OAQG;IACH,CAAC,iBAAiB,CAAC;IAGnB;;;;;;;;OAQG;IACH,QAAQ;CAGT"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Inspectable.js b/.opencode/node_modules/effect/dist/Inspectable.js index 35fe0401de364aeeee14f86de816aa73f2278c9d..b3ece786307242610d1e31bb1f428733af66cc2c 100644 --- a/.opencode/node_modules/effect/dist/Inspectable.js +++ b/.opencode/node_modules/effect/dist/Inspectable.js @@ -1,39 +1,11 @@ /** - * This module provides utilities for making values inspectable and debuggable in TypeScript. + * Controls how values appear in logs and debugging output. * - * The Inspectable interface provides a standard way to implement custom string representations - * for objects, making them easier to debug and inspect. It includes support for JSON - * serialization, Node.js inspection, and safe circular reference handling. - * - * The module also includes redaction capabilities for sensitive data, allowing objects - * to provide different representations based on the current execution context. - * - * @example - * ```ts - * import { Inspectable } from "effect" - * import { format } from "effect/Formatter" - * - * class User extends Inspectable.Class { - * constructor( - * public readonly name: string, - * public readonly email: string - * ) { - * super() - * } - * - * toJSON() { - * return { - * _tag: "User", - * name: this.name, - * email: this.email - * } - * } - * } - * - * const user = new User("Alice", "alice@example.com") - * console.log(user.toString()) // Pretty printed JSON - * console.log(format(user)) // Same as toString() - * ``` + * Effect data types use `Inspectable` to provide stable string, JSON, and + * Node.js inspection output. This keeps custom values readable in logs, REPLs, + * test failures, and diagnostics. This module defines the Node inspect symbol, + * the `Inspectable` interface, safe conversion helpers, and shared prototype or + * class implementations for custom values. * * @since 2.0.0 */ @@ -41,13 +13,20 @@ import { format, formatJson } from "./Formatter.js"; import * as Predicate from "./Predicate.js"; import { redact } from "./Redactable.js"; /** - * Symbol used by Node.js for custom object inspection. + * Defines the symbol used by Node.js for custom object inspection. + * + * **When to use** + * + * Use to implement Node.js custom inspection for a value. + * + * **Details** * * This symbol is recognized by Node.js's `util.inspect()` function and the REPL * for custom object representation. When an object has a method with this symbol, * it will be called to determine how the object should be displayed. * - * @example + * **Example** (Defining custom Node inspection) + * * ```ts * import { Inspectable } from "effect" * @@ -63,20 +42,29 @@ import { redact } from "./Redactable.js"; * console.log(obj) // Displays: CustomObject(hello) * ``` * - * @since 2.0.0 * @category symbols + * @since 2.0.0 */ export const NodeInspectSymbol = /*#__PURE__*/Symbol.for("nodejs.util.inspect.custom"); /** - * Safely converts a value to a JSON-serializable representation, useful for - * implementing the `toJSON` method of the {@link Inspectable} interface. + * Converts a value to a JSON-serializable representation safely. + * + * **When to use** + * + * Use when you need a safe, JSON-serializable representation of a value + * without risking unhandled errors. + * + * **Details** * * This function attempts to extract JSON data from objects that implement the * `toJSON` method, recursively processes arrays, and handles errors gracefully. * For objects that don't have a `toJSON` method, it applies redaction to * protect sensitive information. * - * @since 2.0.0 + * @see {@link toStringUnknown} for converting unknown values to strings + * + * @category converting + * @since 4.0.0 */ export const toJson = input => { try { @@ -91,6 +79,19 @@ export const toJson = input => { return redact(input); }; /** + * Converts an unknown value to a string for diagnostics. + * + * **When to use** + * + * Use to produce a diagnostic string from a value whose runtime type is unknown. + * + * **Details** + * + * Strings are returned unchanged. Objects are formatted as JSON using the + * provided whitespace setting when possible, and values that cannot be + * formatted are converted with `String`. + * + * @category converting * @since 2.0.0 */ export const toStringUnknown = (u, whitespace = 2) => { @@ -108,11 +109,18 @@ export const toStringUnknown = (u, whitespace = 2) => { /** * A base prototype object that implements the {@link Inspectable} interface. * + * **When to use** + * + * Use as a prototype for plain objects that should share standard inspectable behavior. + * + * **Details** + * * This object provides default implementations for the {@link Inspectable} methods. * It can be used as a prototype for objects that want to be inspectable, * or as a mixin to add inspection capabilities to existing objects. * - * @example + * **Example** (Using the base inspectable prototype) + * * ```ts * import { Inspectable } from "effect" * @@ -131,6 +139,7 @@ export const toStringUnknown = (u, whitespace = 2) => { * MyClass.prototype.constructor = MyClass * ``` * + * @category prototypes * @since 2.0.0 */ export const BaseProto = { @@ -145,13 +154,20 @@ export const BaseProto = { } }; /** - * Abstract base class that implements the Inspectable interface. + * Provides an abstract base class that implements the Inspectable interface. + * + * **When to use** + * + * Use as a base class for inspectable objects that define their own JSON representation. + * + * **Details** * * This class provides a convenient way to create inspectable objects by extending it. * Subclasses only need to implement the `toJSON()` method, and they automatically * get proper `toString()` and Node.js inspection support. * - * @example + * **Example** (Extending the inspectable base class) + * * ```ts * import { Inspectable } from "effect" * @@ -179,13 +195,17 @@ export const BaseProto = { * console.log(user) // In Node.js, shows the same formatted output * ``` * - * @since 2.0.0 * @category classes + * @since 2.0.0 */ export class Class { /** * Node.js custom inspection method. * + * **When to use** + * + * Use to expose the class JSON representation to Node.js inspection. + * * @since 2.0.0 */ [NodeInspectSymbol]() { @@ -194,6 +214,10 @@ export class Class { /** * Returns a formatted string representation of this object. * + * **When to use** + * + * Use to format the class JSON representation as a string. + * * @since 2.0.0 */ toString() { diff --git a/.opencode/node_modules/effect/dist/Inspectable.js.map b/.opencode/node_modules/effect/dist/Inspectable.js.map index 638be520609ed2ffe482e5e5c8fdd151f9caf4b2..7da973527efc42f970f0748f5057645b126d99c7 100644 --- a/.opencode/node_modules/effect/dist/Inspectable.js.map +++ b/.opencode/node_modules/effect/dist/Inspectable.js.map @@ -1 +1 @@ -{"version":3,"file":"Inspectable.js","names":["format","formatJson","Predicate","redact","NodeInspectSymbol","Symbol","for","toJson","input","hasProperty","isFunction","length","toJSON","Array","isArray","map","toStringUnknown","u","whitespace","space","String","BaseProto","toString","Class"],"sources":["../src/Inspectable.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,SAASA,MAAM,EAAEC,UAAU,QAAQ,gBAAgB;AACnD,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,SAASC,MAAM,QAAQ,iBAAiB;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAMC,iBAAiB,gBAAGC,MAAM,CAACC,GAAG,CAAC,4BAA4B,CAAC;AAwEzE;;;;;;;;;;;AAWA,OAAO,MAAMC,MAAM,GAAIC,KAAc,IAAa;EAChD,IAAI;IACF,IACEN,SAAS,CAACO,WAAW,CAACD,KAAK,EAAE,QAAQ,CAAC,IACtCN,SAAS,CAACQ,UAAU,CAACF,KAAK,CAAC,QAAQ,CAAC,CAAC,IACrCA,KAAK,CAAC,QAAQ,CAAC,CAACG,MAAM,KAAK,CAAC,EAC5B;MACA,OAAOH,KAAK,CAACI,MAAM,EAAE;IACvB,CAAC,MAAM,IAAIC,KAAK,CAACC,OAAO,CAACN,KAAK,CAAC,EAAE;MAC/B,OAAOA,KAAK,CAACO,GAAG,CAACR,MAAM,CAAC;IAC1B;EACF,CAAC,CAAC,MAAM;IACN,OAAO,gBAAgB;EACzB;EACA,OAAOJ,MAAM,CAACK,KAAK,CAAC;AACtB,CAAC;AAED;;;AAGA,OAAO,MAAMQ,eAAe,GAAGA,CAACC,CAAU,EAAEC,UAAA,GAA0C,CAAC,KAAY;EACjG,IAAI,OAAOD,CAAC,KAAK,QAAQ,EAAE;IACzB,OAAOA,CAAC;EACV;EACA,IAAI;IACF,OAAO,OAAOA,CAAC,KAAK,QAAQ,GAAGhB,UAAU,CAACgB,CAAC,EAAE;MAAEE,KAAK,EAAED;IAAU,CAAE,CAAC,GAAGE,MAAM,CAACH,CAAC,CAAC;EACjF,CAAC,CAAC,MAAM;IACN,OAAOG,MAAM,CAACH,CAAC,CAAC;EAClB;AACF,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAO,MAAMI,SAAS,GAAgB;EACpCT,MAAMA,CAAA;IACJ,OAAOL,MAAM,CAAC,IAAI,CAAC;EACrB,CAAC;EACD,CAACH,iBAAiB,IAAC;IACjB,OAAO,IAAI,CAACQ,MAAM,EAAE;EACtB,CAAC;EACDU,QAAQA,CAAA;IACN,OAAOtB,MAAM,CAAC,IAAI,CAACY,MAAM,EAAE,CAAC;EAC9B;CACD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,OAAM,MAAgBW,KAAK;EAUzB;;;;;EAKA,CAACnB,iBAAiB,IAAC;IACjB,OAAO,IAAI,CAACQ,MAAM,EAAE;EACtB;EACA;;;;;EAKAU,QAAQA,CAAA;IACN,OAAOtB,MAAM,CAAC,IAAI,CAACY,MAAM,EAAE,CAAC;EAC9B","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Inspectable.js","names":["format","formatJson","Predicate","redact","NodeInspectSymbol","Symbol","for","toJson","input","hasProperty","isFunction","length","toJSON","Array","isArray","map","toStringUnknown","u","whitespace","space","String","BaseProto","toString","Class"],"sources":["../src/Inspectable.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAWA,SAASA,MAAM,EAAEC,UAAU,QAAQ,gBAAgB;AACnD,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,SAASC,MAAM,QAAQ,iBAAiB;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,OAAO,MAAMC,iBAAiB,gBAAGC,MAAM,CAACC,GAAG,CAAC,4BAA4B,CAAC;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;EAC9B;CACD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,OAAM,MAAgBW,KAAK;EAgBzB;;;;;;;;;EASA,CAACnB,iBAAiB,IAAC;IACjB,OAAO,IAAI,CAACQ,MAAM,EAAE;EACtB;EACA;;;;;;;;;EASAU,QAAQA,CAAA;IACN,OAAOtB,MAAM,CAAC,IAAI,CAACY,MAAM,EAAE,CAAC;EAC9B","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Iterable.d.ts b/.opencode/node_modules/effect/dist/Iterable.d.ts index e943d169ab680036a0f4a654b7702e9b3f3a0548..dc3a8c99290d9b4a1d74b4a87976e254ab8444c4 100644 --- a/.opencode/node_modules/effect/dist/Iterable.d.ts +++ b/.opencode/node_modules/effect/dist/Iterable.d.ts @@ -1,31 +1,10 @@ /** - * This module provides utility functions for working with Iterables in TypeScript. + * Works with JavaScript values that implement `[Symbol.iterator]`. * - * Iterables are objects that implement the iterator protocol, allowing them to be - * consumed with `for...of` loops, spread syntax, and other iteration constructs. - * This module provides a comprehensive set of functions for creating, transforming, - * and working with iterables in a functional programming style. - * - * Unlike arrays, iterables can be lazy and potentially infinite, making them suitable - * for stream processing and memory-efficient data manipulation. All functions in this - * module preserve the lazy nature of iterables where possible. - * - * @example - * ```ts - * import { Iterable, Option } from "effect" - * - * // Create iterables - * const numbers = Iterable.range(1, 5) - * const doubled = Iterable.map(numbers, (x) => x * 2) - * const filtered = Iterable.filter(doubled, (x) => x > 5) - * - * console.log(Array.from(filtered)) // [6, 8, 10] - * - * // Infinite iterables - * const fibonacci = Iterable.unfold([0, 1], ([a, b]) => Option.some([a, [b, a + b]])) - * const first10 = Iterable.take(fibonacci, 10) - * console.log(Array.from(first10)) // [0, 1, 1, 2, 3, 5, 8, 13, 21, 34] - * ``` + * Iterables include arrays, strings, generators, sets, and custom lazy + * sequences. The helpers in this module let code transform, search, group, and + * fold iterable values while preserving the input as an iterable instead of + * forcing an array first. * * @since 2.0.0 */ @@ -37,14 +16,14 @@ import type { NoInfer } from "./Types.ts"; /** * Creates an iterable by applying a function to consecutive integers. * - * This is a fundamental constructor that generates iterables by calling a function - * with each index starting from 0. If no length is specified, the iterable will - * be infinite. This is useful for generating sequences, patterns, or any indexed data. + * **Details** + * + * The function is called with each index starting from `0`. If no length is + * specified, the iterable is infinite. This is useful for generating + * sequences, patterns, or any indexed data. * - * @param f - Function that receives the index and returns the element - * @param options - Configuration object with optional length + * **Example** (Generating values by index) * - * @example * ```ts * import { Iterable } from "effect" * @@ -69,16 +48,21 @@ export declare const makeBy: (f: (i: number) => A, options?: { readonly length?: number; }) => Iterable; /** - * Return a `Iterable` containing a range of integers, including both endpoints. + * Returns an iterable of integers starting at `start` and increasing by `1`. * - * If `end` is omitted, the range will not have an upper bound. + * **Details** + * + * When `end` is provided and `start <= end`, both endpoints are included. When + * `end` is omitted, the iterable is unbounded. When `start > end`, the + * iterable contains only `start`. + * + * **Example** (Creating a range) * - * @example * ```ts - * import { range } from "effect/Iterable" + * import { Iterable } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(Array.from(range(1, 3)), [1, 2, 3]) + * assert.deepStrictEqual(Array.from(Iterable.range(1, 3)), [1, 2, 3]) * ``` * * @category constructors @@ -86,16 +70,19 @@ export declare const makeBy: (f: (i: number) => A, options?: { */ export declare const range: (start: number, end?: number) => Iterable; /** - * Return a `Iterable` containing a value repeated the specified number of times. + * Returns a `Iterable` containing a value repeated the specified number of times. + * + * **Details** + * + * `n` is normalized to an integer greater than or equal to `1`. * - * **Note**. `n` is normalized to an integer >= 1. + * **Example** (Repeating a value) * - * @example * ```ts - * import { replicate } from "effect/Iterable" + * import { Iterable } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(Array.from(replicate("a", 3)), ["a", "a", "a"]) + * assert.deepStrictEqual(Array.from(Iterable.replicate("a", 3)), ["a", "a", "a"]) * ``` * * @category constructors @@ -103,16 +90,19 @@ export declare const range: (start: number, end?: number) => Iterable; */ export declare const replicate: { /** - * Return a `Iterable` containing a value repeated the specified number of times. + * Returns a `Iterable` containing a value repeated the specified number of times. + * + * **Details** * - * **Note**. `n` is normalized to an integer >= 1. + * `n` is normalized to an integer greater than or equal to `1`. + * + * **Example** (Repeating a value) * - * @example * ```ts - * import { replicate } from "effect/Iterable" + * import { Iterable } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(Array.from(replicate("a", 3)), ["a", "a", "a"]) + * assert.deepStrictEqual(Array.from(Iterable.replicate("a", 3)), ["a", "a", "a"]) * ``` * * @category constructors @@ -120,16 +110,19 @@ export declare const replicate: { */ (n: number): (a: A) => Iterable; /** - * Return a `Iterable` containing a value repeated the specified number of times. + * Returns a `Iterable` containing a value repeated the specified number of times. * - * **Note**. `n` is normalized to an integer >= 1. + * **Details** + * + * `n` is normalized to an integer greater than or equal to `1`. + * + * **Example** (Repeating a value) * - * @example * ```ts - * import { replicate } from "effect/Iterable" + * import { Iterable } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(Array.from(replicate("a", 3)), ["a", "a", "a"]) + * assert.deepStrictEqual(Array.from(Iterable.replicate("a", 3)), ["a", "a", "a"]) * ``` * * @category constructors @@ -138,22 +131,76 @@ export declare const replicate: { (a: A, n: number): Iterable; }; /** + * Repeats an iterable `n` times, yielding the full contents of `self` for each + * repetition. + * + * **When to use** + * + * Use to repeat an iterable's contents a specific number of times. + * + * **Details** + * + * The result is lazy. Each repetition obtains a new iterator from `self`. + * + * @see {@link forever} for repeating without an upper bound + * @see {@link replicate} for repeating a single value * @category constructors * @since 4.0.0 */ export declare const repeat: { /** + * Repeats an iterable `n` times, yielding the full contents of `self` for each + * repetition. + * + * **When to use** + * + * Use to repeat an iterable's contents a specific number of times. + * + * **Details** + * + * The result is lazy. Each repetition obtains a new iterator from `self`. + * + * @see {@link forever} for repeating without an upper bound + * @see {@link replicate} for repeating a single value * @category constructors * @since 4.0.0 */ (n: number): (self: Iterable) => Iterable; /** + * Repeats an iterable `n` times, yielding the full contents of `self` for each + * repetition. + * + * **When to use** + * + * Use to repeat an iterable's contents a specific number of times. + * + * **Details** + * + * The result is lazy. Each repetition obtains a new iterator from `self`. + * + * @see {@link forever} for repeating without an upper bound + * @see {@link replicate} for repeating a single value * @category constructors * @since 4.0.0 */ (self: Iterable, n: number): Iterable; }; /** + * Repeats an iterable without an upper bound. + * + * **When to use** + * + * Use to cycle a reusable iterable without an upper bound when a downstream + * consumer controls how many values are taken. + * + * **Gotchas** + * + * The returned iterable is lazy and should usually be bounded with `take` or + * another terminating consumer before materializing it. + * + * @see {@link repeat} for repeating an iterable a specific number of times + * @see {@link take} for bounding the unbounded result before materializing it + * * @category constructors * @since 4.0.0 */ @@ -161,26 +208,28 @@ export declare const forever: (self: Iterable) => Iterable; /** * Takes a record and returns an Iterable of tuples containing its keys and values. * - * @example + * **Example** (Converting a record to entries) + * * ```ts - * import { fromRecord } from "effect/Iterable" + * import { Iterable } from "effect" * import * as assert from "node:assert" * * const x = { a: 1, b: 2, c: 3 } - * assert.deepStrictEqual(Array.from(fromRecord(x)), [["a", 1], ["b", 2], [ + * assert.deepStrictEqual(Array.from(Iterable.fromRecord(x)), [["a", 1], ["b", 2], [ * "c", * 3 * ]]) * ``` * - * @category conversions + * @category converting * @since 2.0.0 */ export declare const fromRecord: (self: Readonly>) => Iterable<[K, A]>; /** - * Prepend an element to the front of an `Iterable`, creating a new `Iterable`. + * Prepends an element to the front of an `Iterable`, creating a new `Iterable`. + * + * **Example** (Prepending an element) * - * @example * ```ts * import { Iterable } from "effect" * @@ -194,14 +243,15 @@ export declare const fromRecord: (self: Readonly(head: B): (self: Iterable) => Iterable; /** - * Prepend an element to the front of an `Iterable`, creating a new `Iterable`. + * Prepends an element to the front of an `Iterable`, creating a new `Iterable`. + * + * **Example** (Prepending an element) * - * @example * ```ts * import { Iterable } from "effect" * @@ -236,7 +287,7 @@ export declare const prepend: { * console.log(Array.from(withZ)) // ["z", "a", "b", "c"] * ``` * - * @category concatenating + * @category combining * @since 2.0.0 */ (self: Iterable, head: B): Iterable; @@ -244,7 +295,8 @@ export declare const prepend: { /** * Prepends the specified prefix iterable to the beginning of the specified iterable. * - * @example + * **Example** (Prepending another iterable) + * * ```ts * import { Iterable } from "effect" * import * as assert from "node:assert" @@ -255,14 +307,15 @@ export declare const prepend: { * ) * ``` * - * @category concatenating + * @category combining * @since 2.0.0 */ export declare const prependAll: { /** * Prepends the specified prefix iterable to the beginning of the specified iterable. * - * @example + * **Example** (Prepending another iterable) + * * ```ts * import { Iterable } from "effect" * import * as assert from "node:assert" @@ -273,14 +326,15 @@ export declare const prependAll: { * ) * ``` * - * @category concatenating + * @category combining * @since 2.0.0 */ (that: Iterable): (self: Iterable) => Iterable; /** * Prepends the specified prefix iterable to the beginning of the specified iterable. * - * @example + * **Example** (Prepending another iterable) + * * ```ts * import { Iterable } from "effect" * import * as assert from "node:assert" @@ -291,15 +345,31 @@ export declare const prependAll: { * ) * ``` * - * @category concatenating + * @category combining * @since 2.0.0 */ (self: Iterable, that: Iterable): Iterable; }; /** - * Append an element to the end of an `Iterable`, creating a new `Iterable`. + * Appends an element to the end of an `Iterable`, creating a new `Iterable`. + * + * **When to use** + * + * Use to add one element after all elements of an iterable while keeping the + * result as a lazy `Iterable`. + * + * **Details** + * + * The result yields every element from `self` first, then yields `last` after + * `self` is exhausted. + * + * **Gotchas** + * + * If `self` is infinite or never completes, the appended element is never + * reached. + * + * **Example** (Appending an element) * - * @example * ```ts * import { Iterable } from "effect" * @@ -315,14 +385,33 @@ export declare const prependAll: { * console.log(Array.from(result)) // [1, 2, 3, 4] * ``` * - * @category concatenating + * @see {@link prepend} for adding one element before the existing elements + * @see {@link appendAll} for appending all elements from another iterable + * + * @category combining * @since 2.0.0 */ export declare const append: { /** - * Append an element to the end of an `Iterable`, creating a new `Iterable`. + * Appends an element to the end of an `Iterable`, creating a new `Iterable`. + * + * **When to use** + * + * Use to add one element after all elements of an iterable while keeping the + * result as a lazy `Iterable`. + * + * **Details** + * + * The result yields every element from `self` first, then yields `last` after + * `self` is exhausted. + * + * **Gotchas** + * + * If `self` is infinite or never completes, the appended element is never + * reached. + * + * **Example** (Appending an element) * - * @example * ```ts * import { Iterable } from "effect" * @@ -338,14 +427,33 @@ export declare const append: { * console.log(Array.from(result)) // [1, 2, 3, 4] * ``` * - * @category concatenating + * @see {@link prepend} for adding one element before the existing elements + * @see {@link appendAll} for appending all elements from another iterable + * + * @category combining * @since 2.0.0 */ (last: B): (self: Iterable) => Iterable; /** - * Append an element to the end of an `Iterable`, creating a new `Iterable`. + * Appends an element to the end of an `Iterable`, creating a new `Iterable`. + * + * **When to use** + * + * Use to add one element after all elements of an iterable while keeping the + * result as a lazy `Iterable`. + * + * **Details** + * + * The result yields every element from `self` first, then yields `last` after + * `self` is exhausted. + * + * **Gotchas** + * + * If `self` is infinite or never completes, the appended element is never + * reached. + * + * **Example** (Appending an element) * - * @example * ```ts * import { Iterable } from "effect" * @@ -361,7 +469,10 @@ export declare const append: { * console.log(Array.from(result)) // [1, 2, 3, 4] * ``` * - * @category concatenating + * @see {@link prepend} for adding one element before the existing elements + * @see {@link appendAll} for appending all elements from another iterable + * + * @category combining * @since 2.0.0 */ (self: Iterable, last: B): Iterable; @@ -369,7 +480,22 @@ export declare const append: { /** * Concatenates two iterables, combining their elements. * - * @example + * **When to use** + * + * Use to lazily concatenate two iterables while preserving order, yielding all + * elements from `self` before `that`. + * + * **Details** + * + * The result is lazy. The iterator for `that` is not created or read until + * `self` is exhausted. + * + * **Gotchas** + * + * If `self` is infinite or never completes, `that` is never reached. + * + * **Example** (Concatenating iterables) + * * ```ts * import { Iterable } from "effect" * @@ -391,14 +517,32 @@ export declare const append: { * console.log(Array.from(result)) // [0, -1, -2, 1, 2] * ``` * - * @category concatenating + * @see {@link append} for appending one value instead of another iterable + * @see {@link prependAll} for yielding another iterable before `self` + * + * @category combining * @since 2.0.0 */ export declare const appendAll: { /** * Concatenates two iterables, combining their elements. * - * @example + * **When to use** + * + * Use to lazily concatenate two iterables while preserving order, yielding all + * elements from `self` before `that`. + * + * **Details** + * + * The result is lazy. The iterator for `that` is not created or read until + * `self` is exhausted. + * + * **Gotchas** + * + * If `self` is infinite or never completes, `that` is never reached. + * + * **Example** (Concatenating iterables) + * * ```ts * import { Iterable } from "effect" * @@ -420,14 +564,32 @@ export declare const appendAll: { * console.log(Array.from(result)) // [0, -1, -2, 1, 2] * ``` * - * @category concatenating + * @see {@link append} for appending one value instead of another iterable + * @see {@link prependAll} for yielding another iterable before `self` + * + * @category combining * @since 2.0.0 */ (that: Iterable): (self: Iterable) => Iterable; /** * Concatenates two iterables, combining their elements. * - * @example + * **When to use** + * + * Use to lazily concatenate two iterables while preserving order, yielding all + * elements from `self` before `that`. + * + * **Details** + * + * The result is lazy. The iterator for `that` is not created or read until + * `self` is exhausted. + * + * **Gotchas** + * + * If `self` is infinite or never completes, `that` is never reached. + * + * **Example** (Concatenating iterables) + * * ```ts * import { Iterable } from "effect" * @@ -449,15 +611,19 @@ export declare const appendAll: { * console.log(Array.from(result)) // [0, -1, -2, 1, 2] * ``` * - * @category concatenating + * @see {@link append} for appending one value instead of another iterable + * @see {@link prependAll} for yielding another iterable before `self` + * + * @category combining * @since 2.0.0 */ (self: Iterable, that: Iterable): Iterable; }; /** - * Reduce an `Iterable` from the left, keeping all intermediate results instead of only the final result. + * Reduces an `Iterable` from the left, keeping all intermediate results instead of only the final result. + * + * **Example** (Tracking running results) * - * @example * ```ts * import { Iterable } from "effect" * @@ -482,9 +648,10 @@ export declare const appendAll: { */ export declare const scan: { /** - * Reduce an `Iterable` from the left, keeping all intermediate results instead of only the final result. + * Reduces an `Iterable` from the left, keeping all intermediate results instead of only the final result. + * + * **Example** (Tracking running results) * - * @example * ```ts * import { Iterable } from "effect" * @@ -509,9 +676,10 @@ export declare const scan: { */ (b: B, f: (b: B, a: A) => B): (self: Iterable) => Iterable; /** - * Reduce an `Iterable` from the left, keeping all intermediate results instead of only the final result. + * Reduces an `Iterable` from the left, keeping all intermediate results instead of only the final result. + * + * **Example** (Tracking running results) * - * @example * ```ts * import { Iterable } from "effect" * @@ -537,15 +705,16 @@ export declare const scan: { (self: Iterable, b: B, f: (b: B, a: A) => B): Iterable; }; /** - * Determine if an `Iterable` is empty + * Checks whether an `Iterable` is empty. + * + * **Example** (Checking for emptiness) * - * @example * ```ts - * import { isEmpty } from "effect/Iterable" + * import { Iterable } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isEmpty([]), true) - * assert.deepStrictEqual(isEmpty([1, 2, 3]), false) + * assert.deepStrictEqual(Iterable.isEmpty([]), true) + * assert.deepStrictEqual(Iterable.isEmpty([1, 2, 3]), false) * ``` * * @category guards @@ -553,9 +722,10 @@ export declare const scan: { */ export declare const isEmpty: (self: Iterable) => self is Iterable; /** - * Return the number of elements in a `Iterable`. + * Returns the number of elements in a `Iterable`. + * + * **Example** (Counting iterable elements) * - * @example * ```ts * import { Iterable } from "effect" * @@ -579,12 +749,12 @@ export declare const isEmpty: (self: Iterable) => self is Iterable; */ export declare const size: (self: Iterable) => number; /** - * Get the first element of a `Iterable`, or `None` if the `Iterable` is empty. + * Gets the first element of a `Iterable` safely, or `None` if the `Iterable` is empty. + * + * **Example** (Getting the first element) * - * @example * ```ts - * import { Iterable } from "effect" - * import * as Option from "effect/Option" + * import { Iterable, Option } from "effect" * * const numbers = [1, 2, 3] * console.log(Iterable.head(numbers)) // Option.some(1) @@ -608,9 +778,19 @@ export declare const size: (self: Iterable) => number; */ export declare const head: (self: Iterable) => Option; /** - * Get the first element of a `Iterable`, or throw an error if the `Iterable` is empty. + * Gets the first element of an `Iterable` without returning an `Option`. + * + * **When to use** + * + * Use when the `Iterable` is known to be non-empty and direct access to the + * first element is preferred over handling `Option.none`. + * + * **Gotchas** + * + * Throws if the `Iterable` is empty. + * + * **Example** (Getting the first element unsafely) * - * @example * ```ts * import { Iterable } from "effect" * @@ -620,13 +800,8 @@ export declare const head: (self: Iterable) => Option; * const letters = "hello" * console.log(Iterable.headUnsafe(letters)) // "h" * - * // This will throw an error! - * try { - * const empty = Iterable.empty() - * Iterable.headUnsafe(empty) // throws Error: "headUnsafe: empty iterable" - * } catch (error) { - * console.log((error as Error).message) // "headUnsafe: empty iterable" - * } + * // Iterable.headUnsafe(Iterable.empty()) + * // throws Error: "headUnsafe: empty iterable" * * // Use only when you're certain the iterable is non-empty * const nonEmpty = Iterable.range(1, 10) @@ -634,15 +809,18 @@ export declare const head: (self: Iterable) => Option; * ``` * * @category getters - * @since 3.3.0 + * @since 4.0.0 */ export declare const headUnsafe: (self: Iterable) => A; /** - * Keep only a max number of elements from the start of an `Iterable`, creating a new `Iterable`. + * Keeps only a max number of elements from the start of an `Iterable`, creating a new `Iterable`. * - * **Note**. `n` is normalized to a non negative integer. + * **Details** + * + * `n` is normalized to a non-negative integer. + * + * **Example** (Taking from the start) * - * @example * ```ts * import { Iterable } from "effect" * @@ -669,11 +847,14 @@ export declare const headUnsafe: (self: Iterable) => A; */ export declare const take: { /** - * Keep only a max number of elements from the start of an `Iterable`, creating a new `Iterable`. + * Keeps only a max number of elements from the start of an `Iterable`, creating a new `Iterable`. + * + * **Details** + * + * `n` is normalized to a non-negative integer. * - * **Note**. `n` is normalized to a non negative integer. + * **Example** (Taking from the start) * - * @example * ```ts * import { Iterable } from "effect" * @@ -700,11 +881,14 @@ export declare const take: { */ (n: number): (self: Iterable) => Iterable; /** - * Keep only a max number of elements from the start of an `Iterable`, creating a new `Iterable`. + * Keeps only a max number of elements from the start of an `Iterable`, creating a new `Iterable`. * - * **Note**. `n` is normalized to a non negative integer. + * **Details** + * + * `n` is normalized to a non-negative integer. + * + * **Example** (Taking from the start) * - * @example * ```ts * import { Iterable } from "effect" * @@ -732,9 +916,11 @@ export declare const take: { (self: Iterable, n: number): Iterable; }; /** - * Calculate the longest initial Iterable for which all element satisfy the specified predicate, creating a new `Iterable`. + * Takes the longest initial `Iterable` prefix for which all elements satisfy the + * specified predicate. + * + * **Example** (Taking while a predicate holds) * - * @example * ```ts * import { Iterable } from "effect" * @@ -766,9 +952,11 @@ export declare const take: { */ export declare const takeWhile: { /** - * Calculate the longest initial Iterable for which all element satisfy the specified predicate, creating a new `Iterable`. + * Takes the longest initial `Iterable` prefix for which all elements satisfy the + * specified predicate. + * + * **Example** (Taking while a predicate holds) * - * @example * ```ts * import { Iterable } from "effect" * @@ -800,9 +988,11 @@ export declare const takeWhile: { */ (refinement: (a: NoInfer, i: number) => a is B): (self: Iterable) => Iterable; /** - * Calculate the longest initial Iterable for which all element satisfy the specified predicate, creating a new `Iterable`. + * Takes the longest initial `Iterable` prefix for which all elements satisfy the + * specified predicate. + * + * **Example** (Taking while a predicate holds) * - * @example * ```ts * import { Iterable } from "effect" * @@ -834,9 +1024,11 @@ export declare const takeWhile: { */ (predicate: (a: NoInfer, i: number) => boolean): (self: Iterable) => Iterable; /** - * Calculate the longest initial Iterable for which all element satisfy the specified predicate, creating a new `Iterable`. + * Takes the longest initial `Iterable` prefix for which all elements satisfy the + * specified predicate. + * + * **Example** (Taking while a predicate holds) * - * @example * ```ts * import { Iterable } from "effect" * @@ -868,9 +1060,11 @@ export declare const takeWhile: { */ (self: Iterable, refinement: (a: A, i: number) => a is B): Iterable; /** - * Calculate the longest initial Iterable for which all element satisfy the specified predicate, creating a new `Iterable`. + * Takes the longest initial `Iterable` prefix for which all elements satisfy the + * specified predicate. + * + * **Example** (Taking while a predicate holds) * - * @example * ```ts * import { Iterable } from "effect" * @@ -903,11 +1097,14 @@ export declare const takeWhile: { (self: Iterable, predicate: (a: A, i: number) => boolean): Iterable; }; /** - * Drop a max number of elements from the start of an `Iterable` + * Drops a max number of elements from the start of an `Iterable` + * + * **Details** + * + * `n` is normalized to a non-negative integer. * - * **Note**. `n` is normalized to a non negative integer. + * **Example** (Dropping from the start) * - * @example * ```ts * import { Iterable } from "effect" * @@ -933,11 +1130,14 @@ export declare const takeWhile: { */ export declare const drop: { /** - * Drop a max number of elements from the start of an `Iterable` + * Drops a max number of elements from the start of an `Iterable` * - * **Note**. `n` is normalized to a non negative integer. + * **Details** + * + * `n` is normalized to a non-negative integer. + * + * **Example** (Dropping from the start) * - * @example * ```ts * import { Iterable } from "effect" * @@ -963,11 +1163,14 @@ export declare const drop: { */ (n: number): (self: Iterable) => Iterable; /** - * Drop a max number of elements from the start of an `Iterable` + * Drops a max number of elements from the start of an `Iterable` + * + * **Details** * - * **Note**. `n` is normalized to a non negative integer. + * `n` is normalized to a non-negative integer. + * + * **Example** (Dropping from the start) * - * @example * ```ts * import { Iterable } from "effect" * @@ -997,10 +1200,10 @@ export declare const drop: { * Returns the first element that satisfies the specified * predicate, or `None` if no such element exists. * - * @example + * **Example** (Finding the first match) + * * ```ts - * import { Iterable } from "effect" - * import * as Option from "effect/Option" + * import { Iterable, Option } from "effect" * * const numbers = [1, 3, 4, 6, 8] * const firstEven = Iterable.findFirst(numbers, (x) => x % 2 === 0) @@ -1038,10 +1241,10 @@ export declare const findFirst: { * Returns the first element that satisfies the specified * predicate, or `None` if no such element exists. * - * @example + * **Example** (Finding the first match) + * * ```ts - * import { Iterable } from "effect" - * import * as Option from "effect/Option" + * import { Iterable, Option } from "effect" * * const numbers = [1, 3, 4, 6, 8] * const firstEven = Iterable.findFirst(numbers, (x) => x % 2 === 0) @@ -1079,10 +1282,10 @@ export declare const findFirst: { * Returns the first element that satisfies the specified * predicate, or `None` if no such element exists. * - * @example + * **Example** (Finding the first match) + * * ```ts - * import { Iterable } from "effect" - * import * as Option from "effect/Option" + * import { Iterable, Option } from "effect" * * const numbers = [1, 3, 4, 6, 8] * const firstEven = Iterable.findFirst(numbers, (x) => x % 2 === 0) @@ -1120,10 +1323,10 @@ export declare const findFirst: { * Returns the first element that satisfies the specified * predicate, or `None` if no such element exists. * - * @example + * **Example** (Finding the first match) + * * ```ts - * import { Iterable } from "effect" - * import * as Option from "effect/Option" + * import { Iterable, Option } from "effect" * * const numbers = [1, 3, 4, 6, 8] * const firstEven = Iterable.findFirst(numbers, (x) => x % 2 === 0) @@ -1161,10 +1364,10 @@ export declare const findFirst: { * Returns the first element that satisfies the specified * predicate, or `None` if no such element exists. * - * @example + * **Example** (Finding the first match) + * * ```ts - * import { Iterable } from "effect" - * import * as Option from "effect/Option" + * import { Iterable, Option } from "effect" * * const numbers = [1, 3, 4, 6, 8] * const firstEven = Iterable.findFirst(numbers, (x) => x % 2 === 0) @@ -1202,10 +1405,10 @@ export declare const findFirst: { * Returns the first element that satisfies the specified * predicate, or `None` if no such element exists. * - * @example + * **Example** (Finding the first match) + * * ```ts - * import { Iterable } from "effect" - * import * as Option from "effect/Option" + * import { Iterable, Option } from "effect" * * const numbers = [1, 3, 4, 6, 8] * const firstEven = Iterable.findFirst(numbers, (x) => x % 2 === 0) @@ -1243,10 +1446,10 @@ export declare const findFirst: { * Returns the first element that satisfies the specified * predicate, or `None` if no such element exists. * - * @example + * **Example** (Finding the first match) + * * ```ts - * import { Iterable } from "effect" - * import * as Option from "effect/Option" + * import { Iterable, Option } from "effect" * * const numbers = [1, 3, 4, 6, 8] * const firstEven = Iterable.findFirst(numbers, (x) => x % 2 === 0) @@ -1282,9 +1485,10 @@ export declare const findFirst: { (self: Iterable, predicate: (a: A, i: number) => boolean): Option; }; /** - * Find the last element for which a predicate holds. + * Finds the last element for which a predicate holds. + * + * **Example** (Finding the last match) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1314,9 +1518,10 @@ export declare const findFirst: { */ export declare const findLast: { /** - * Find the last element for which a predicate holds. + * Finds the last element for which a predicate holds. + * + * **Example** (Finding the last match) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1346,9 +1551,10 @@ export declare const findLast: { */ (f: (a: NoInfer, i: number) => Option): (self: Iterable) => Option; /** - * Find the last element for which a predicate holds. + * Finds the last element for which a predicate holds. + * + * **Example** (Finding the last match) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1378,9 +1584,10 @@ export declare const findLast: { */ (refinement: (a: NoInfer, i: number) => a is B): (self: Iterable) => Option; /** - * Find the last element for which a predicate holds. + * Finds the last element for which a predicate holds. + * + * **Example** (Finding the last match) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1410,9 +1617,10 @@ export declare const findLast: { */ (predicate: (a: NoInfer, i: number) => boolean): (self: Iterable) => Option; /** - * Find the last element for which a predicate holds. + * Finds the last element for which a predicate holds. + * + * **Example** (Finding the last match) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1442,9 +1650,10 @@ export declare const findLast: { */ (self: Iterable, f: (a: A, i: number) => Option): Option; /** - * Find the last element for which a predicate holds. + * Finds the last element for which a predicate holds. + * + * **Example** (Finding the last match) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1474,9 +1683,10 @@ export declare const findLast: { */ (self: Iterable, refinement: (a: A, i: number) => a is B): Option; /** - * Find the last element for which a predicate holds. + * Finds the last element for which a predicate holds. + * + * **Example** (Finding the last match) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1509,7 +1719,8 @@ export declare const findLast: { /** * Takes two `Iterable`s and returns an `Iterable` of corresponding pairs. * - * @example + * **Example** (Zipping iterables) + * * ```ts * import { Iterable } from "effect" * @@ -1544,7 +1755,8 @@ export declare const zip: { /** * Takes two `Iterable`s and returns an `Iterable` of corresponding pairs. * - * @example + * **Example** (Zipping iterables) + * * ```ts * import { Iterable } from "effect" * @@ -1579,7 +1791,8 @@ export declare const zip: { /** * Takes two `Iterable`s and returns an `Iterable` of corresponding pairs. * - * @example + * **Example** (Zipping iterables) + * * ```ts * import { Iterable } from "effect" * @@ -1613,10 +1826,11 @@ export declare const zip: { (self: Iterable, that: Iterable): Iterable<[A, B]>; }; /** - * Apply a function to pairs of elements at the same index in two `Iterable`s, collecting the results. If one + * Applies a function to pairs of elements at the same index in two `Iterable`s, collecting the results. If one * input `Iterable` is short, excess elements of the longer `Iterable` are discarded. * - * @example + * **Example** (Zipping with a combining function) + * * ```ts * import { Iterable } from "effect" * @@ -1660,10 +1874,11 @@ export declare const zip: { */ export declare const zipWith: { /** - * Apply a function to pairs of elements at the same index in two `Iterable`s, collecting the results. If one + * Applies a function to pairs of elements at the same index in two `Iterable`s, collecting the results. If one * input `Iterable` is short, excess elements of the longer `Iterable` are discarded. * - * @example + * **Example** (Zipping with a combining function) + * * ```ts * import { Iterable } from "effect" * @@ -1707,10 +1922,11 @@ export declare const zipWith: { */ (that: Iterable, f: (a: A, b: B) => C): (self: Iterable) => Iterable; /** - * Apply a function to pairs of elements at the same index in two `Iterable`s, collecting the results. If one + * Applies a function to pairs of elements at the same index in two `Iterable`s, collecting the results. If one * input `Iterable` is short, excess elements of the longer `Iterable` are discarded. * - * @example + * **Example** (Zipping with a combining function) + * * ```ts * import { Iterable } from "effect" * @@ -1755,10 +1971,18 @@ export declare const zipWith: { (self: Iterable, that: Iterable, f: (a: A, b: B) => C): Iterable; }; /** - * Places an element in between members of an `Iterable`. + * Places a separator between members of an `Iterable`. + * + * **When to use** + * + * Use to lazily insert a separator between adjacent values. + * + * **Details** + * * If the input is a non-empty array, the result is also a non-empty array. * - * @example + * **Example** (Interspersing separators) + * * ```ts * import { Iterable } from "effect" * @@ -1788,15 +2012,23 @@ export declare const zipWith: { * console.log(Array.from(css).join("")) // "color: red; font-size: 14px; margin: 10px" * ``` * - * @category concatenating + * @category combining * @since 2.0.0 */ export declare const intersperse: { /** - * Places an element in between members of an `Iterable`. + * Places a separator between members of an `Iterable`. + * + * **When to use** + * + * Use to lazily insert a separator between adjacent values. + * + * **Details** + * * If the input is a non-empty array, the result is also a non-empty array. * - * @example + * **Example** (Interspersing separators) + * * ```ts * import { Iterable } from "effect" * @@ -1826,15 +2058,23 @@ export declare const intersperse: { * console.log(Array.from(css).join("")) // "color: red; font-size: 14px; margin: 10px" * ``` * - * @category concatenating + * @category combining * @since 2.0.0 */ (middle: B): (self: Iterable) => Iterable; /** - * Places an element in between members of an `Iterable`. + * Places a separator between members of an `Iterable`. + * + * **When to use** + * + * Use to lazily insert a separator between adjacent values. + * + * **Details** + * * If the input is a non-empty array, the result is also a non-empty array. * - * @example + * **Example** (Interspersing separators) + * * ```ts * import { Iterable } from "effect" * @@ -1864,7 +2104,7 @@ export declare const intersperse: { * console.log(Array.from(css).join("")) // "color: red; font-size: 14px; margin: 10px" * ``` * - * @category concatenating + * @category combining * @since 2.0.0 */ (self: Iterable, middle: B): Iterable; @@ -1872,7 +2112,8 @@ export declare const intersperse: { /** * Returns a function that checks if an `Iterable` contains a given value using a provided `isEquivalent` function. * - * @example + * **Example** (Checking membership with custom equivalence) + * * ```ts * import { Iterable } from "effect" * @@ -1910,9 +2151,16 @@ export declare const containsWith: (isEquivalent: (self: A, that: A) => boole (self: Iterable, a: A): boolean; }; /** - * Returns a function that checks if a `Iterable` contains a given value using the default `Equivalence`. + * Checks whether an iterable contains a value using Effect's default `Equal` + * equivalence. + * + * **Details** + * + * Can be called as `contains(self, value)` or curried as + * `contains(value)(self)`. + * + * **Example** (Checking membership) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1940,9 +2188,16 @@ export declare const containsWith: (isEquivalent: (self: A, that: A) => boole */ export declare const contains: { /** - * Returns a function that checks if a `Iterable` contains a given value using the default `Equivalence`. + * Checks whether an iterable contains a value using Effect's default `Equal` + * equivalence. + * + * **Details** + * + * Can be called as `contains(self, value)` or curried as + * `contains(value)(self)`. + * + * **Example** (Checking membership) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1970,9 +2225,16 @@ export declare const contains: { */ (a: A): (self: Iterable) => boolean; /** - * Returns a function that checks if a `Iterable` contains a given value using the default `Equivalence`. + * Checks whether an iterable contains a value using Effect's default `Equal` + * equivalence. + * + * **Details** + * + * Can be called as `contains(self, value)` or curried as + * `contains(value)(self)`. + * + * **Example** (Checking membership) * - * @example * ```ts * import { Iterable } from "effect" * @@ -2004,7 +2266,8 @@ export declare const contains: { * Splits an `Iterable` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of * the `Iterable`. * - * @example + * **Example** (Chunking an iterable) + * * ```ts * import { Iterable } from "effect" * @@ -2043,7 +2306,8 @@ export declare const chunksOf: { * Splits an `Iterable` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of * the `Iterable`. * - * @example + * **Example** (Chunking an iterable) + * * ```ts * import { Iterable } from "effect" * @@ -2082,7 +2346,8 @@ export declare const chunksOf: { * Splits an `Iterable` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of * the `Iterable`. * - * @example + * **Example** (Chunking an iterable) + * * ```ts * import { Iterable } from "effect" * @@ -2119,9 +2384,10 @@ export declare const chunksOf: { (self: Iterable, n: number): Iterable>; }; /** - * Group equal, consecutive elements of an `Iterable` into `NonEmptyArray`s using the provided `isEquivalent` function. + * Groups equal, consecutive elements of an `Iterable` into `NonEmptyArray`s using the provided `isEquivalent` function. + * + * **Example** (Grouping consecutive elements with custom equivalence) * - * @example * ```ts * import { Iterable } from "effect" * @@ -2158,9 +2424,10 @@ export declare const chunksOf: { */ export declare const groupWith: { /** - * Group equal, consecutive elements of an `Iterable` into `NonEmptyArray`s using the provided `isEquivalent` function. + * Groups equal, consecutive elements of an `Iterable` into `NonEmptyArray`s using the provided `isEquivalent` function. + * + * **Example** (Grouping consecutive elements with custom equivalence) * - * @example * ```ts * import { Iterable } from "effect" * @@ -2197,9 +2464,10 @@ export declare const groupWith: { */ (isEquivalent: (self: A, that: A) => boolean): (self: Iterable) => Iterable>; /** - * Group equal, consecutive elements of an `Iterable` into `NonEmptyArray`s using the provided `isEquivalent` function. + * Groups equal, consecutive elements of an `Iterable` into `NonEmptyArray`s using the provided `isEquivalent` function. + * + * **Example** (Grouping consecutive elements with custom equivalence) * - * @example * ```ts * import { Iterable } from "effect" * @@ -2237,9 +2505,10 @@ export declare const groupWith: { (self: Iterable, isEquivalent: (self: A, that: A) => boolean): Iterable>; }; /** - * Group equal, consecutive elements of an `Iterable` into `NonEmptyArray`s. + * Groups equal, consecutive elements of an `Iterable` into `NonEmptyArray`s. + * + * **Example** (Grouping consecutive elements) * - * @example * ```ts * import { Iterable } from "effect" * @@ -2270,10 +2539,16 @@ export declare const groupWith: { */ export declare const group: (self: Iterable) => Iterable>; /** - * Splits an `Iterable` into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning - * function on each element, and grouping the results according to values returned + * Groups all elements by the string or symbol key returned by `f`. + * + * **Details** + * + * Each property in the returned record contains a non-empty array of elements + * that produced that key. Unlike `group`, matching elements do not need to be + * consecutive. + * + * **Example** (Grouping by a key) * - * @example * ```ts * import { Iterable } from "effect" * @@ -2315,10 +2590,16 @@ export declare const group: (self: Iterable) => Iterable> */ export declare const groupBy: { /** - * Splits an `Iterable` into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning - * function on each element, and grouping the results according to values returned + * Groups all elements by the string or symbol key returned by `f`. + * + * **Details** + * + * Each property in the returned record contains a non-empty array of elements + * that produced that key. Unlike `group`, matching elements do not need to be + * consecutive. + * + * **Example** (Grouping by a key) * - * @example * ```ts * import { Iterable } from "effect" * @@ -2360,10 +2641,16 @@ export declare const groupBy: { */ (f: (a: A) => K): (self: Iterable) => Record, NonEmptyArray>; /** - * Splits an `Iterable` into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning - * function on each element, and grouping the results according to values returned + * Groups all elements by the string or symbol key returned by `f`. + * + * **Details** + * + * Each property in the returned record contains a non-empty array of elements + * that produced that key. Unlike `group`, matching elements do not need to be + * consecutive. + * + * **Example** (Grouping by a key) * - * @example * ```ts * import { Iterable } from "effect" * @@ -2408,10 +2695,13 @@ export declare const groupBy: { /** * Creates an empty iterable that yields no elements. * - * This function returns a reusable empty iterable that can be used as a base case - * for operations or when you need to represent "no data" in a type-safe way. + * **When to use** + * + * Use when you need an empty iterable as a typed "no data" value or a base + * case for iterable operations. + * + * **Example** (Creating an empty iterable) * - * @example * ```ts * import { Iterable } from "effect" * @@ -2433,12 +2723,13 @@ export declare const empty: () => Iterable; /** * Creates an iterable containing a single element. * - * This is useful for wrapping a single value in an iterable context, - * allowing it to be used with other iterable operations. + * **When to use** * - * @param a - The single element to wrap in an iterable + * Use to wrap a single value in an iterable context so it can be combined + * with other iterable operations. + * + * **Example** (Wrapping a single value) * - * @example * ```ts * import { Iterable } from "effect" * @@ -2468,15 +2759,15 @@ export declare const of: (a: A) => Iterable; /** * Transforms each element of an iterable using a function. * + * **Details** + * * This is one of the most fundamental operations for working with iterables. * It applies a transformation function to each element, creating a new iterable - * with the transformed values. The operation is lazy - elements are only + * with the transformed values. The operation is lazy, so elements are only * transformed when the iterable is consumed. * - * @param self - The source iterable to transform - * @param f - Function that transforms each element (receives value and index) + * **Example** (Mapping elements) * - * @example * ```ts * import { Iterable } from "effect" * @@ -2504,15 +2795,15 @@ export declare const map: { /** * Transforms each element of an iterable using a function. * + * **Details** + * * This is one of the most fundamental operations for working with iterables. * It applies a transformation function to each element, creating a new iterable - * with the transformed values. The operation is lazy - elements are only + * with the transformed values. The operation is lazy, so elements are only * transformed when the iterable is consumed. * - * @param self - The source iterable to transform - * @param f - Function that transforms each element (receives value and index) + * **Example** (Mapping elements) * - * @example * ```ts * import { Iterable } from "effect" * @@ -2540,15 +2831,15 @@ export declare const map: { /** * Transforms each element of an iterable using a function. * + * **Details** + * * This is one of the most fundamental operations for working with iterables. * It applies a transformation function to each element, creating a new iterable - * with the transformed values. The operation is lazy - elements are only + * with the transformed values. The operation is lazy, so elements are only * transformed when the iterable is consumed. * - * @param self - The source iterable to transform - * @param f - Function that transforms each element (receives value and index) + * **Example** (Mapping elements) * - * @example * ```ts * import { Iterable } from "effect" * @@ -2577,7 +2868,8 @@ export declare const map: { /** * Applies a function to each element in an Iterable and returns a new Iterable containing the concatenated mapped elements. * - * @example + * **Example** (FlatMapping iterables) + * * ```ts * import { Iterable } from "effect" * @@ -2615,7 +2907,8 @@ export declare const flatMap: { /** * Applies a function to each element in an Iterable and returns a new Iterable containing the concatenated mapped elements. * - * @example + * **Example** (FlatMapping iterables) + * * ```ts * import { Iterable } from "effect" * @@ -2653,7 +2946,8 @@ export declare const flatMap: { /** * Applies a function to each element in an Iterable and returns a new Iterable containing the concatenated mapped elements. * - * @example + * **Example** (FlatMapping iterables) + * * ```ts * import { Iterable } from "effect" * @@ -2692,7 +2986,8 @@ export declare const flatMap: { /** * Flattens an Iterable of Iterables into a single Iterable * - * @example + * **Example** (Flattening nested iterables) + * * ```ts * import { Iterable } from "effect" * @@ -2725,13 +3020,16 @@ export declare const flatten: (self: Iterable>) => Iterable; /** * Transforms elements of an iterable using a function that returns a `Result`, keeping only successful values. * - * This combines mapping and filtering in a single operation - the function is applied to each element, - * and only elements that result in `Result.succeed` are included in the result. + * **Details** + * + * This combines mapping and filtering in a single operation. The function is + * applied to each element, and only elements that result in `Result.succeed` + * are included in the result. + * + * **Example** (Filtering and transforming Result values) * - * @example * ```ts - * import { Iterable } from "effect" - * import * as Result from "effect/Result" + * import { Iterable, Result } from "effect" * * // Parse strings to numbers, keeping only valid ones * const strings = ["1", "2", "invalid", "4", "not-a-number"] @@ -2771,13 +3069,16 @@ export declare const filterMap: { /** * Transforms elements of an iterable using a function that returns a `Result`, keeping only successful values. * - * This combines mapping and filtering in a single operation - the function is applied to each element, - * and only elements that result in `Result.succeed` are included in the result. + * **Details** + * + * This combines mapping and filtering in a single operation. The function is + * applied to each element, and only elements that result in `Result.succeed` + * are included in the result. + * + * **Example** (Filtering and transforming Result values) * - * @example * ```ts - * import { Iterable } from "effect" - * import * as Result from "effect/Result" + * import { Iterable, Result } from "effect" * * // Parse strings to numbers, keeping only valid ones * const strings = ["1", "2", "invalid", "4", "not-a-number"] @@ -2817,13 +3118,16 @@ export declare const filterMap: { /** * Transforms elements of an iterable using a function that returns a `Result`, keeping only successful values. * - * This combines mapping and filtering in a single operation - the function is applied to each element, - * and only elements that result in `Result.succeed` are included in the result. + * **Details** + * + * This combines mapping and filtering in a single operation. The function is + * applied to each element, and only elements that result in `Result.succeed` + * are included in the result. + * + * **Example** (Filtering and transforming Result values) * - * @example * ```ts - * import { Iterable } from "effect" - * import * as Result from "effect/Result" + * import { Iterable, Result } from "effect" * * // Parse strings to numbers, keeping only valid ones * const strings = ["1", "2", "invalid", "4", "not-a-number"] @@ -2864,10 +3168,10 @@ export declare const filterMap: { /** * Transforms all elements of the `Iterable` for as long as the specified function succeeds. * - * @example + * **Example** (Filtering and transforming until failure) + * * ```ts - * import { Iterable } from "effect" - * import * as Result from "effect/Result" + * import { Iterable, Result } from "effect" * * // Parse numbers until we hit an invalid one * const strings = ["1", "2", "3", "invalid", "4", "5"] @@ -2901,10 +3205,10 @@ export declare const filterMapWhile: { /** * Transforms all elements of the `Iterable` for as long as the specified function succeeds. * - * @example + * **Example** (Filtering and transforming until failure) + * * ```ts - * import { Iterable } from "effect" - * import * as Result from "effect/Result" + * import { Iterable, Result } from "effect" * * // Parse numbers until we hit an invalid one * const strings = ["1", "2", "3", "invalid", "4", "5"] @@ -2938,10 +3242,10 @@ export declare const filterMapWhile: { /** * Transforms all elements of the `Iterable` for as long as the specified function succeeds. * - * @example + * **Example** (Filtering and transforming until failure) + * * ```ts - * import { Iterable } from "effect" - * import * as Result from "effect/Result" + * import { Iterable, Result } from "effect" * * // Parse numbers until we hit an invalid one * const strings = ["1", "2", "3", "invalid", "4", "5"] @@ -2976,10 +3280,10 @@ export declare const filterMapWhile: { /** * Retrieves the `Some` values from an `Iterable` of `Option`s. * - * @example + * **Example** (Extracting Some values) + * * ```ts - * import { Iterable } from "effect" - * import * as Option from "effect/Option" + * import { Iterable, Option } from "effect" * import * as assert from "node:assert" * * assert.deepStrictEqual( @@ -2995,12 +3299,13 @@ export declare const filterMapWhile: { */ export declare const getSomes: (self: Iterable>) => Iterable; /** - * Retrieves the `Err` values from an `Iterable` of `Result`s. + * Returns a lazy iterable containing the failure values from an iterable of + * `Result`s, skipping successful results. + * + * **Example** (Extracting failures) * - * @example * ```ts - * import { Iterable } from "effect" - * import * as Result from "effect/Result" + * import { Iterable, Result } from "effect" * import * as assert from "node:assert" * * assert.deepStrictEqual( @@ -3016,16 +3321,17 @@ export declare const getSomes: (self: Iterable>) => Iterable; * ``` * * @category filtering - * @since 2.0.0 + * @since 4.0.0 */ export declare const getFailures: (self: Iterable>) => Iterable; /** - * Retrieves the `Ok` values from an `Iterable` of `Result`s. + * Returns a lazy iterable containing the success values from an iterable of + * `Result`s, skipping failed results. + * + * **Example** (Extracting successes) * - * @example * ```ts - * import { Iterable } from "effect" - * import * as Result from "effect/Result" + * import { Iterable, Result } from "effect" * import * as assert from "node:assert" * * assert.deepStrictEqual( @@ -3041,20 +3347,20 @@ export declare const getFailures: (self: Iterable>) => Iter * ``` * * @category filtering - * @since 2.0.0 + * @since 4.0.0 */ export declare const getSuccesses: (self: Iterable>) => Iterable; /** * Filters an iterable to only include elements that match a predicate. * + * **Details** + * * This function creates a new iterable containing only the elements for which * the predicate function returns true. Like map, this operation is lazy and * elements are only tested when the iterable is consumed. * - * @param self - The source iterable to filter - * @param predicate - Function that tests each element (receives value and index) + * **Example** (Filtering elements) * - * @example * ```ts * import { Iterable } from "effect" * @@ -3091,14 +3397,14 @@ export declare const filter: { /** * Filters an iterable to only include elements that match a predicate. * + * **Details** + * * This function creates a new iterable containing only the elements for which * the predicate function returns true. Like map, this operation is lazy and * elements are only tested when the iterable is consumed. * - * @param self - The source iterable to filter - * @param predicate - Function that tests each element (receives value and index) + * **Example** (Filtering elements) * - * @example * ```ts * import { Iterable } from "effect" * @@ -3135,14 +3441,14 @@ export declare const filter: { /** * Filters an iterable to only include elements that match a predicate. * + * **Details** + * * This function creates a new iterable containing only the elements for which * the predicate function returns true. Like map, this operation is lazy and * elements are only tested when the iterable is consumed. * - * @param self - The source iterable to filter - * @param predicate - Function that tests each element (receives value and index) + * **Example** (Filtering elements) * - * @example * ```ts * import { Iterable } from "effect" * @@ -3179,14 +3485,14 @@ export declare const filter: { /** * Filters an iterable to only include elements that match a predicate. * + * **Details** + * * This function creates a new iterable containing only the elements for which * the predicate function returns true. Like map, this operation is lazy and * elements are only tested when the iterable is consumed. * - * @param self - The source iterable to filter - * @param predicate - Function that tests each element (receives value and index) + * **Example** (Filtering elements) * - * @example * ```ts * import { Iterable } from "effect" * @@ -3223,14 +3529,14 @@ export declare const filter: { /** * Filters an iterable to only include elements that match a predicate. * + * **Details** + * * This function creates a new iterable containing only the elements for which * the predicate function returns true. Like map, this operation is lazy and * elements are only tested when the iterable is consumed. * - * @param self - The source iterable to filter - * @param predicate - Function that tests each element (receives value and index) + * **Example** (Filtering elements) * - * @example * ```ts * import { Iterable } from "effect" * @@ -3268,10 +3574,13 @@ export declare const filter: { /** * Transforms elements using a function that may return null or undefined, filtering out the null/undefined results. * - * This is useful when working with APIs or functions that return nullable values, - * providing a clean way to filter out null/undefined while transforming. + * **When to use** + * + * Use when working with APIs or functions that return nullable values, + * providing a clean way to filter out null or undefined while transforming. + * + * **Example** (FlatMapping nullable results) * - * @example * ```ts * import { Iterable } from "effect" * @@ -3305,16 +3614,19 @@ export declare const filter: { * ``` * * @category sequencing - * @since 2.0.0 + * @since 4.0.0 */ export declare const flatMapNullishOr: { /** * Transforms elements using a function that may return null or undefined, filtering out the null/undefined results. * - * This is useful when working with APIs or functions that return nullable values, - * providing a clean way to filter out null/undefined while transforming. + * **When to use** + * + * Use when working with APIs or functions that return nullable values, + * providing a clean way to filter out null or undefined while transforming. + * + * **Example** (FlatMapping nullable results) * - * @example * ```ts * import { Iterable } from "effect" * @@ -3348,16 +3660,19 @@ export declare const flatMapNullishOr: { * ``` * * @category sequencing - * @since 2.0.0 + * @since 4.0.0 */ (f: (a: A) => B): (self: Iterable) => Iterable>; /** * Transforms elements using a function that may return null or undefined, filtering out the null/undefined results. * - * This is useful when working with APIs or functions that return nullable values, - * providing a clean way to filter out null/undefined while transforming. + * **When to use** + * + * Use when working with APIs or functions that return nullable values, + * providing a clean way to filter out null or undefined while transforming. + * + * **Example** (FlatMapping nullable results) * - * @example * ```ts * import { Iterable } from "effect" * @@ -3391,14 +3706,15 @@ export declare const flatMapNullishOr: { * ``` * * @category sequencing - * @since 2.0.0 + * @since 4.0.0 */ (self: Iterable, f: (a: A) => B): Iterable>; }; /** - * Check if a predicate holds true for some `Iterable` element. + * Checks whether a predicate holds true for some `Iterable` element. + * + * **Example** (Checking whether some element matches) * - * @example * ```ts * import { Iterable } from "effect" * @@ -3437,9 +3753,10 @@ export declare const flatMapNullishOr: { */ export declare const some: { /** - * Check if a predicate holds true for some `Iterable` element. + * Checks whether a predicate holds true for some `Iterable` element. + * + * **Example** (Checking whether some element matches) * - * @example * ```ts * import { Iterable } from "effect" * @@ -3478,9 +3795,10 @@ export declare const some: { */ (predicate: (a: A, i: number) => boolean): (self: Iterable) => boolean; /** - * Check if a predicate holds true for some `Iterable` element. + * Checks whether a predicate holds true for some `Iterable` element. + * + * **Example** (Checking whether some element matches) * - * @example * ```ts * import { Iterable } from "effect" * @@ -3523,11 +3841,14 @@ export declare const some: { * Generates an iterable by repeatedly applying a function that produces the * next element and state. * + * **Details** + * * This is useful for creating iterables from a generating function that * maintains state. The function should return `Option.some([value, nextState])` * to continue or `Option.none()` to stop. * - * @example + * **Example** (Unfolding state into values) + * * ```ts * import { Iterable, Option } from "effect" * @@ -3558,9 +3879,10 @@ export declare const some: { */ export declare const unfold: (b: B, f: (b: B) => Option) => Iterable; /** - * Iterate over the `Iterable` applying `f`. + * Iterates over the `Iterable`, applying `f` to each element. + * + * **Example** (Iterating with side effects) * - * @example * ```ts * import { Iterable } from "effect" * @@ -3596,9 +3918,10 @@ export declare const unfold: (b: B, f: (b: B) => Option) */ export declare const forEach: { /** - * Iterate over the `Iterable` applying `f`. + * Iterates over the `Iterable`, applying `f` to each element. + * + * **Example** (Iterating with side effects) * - * @example * ```ts * import { Iterable } from "effect" * @@ -3634,9 +3957,10 @@ export declare const forEach: { */ (f: (a: A, i: number) => void): (self: Iterable) => void; /** - * Iterate over the `Iterable` applying `f`. + * Iterates over the `Iterable`, applying `f` to each element. + * + * **Example** (Iterating with side effects) * - * @example * ```ts * import { Iterable } from "effect" * @@ -3673,12 +3997,15 @@ export declare const forEach: { (self: Iterable, f: (a: A, i: number) => void): void; }; /** - * Reduce an iterable to a single value by applying a function to each element and accumulating the result. + * Reduces an iterable to a single value by applying a function to each element and accumulating the result. + * + * **Details** * * This function applies a reducing function against an accumulator and each element * of the iterable (from left to right) to reduce it to a single value. * - * @example + * **Example** (Reducing an iterable) + * * ```ts * import { Iterable } from "effect" * @@ -3722,12 +4049,15 @@ export declare const forEach: { */ export declare const reduce: { /** - * Reduce an iterable to a single value by applying a function to each element and accumulating the result. + * Reduces an iterable to a single value by applying a function to each element and accumulating the result. + * + * **Details** * * This function applies a reducing function against an accumulator and each element * of the iterable (from left to right) to reduce it to a single value. * - * @example + * **Example** (Reducing an iterable) + * * ```ts * import { Iterable } from "effect" * @@ -3771,12 +4101,15 @@ export declare const reduce: { */ (b: B, f: (b: B, a: A, i: number) => B): (self: Iterable) => B; /** - * Reduce an iterable to a single value by applying a function to each element and accumulating the result. + * Reduces an iterable to a single value by applying a function to each element and accumulating the result. + * + * **Details** * * This function applies a reducing function against an accumulator and each element * of the iterable (from left to right) to reduce it to a single value. * - * @example + * **Example** (Reducing an iterable) + * * ```ts * import { Iterable } from "effect" * @@ -3823,7 +4156,8 @@ export declare const reduce: { /** * Deduplicates adjacent elements that are identical using the provided `isEquivalent` function. * - * @example + * **Example** (Deduplicating adjacent elements with custom equivalence) + * * ```ts * import { Iterable } from "effect" * @@ -3865,7 +4199,8 @@ export declare const dedupeAdjacentWith: { /** * Deduplicates adjacent elements that are identical using the provided `isEquivalent` function. * - * @example + * **Example** (Deduplicating adjacent elements with custom equivalence) + * * ```ts * import { Iterable } from "effect" * @@ -3907,7 +4242,8 @@ export declare const dedupeAdjacentWith: { /** * Deduplicates adjacent elements that are identical using the provided `isEquivalent` function. * - * @example + * **Example** (Deduplicating adjacent elements with custom equivalence) + * * ```ts * import { Iterable } from "effect" * @@ -3950,7 +4286,8 @@ export declare const dedupeAdjacentWith: { /** * Deduplicates adjacent elements that are identical. * - * @example + * **Example** (Deduplicating adjacent elements) + * * ```ts * import { Iterable } from "effect" * @@ -3988,7 +4325,8 @@ export declare const dedupeAdjacent: (self: Iterable) => Iterable; /** * Zips this Iterable crosswise with the specified Iterable using the specified combiner. * - * @example + * **Example** (Combining cartesian products) + * * ```ts * import { Iterable } from "effect" * @@ -4031,14 +4369,15 @@ export declare const dedupeAdjacent: (self: Iterable) => Iterable; * // ["admin_can_read", "admin_can_write", "admin_can_delete", "user_can_read", "user_can_write", "user_can_delete"] * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export declare const cartesianWith: { /** * Zips this Iterable crosswise with the specified Iterable using the specified combiner. * - * @example + * **Example** (Combining cartesian products) + * * ```ts * import { Iterable } from "effect" * @@ -4081,14 +4420,15 @@ export declare const cartesianWith: { * // ["admin_can_read", "admin_can_write", "admin_can_delete", "user_can_read", "user_can_write", "user_can_delete"] * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (that: Iterable, f: (a: A, b: B) => C): (self: Iterable) => Iterable; /** * Zips this Iterable crosswise with the specified Iterable using the specified combiner. * - * @example + * **Example** (Combining cartesian products) + * * ```ts * import { Iterable } from "effect" * @@ -4131,15 +4471,16 @@ export declare const cartesianWith: { * // ["admin_can_read", "admin_can_write", "admin_can_delete", "user_can_read", "user_can_write", "user_can_delete"] * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (self: Iterable, that: Iterable, f: (a: A, b: B) => C): Iterable; }; /** * Zips this Iterable crosswise with the specified Iterable. * - * @example + * **Example** (Generating cartesian pairs) + * * ```ts * import { Iterable } from "effect" * @@ -4173,14 +4514,15 @@ export declare const cartesianWith: { * console.log(Array.from(withEmpty)) // [] * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export declare const cartesian: { /** * Zips this Iterable crosswise with the specified Iterable. * - * @example + * **Example** (Generating cartesian pairs) + * * ```ts * import { Iterable } from "effect" * @@ -4214,14 +4556,15 @@ export declare const cartesian: { * console.log(Array.from(withEmpty)) // [] * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (that: Iterable): (self: Iterable) => Iterable<[A, B]>; /** * Zips this Iterable crosswise with the specified Iterable. * - * @example + * **Example** (Generating cartesian pairs) + * * ```ts * import { Iterable } from "effect" * @@ -4255,15 +4598,15 @@ export declare const cartesian: { * console.log(Array.from(withEmpty)) // [] * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ (self: Iterable, that: Iterable): Iterable<[A, B]>; }; /** - * Counts all the element of the given iterable that pass the given predicate + * Computes how many elements of the iterable pass the given predicate. * - * **Example** + * **Example** (Counting matching elements) * * ```ts * import { Iterable } from "effect" @@ -4277,9 +4620,9 @@ export declare const cartesian: { */ export declare const countBy: { /** - * Counts all the element of the given iterable that pass the given predicate + * Computes how many elements of the iterable pass the given predicate. * - * **Example** + * **Example** (Counting matching elements) * * ```ts * import { Iterable } from "effect" @@ -4293,9 +4636,9 @@ export declare const countBy: { */ (predicate: (a: NoInfer, i: number) => boolean): (self: Iterable) => number; /** - * Counts all the element of the given iterable that pass the given predicate + * Computes how many elements of the iterable pass the given predicate. * - * **Example** + * **Example** (Counting matching elements) * * ```ts * import { Iterable } from "effect" diff --git a/.opencode/node_modules/effect/dist/Iterable.d.ts.map b/.opencode/node_modules/effect/dist/Iterable.d.ts.map index 3d72e5f8b1ed26c99c5931b0b90dec4e220375b7..be6220dba4cfe9a4f962d595165196e9e4478a0d 100644 --- a/.opencode/node_modules/effect/dist/Iterable.d.ts.map +++ b/.opencode/node_modules/effect/dist/Iterable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Iterable.d.ts","sourceRoot":"","sources":["../src/Iterable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGzC,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;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,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,MAAM,CAAA;IACpF;;;;;;;;;;;;;;OAcG;IACH,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM,CAAA;CAiBxE,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Iterable.js b/.opencode/node_modules/effect/dist/Iterable.js index f9cf02e3413f45f879a75174de91e1570a6953fb..a45333a12ee863bc8dc5075636cd21767c27bf65 100644 --- a/.opencode/node_modules/effect/dist/Iterable.js +++ b/.opencode/node_modules/effect/dist/Iterable.js @@ -1,31 +1,10 @@ /** - * This module provides utility functions for working with Iterables in TypeScript. + * Works with JavaScript values that implement `[Symbol.iterator]`. * - * Iterables are objects that implement the iterator protocol, allowing them to be - * consumed with `for...of` loops, spread syntax, and other iteration constructs. - * This module provides a comprehensive set of functions for creating, transforming, - * and working with iterables in a functional programming style. - * - * Unlike arrays, iterables can be lazy and potentially infinite, making them suitable - * for stream processing and memory-efficient data manipulation. All functions in this - * module preserve the lazy nature of iterables where possible. - * - * @example - * ```ts - * import { Iterable, Option } from "effect" - * - * // Create iterables - * const numbers = Iterable.range(1, 5) - * const doubled = Iterable.map(numbers, (x) => x * 2) - * const filtered = Iterable.filter(doubled, (x) => x > 5) - * - * console.log(Array.from(filtered)) // [6, 8, 10] - * - * // Infinite iterables - * const fibonacci = Iterable.unfold([0, 1], ([a, b]) => Option.some([a, [b, a + b]])) - * const first10 = Iterable.take(fibonacci, 10) - * console.log(Array.from(first10)) // [0, 1, 1, 2, 3, 5, 8, 13, 21, 34] - * ``` + * Iterables include arrays, strings, generators, sets, and custom lazy + * sequences. The helpers in this module let code transform, search, group, and + * fold iterable values while preserving the input as an iterable instead of + * forcing an array first. * * @since 2.0.0 */ @@ -38,14 +17,14 @@ import * as Tuple from "./Tuple.js"; /** * Creates an iterable by applying a function to consecutive integers. * - * This is a fundamental constructor that generates iterables by calling a function - * with each index starting from 0. If no length is specified, the iterable will - * be infinite. This is useful for generating sequences, patterns, or any indexed data. + * **Details** + * + * The function is called with each index starting from `0`. If no length is + * specified, the iterable is infinite. This is useful for generating + * sequences, patterns, or any indexed data. * - * @param f - Function that receives the index and returns the element - * @param options - Configuration object with optional length + * **Example** (Generating values by index) * - * @example * ```ts * import { Iterable } from "effect" * @@ -89,16 +68,21 @@ export const makeBy = (f, options) => { }; }; /** - * Return a `Iterable` containing a range of integers, including both endpoints. + * Returns an iterable of integers starting at `start` and increasing by `1`. + * + * **Details** + * + * When `end` is provided and `start <= end`, both endpoints are included. When + * `end` is omitted, the iterable is unbounded. When `start > end`, the + * iterable contains only `start`. * - * If `end` is omitted, the range will not have an upper bound. + * **Example** (Creating a range) * - * @example * ```ts - * import { range } from "effect/Iterable" + * import { Iterable } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(Array.from(range(1, 3)), [1, 2, 3]) + * assert.deepStrictEqual(Array.from(Iterable.range(1, 3)), [1, 2, 3]) * ``` * * @category constructors @@ -113,16 +97,19 @@ export const range = (start, end) => { }); }; /** - * Return a `Iterable` containing a value repeated the specified number of times. + * Returns a `Iterable` containing a value repeated the specified number of times. + * + * **Details** * - * **Note**. `n` is normalized to an integer >= 1. + * `n` is normalized to an integer greater than or equal to `1`. + * + * **Example** (Repeating a value) * - * @example * ```ts - * import { replicate } from "effect/Iterable" + * import { Iterable } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(Array.from(replicate("a", 3)), ["a", "a", "a"]) + * assert.deepStrictEqual(Array.from(Iterable.replicate("a", 3)), ["a", "a", "a"]) * ``` * * @category constructors @@ -132,6 +119,19 @@ export const replicate = /*#__PURE__*/dual(2, (a, n) => makeBy(() => a, { length: n })); /** + * Repeats an iterable `n` times, yielding the full contents of `self` for each + * repetition. + * + * **When to use** + * + * Use to repeat an iterable's contents a specific number of times. + * + * **Details** + * + * The result is lazy. Each repetition obtains a new iterator from `self`. + * + * @see {@link forever} for repeating without an upper bound + * @see {@link replicate} for repeating a single value * @category constructors * @since 4.0.0 */ @@ -139,6 +139,21 @@ export const repeat = /*#__PURE__*/dual(2, (self, n) => flatten(makeBy(() => sel length: n }))); /** + * Repeats an iterable without an upper bound. + * + * **When to use** + * + * Use to cycle a reusable iterable without an upper bound when a downstream + * consumer controls how many values are taken. + * + * **Gotchas** + * + * The returned iterable is lazy and should usually be bounded with `take` or + * another terminating consumer before materializing it. + * + * @see {@link repeat} for repeating an iterable a specific number of times + * @see {@link take} for bounding the unbounded result before materializing it + * * @category constructors * @since 4.0.0 */ @@ -146,19 +161,20 @@ export const forever = self => repeat(self, Infinity); /** * Takes a record and returns an Iterable of tuples containing its keys and values. * - * @example + * **Example** (Converting a record to entries) + * * ```ts - * import { fromRecord } from "effect/Iterable" + * import { Iterable } from "effect" * import * as assert from "node:assert" * * const x = { a: 1, b: 2, c: 3 } - * assert.deepStrictEqual(Array.from(fromRecord(x)), [["a", 1], ["b", 2], [ + * assert.deepStrictEqual(Array.from(Iterable.fromRecord(x)), [["a", 1], ["b", 2], [ * "c", * 3 * ]]) * ``` * - * @category conversions + * @category converting * @since 2.0.0 */ export const fromRecord = self => ({ @@ -171,9 +187,10 @@ export const fromRecord = self => ({ } }); /** - * Prepend an element to the front of an `Iterable`, creating a new `Iterable`. + * Prepends an element to the front of an `Iterable`, creating a new `Iterable`. + * + * **Example** (Prepending an element) * - * @example * ```ts * import { Iterable } from "effect" * @@ -187,14 +204,15 @@ export const fromRecord = self => ({ * console.log(Array.from(withZ)) // ["z", "a", "b", "c"] * ``` * - * @category concatenating + * @category combining * @since 2.0.0 */ export const prepend = /*#__PURE__*/dual(2, (self, head) => prependAll(self, [head])); /** * Prepends the specified prefix iterable to the beginning of the specified iterable. * - * @example + * **Example** (Prepending another iterable) + * * ```ts * import { Iterable } from "effect" * import * as assert from "node:assert" @@ -205,14 +223,30 @@ export const prepend = /*#__PURE__*/dual(2, (self, head) => prependAll(self, [he * ) * ``` * - * @category concatenating + * @category combining * @since 2.0.0 */ export const prependAll = /*#__PURE__*/dual(2, (self, that) => appendAll(that, self)); /** - * Append an element to the end of an `Iterable`, creating a new `Iterable`. + * Appends an element to the end of an `Iterable`, creating a new `Iterable`. + * + * **When to use** + * + * Use to add one element after all elements of an iterable while keeping the + * result as a lazy `Iterable`. + * + * **Details** + * + * The result yields every element from `self` first, then yields `last` after + * `self` is exhausted. + * + * **Gotchas** + * + * If `self` is infinite or never completes, the appended element is never + * reached. + * + * **Example** (Appending an element) * - * @example * ```ts * import { Iterable } from "effect" * @@ -228,14 +262,32 @@ export const prependAll = /*#__PURE__*/dual(2, (self, that) => appendAll(that, s * console.log(Array.from(result)) // [1, 2, 3, 4] * ``` * - * @category concatenating + * @see {@link prepend} for adding one element before the existing elements + * @see {@link appendAll} for appending all elements from another iterable + * + * @category combining * @since 2.0.0 */ export const append = /*#__PURE__*/dual(2, (self, last) => appendAll(self, [last])); /** * Concatenates two iterables, combining their elements. * - * @example + * **When to use** + * + * Use to lazily concatenate two iterables while preserving order, yielding all + * elements from `self` before `that`. + * + * **Details** + * + * The result is lazy. The iterator for `that` is not created or read until + * `self` is exhausted. + * + * **Gotchas** + * + * If `self` is infinite or never completes, `that` is never reached. + * + * **Example** (Concatenating iterables) + * * ```ts * import { Iterable } from "effect" * @@ -257,7 +309,10 @@ export const append = /*#__PURE__*/dual(2, (self, last) => appendAll(self, [last * console.log(Array.from(result)) // [0, -1, -2, 1, 2] * ``` * - * @category concatenating + * @see {@link append} for appending one value instead of another iterable + * @see {@link prependAll} for yielding another iterable before `self` + * + * @category combining * @since 2.0.0 */ export const appendAll = /*#__PURE__*/dual(2, (self, that) => ({ @@ -282,9 +337,10 @@ export const appendAll = /*#__PURE__*/dual(2, (self, that) => ({ } })); /** - * Reduce an `Iterable` from the left, keeping all intermediate results instead of only the final result. + * Reduces an `Iterable` from the left, keeping all intermediate results instead of only the final result. + * + * **Example** (Tracking running results) * - * @example * ```ts * import { Iterable } from "effect" * @@ -335,15 +391,16 @@ export const scan = /*#__PURE__*/dual(3, (self, b, f) => ({ } })); /** - * Determine if an `Iterable` is empty + * Checks whether an `Iterable` is empty. + * + * **Example** (Checking for emptiness) * - * @example * ```ts - * import { isEmpty } from "effect/Iterable" + * import { Iterable } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isEmpty([]), true) - * assert.deepStrictEqual(isEmpty([1, 2, 3]), false) + * assert.deepStrictEqual(Iterable.isEmpty([]), true) + * assert.deepStrictEqual(Iterable.isEmpty([1, 2, 3]), false) * ``` * * @category guards @@ -354,9 +411,10 @@ export const isEmpty = self => { return iterator.next().done === true; }; /** - * Return the number of elements in a `Iterable`. + * Returns the number of elements in a `Iterable`. + * + * **Example** (Counting iterable elements) * - * @example * ```ts * import { Iterable } from "effect" * @@ -387,12 +445,12 @@ export const size = self => { return count; }; /** - * Get the first element of a `Iterable`, or `None` if the `Iterable` is empty. + * Gets the first element of a `Iterable` safely, or `None` if the `Iterable` is empty. + * + * **Example** (Getting the first element) * - * @example * ```ts - * import { Iterable } from "effect" - * import * as Option from "effect/Option" + * import { Iterable, Option } from "effect" * * const numbers = [1, 2, 3] * console.log(Iterable.head(numbers)) // Option.some(1) @@ -420,9 +478,19 @@ export const head = self => { return result.done ? O.none() : O.some(result.value); }; /** - * Get the first element of a `Iterable`, or throw an error if the `Iterable` is empty. + * Gets the first element of an `Iterable` without returning an `Option`. + * + * **When to use** + * + * Use when the `Iterable` is known to be non-empty and direct access to the + * first element is preferred over handling `Option.none`. + * + * **Gotchas** + * + * Throws if the `Iterable` is empty. + * + * **Example** (Getting the first element unsafely) * - * @example * ```ts * import { Iterable } from "effect" * @@ -432,13 +500,8 @@ export const head = self => { * const letters = "hello" * console.log(Iterable.headUnsafe(letters)) // "h" * - * // This will throw an error! - * try { - * const empty = Iterable.empty() - * Iterable.headUnsafe(empty) // throws Error: "headUnsafe: empty iterable" - * } catch (error) { - * console.log((error as Error).message) // "headUnsafe: empty iterable" - * } + * // Iterable.headUnsafe(Iterable.empty()) + * // throws Error: "headUnsafe: empty iterable" * * // Use only when you're certain the iterable is non-empty * const nonEmpty = Iterable.range(1, 10) @@ -446,7 +509,7 @@ export const head = self => { * ``` * * @category getters - * @since 3.3.0 + * @since 4.0.0 */ export const headUnsafe = self => { const iterator = self[Symbol.iterator](); @@ -455,11 +518,14 @@ export const headUnsafe = self => { return result.value; }; /** - * Keep only a max number of elements from the start of an `Iterable`, creating a new `Iterable`. + * Keeps only a max number of elements from the start of an `Iterable`, creating a new `Iterable`. * - * **Note**. `n` is normalized to a non negative integer. + * **Details** + * + * `n` is normalized to a non-negative integer. + * + * **Example** (Taking from the start) * - * @example * ```ts * import { Iterable } from "effect" * @@ -503,9 +569,11 @@ export const take = /*#__PURE__*/dual(2, (self, n) => ({ } })); /** - * Calculate the longest initial Iterable for which all element satisfy the specified predicate, creating a new `Iterable`. + * Takes the longest initial `Iterable` prefix for which all elements satisfy the + * specified predicate. + * + * **Example** (Taking while a predicate holds) * - * @example * ```ts * import { Iterable } from "effect" * @@ -554,11 +622,14 @@ export const takeWhile = /*#__PURE__*/dual(2, (self, predicate) => ({ } })); /** - * Drop a max number of elements from the start of an `Iterable` + * Drops a max number of elements from the start of an `Iterable` + * + * **Details** * - * **Note**. `n` is normalized to a non negative integer. + * `n` is normalized to a non-negative integer. + * + * **Example** (Dropping from the start) * - * @example * ```ts * import { Iterable } from "effect" * @@ -607,10 +678,10 @@ export const drop = /*#__PURE__*/dual(2, (self, n) => ({ * Returns the first element that satisfies the specified * predicate, or `None` if no such element exists. * - * @example + * **Example** (Finding the first match) + * * ```ts - * import { Iterable } from "effect" - * import * as Option from "effect/Option" + * import { Iterable, Option } from "effect" * * const numbers = [1, 3, 4, 6, 8] * const firstEven = Iterable.findFirst(numbers, (x) => x % 2 === 0) @@ -661,9 +732,10 @@ export const findFirst = /*#__PURE__*/dual(2, (self, f) => { return O.none(); }); /** - * Find the last element for which a predicate holds. + * Finds the last element for which a predicate holds. + * + * **Example** (Finding the last match) * - * @example * ```ts * import { Iterable } from "effect" * @@ -712,7 +784,8 @@ export const findLast = /*#__PURE__*/dual(2, (self, f) => { /** * Takes two `Iterable`s and returns an `Iterable` of corresponding pairs. * - * @example + * **Example** (Zipping iterables) + * * ```ts * import { Iterable } from "effect" * @@ -745,10 +818,11 @@ export const findLast = /*#__PURE__*/dual(2, (self, f) => { */ export const zip = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, Tuple.make)); /** - * Apply a function to pairs of elements at the same index in two `Iterable`s, collecting the results. If one + * Applies a function to pairs of elements at the same index in two `Iterable`s, collecting the results. If one * input `Iterable` is short, excess elements of the longer `Iterable` are discarded. * - * @example + * **Example** (Zipping with a combining function) + * * ```ts * import { Iterable } from "effect" * @@ -813,10 +887,18 @@ export const zipWith = /*#__PURE__*/dual(3, (self, that, f) => ({ } })); /** - * Places an element in between members of an `Iterable`. + * Places a separator between members of an `Iterable`. + * + * **When to use** + * + * Use to lazily insert a separator between adjacent values. + * + * **Details** + * * If the input is a non-empty array, the result is also a non-empty array. * - * @example + * **Example** (Interspersing separators) + * * ```ts * import { Iterable } from "effect" * @@ -846,7 +928,7 @@ export const zipWith = /*#__PURE__*/dual(3, (self, that, f) => ({ * console.log(Array.from(css).join("")) // "color: red; font-size: 14px; margin: 10px" * ``` * - * @category concatenating + * @category combining * @since 2.0.0 */ export const intersperse = /*#__PURE__*/dual(2, (self, middle) => ({ @@ -876,7 +958,8 @@ export const intersperse = /*#__PURE__*/dual(2, (self, middle) => ({ /** * Returns a function that checks if an `Iterable` contains a given value using a provided `isEquivalent` function. * - * @example + * **Example** (Checking membership with custom equivalence) + * * ```ts * import { Iterable } from "effect" * @@ -918,9 +1001,16 @@ export const containsWith = isEquivalent => dual(2, (self, a) => { return false; }); /** - * Returns a function that checks if a `Iterable` contains a given value using the default `Equivalence`. + * Checks whether an iterable contains a value using Effect's default `Equal` + * equivalence. + * + * **Details** + * + * Can be called as `contains(self, value)` or curried as + * `contains(value)(self)`. + * + * **Example** (Checking membership) * - * @example * ```ts * import { Iterable } from "effect" * @@ -951,7 +1041,8 @@ export const contains = /*#__PURE__*/containsWith(/*#__PURE__*/Equal.asEquivalen * Splits an `Iterable` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of * the `Iterable`. * - * @example + * **Example** (Chunking an iterable) + * * ```ts * import { Iterable } from "effect" * @@ -1023,9 +1114,10 @@ export const chunksOf = /*#__PURE__*/dual(2, (self, n) => { }; }); /** - * Group equal, consecutive elements of an `Iterable` into `NonEmptyArray`s using the provided `isEquivalent` function. + * Groups equal, consecutive elements of an `Iterable` into `NonEmptyArray`s using the provided `isEquivalent` function. + * + * **Example** (Grouping consecutive elements with custom equivalence) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1102,9 +1194,10 @@ export const groupWith = /*#__PURE__*/dual(2, (self, isEquivalent) => ({ } })); /** - * Group equal, consecutive elements of an `Iterable` into `NonEmptyArray`s. + * Groups equal, consecutive elements of an `Iterable` into `NonEmptyArray`s. + * + * **Example** (Grouping consecutive elements) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1135,10 +1228,16 @@ export const groupWith = /*#__PURE__*/dual(2, (self, isEquivalent) => ({ */ export const group = /*#__PURE__*/groupWith(/*#__PURE__*/Equal.asEquivalence()); /** - * Splits an `Iterable` into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning - * function on each element, and grouping the results according to values returned + * Groups all elements by the string or symbol key returned by `f`. + * + * **Details** + * + * Each property in the returned record contains a non-empty array of elements + * that produced that key. Unlike `group`, matching elements do not need to be + * consecutive. + * + * **Example** (Grouping by a key) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1206,10 +1305,13 @@ const constEmptyIterator = { /** * Creates an empty iterable that yields no elements. * - * This function returns a reusable empty iterable that can be used as a base case - * for operations or when you need to represent "no data" in a type-safe way. + * **When to use** + * + * Use when you need an empty iterable as a typed "no data" value or a base + * case for iterable operations. + * + * **Example** (Creating an empty iterable) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1231,12 +1333,13 @@ export const empty = () => constEmpty; /** * Creates an iterable containing a single element. * - * This is useful for wrapping a single value in an iterable context, - * allowing it to be used with other iterable operations. + * **When to use** * - * @param a - The single element to wrap in an iterable + * Use to wrap a single value in an iterable context so it can be combined + * with other iterable operations. + * + * **Example** (Wrapping a single value) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1266,15 +1369,15 @@ export const of = a => [a]; /** * Transforms each element of an iterable using a function. * + * **Details** + * * This is one of the most fundamental operations for working with iterables. * It applies a transformation function to each element, creating a new iterable - * with the transformed values. The operation is lazy - elements are only + * with the transformed values. The operation is lazy, so elements are only * transformed when the iterable is consumed. * - * @param self - The source iterable to transform - * @param f - Function that transforms each element (receives value and index) + * **Example** (Mapping elements) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1322,7 +1425,8 @@ export const map = /*#__PURE__*/dual(2, (self, f) => ({ /** * Applies a function to each element in an Iterable and returns a new Iterable containing the concatenated mapped elements. * - * @example + * **Example** (FlatMapping iterables) + * * ```ts * import { Iterable } from "effect" * @@ -1360,7 +1464,8 @@ export const flatMap = /*#__PURE__*/dual(2, (self, f) => flatten(map(self, f))); /** * Flattens an Iterable of Iterables into a single Iterable * - * @example + * **Example** (Flattening nested iterables) + * * ```ts * import { Iterable } from "effect" * @@ -1416,13 +1521,16 @@ export const flatten = self => ({ /** * Transforms elements of an iterable using a function that returns a `Result`, keeping only successful values. * - * This combines mapping and filtering in a single operation - the function is applied to each element, - * and only elements that result in `Result.succeed` are included in the result. + * **Details** + * + * This combines mapping and filtering in a single operation. The function is + * applied to each element, and only elements that result in `Result.succeed` + * are included in the result. + * + * **Example** (Filtering and transforming Result values) * - * @example * ```ts - * import { Iterable } from "effect" - * import * as Result from "effect/Result" + * import { Iterable, Result } from "effect" * * // Parse strings to numbers, keeping only valid ones * const strings = ["1", "2", "invalid", "4", "not-a-number"] @@ -1486,10 +1594,10 @@ export const filterMap = /*#__PURE__*/dual(2, (self, f) => ({ /** * Transforms all elements of the `Iterable` for as long as the specified function succeeds. * - * @example + * **Example** (Filtering and transforming until failure) + * * ```ts - * import { Iterable } from "effect" - * import * as Result from "effect/Result" + * import { Iterable, Result } from "effect" * * // Parse numbers until we hit an invalid one * const strings = ["1", "2", "3", "invalid", "4", "5"] @@ -1550,10 +1658,10 @@ export const filterMapWhile = /*#__PURE__*/dual(2, (self, f) => ({ /** * Retrieves the `Some` values from an `Iterable` of `Option`s. * - * @example + * **Example** (Extracting Some values) + * * ```ts - * import { Iterable } from "effect" - * import * as Option from "effect/Option" + * import { Iterable, Option } from "effect" * import * as assert from "node:assert" * * assert.deepStrictEqual( @@ -1593,12 +1701,13 @@ export const getSomes = self => { }; }; /** - * Retrieves the `Err` values from an `Iterable` of `Result`s. + * Returns a lazy iterable containing the failure values from an iterable of + * `Result`s, skipping successful results. + * + * **Example** (Extracting failures) * - * @example * ```ts - * import { Iterable } from "effect" - * import * as Result from "effect/Result" + * import { Iterable, Result } from "effect" * import * as assert from "node:assert" * * assert.deepStrictEqual( @@ -1614,7 +1723,7 @@ export const getSomes = self => { * ``` * * @category filtering - * @since 2.0.0 + * @since 4.0.0 */ export const getFailures = self => { return { @@ -1642,12 +1751,13 @@ export const getFailures = self => { }; }; /** - * Retrieves the `Ok` values from an `Iterable` of `Result`s. + * Returns a lazy iterable containing the success values from an iterable of + * `Result`s, skipping failed results. + * + * **Example** (Extracting successes) * - * @example * ```ts - * import { Iterable } from "effect" - * import * as Result from "effect/Result" + * import { Iterable, Result } from "effect" * import * as assert from "node:assert" * * assert.deepStrictEqual( @@ -1663,7 +1773,7 @@ export const getFailures = self => { * ``` * * @category filtering - * @since 2.0.0 + * @since 4.0.0 */ export const getSuccesses = self => { return { @@ -1693,14 +1803,14 @@ export const getSuccesses = self => { /** * Filters an iterable to only include elements that match a predicate. * + * **Details** + * * This function creates a new iterable containing only the elements for which * the predicate function returns true. Like map, this operation is lazy and * elements are only tested when the iterable is consumed. * - * @param self - The source iterable to filter - * @param predicate - Function that tests each element (receives value and index) + * **Example** (Filtering elements) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1760,10 +1870,13 @@ export const filter = /*#__PURE__*/dual(2, (self, predicate) => ({ /** * Transforms elements using a function that may return null or undefined, filtering out the null/undefined results. * - * This is useful when working with APIs or functions that return nullable values, - * providing a clean way to filter out null/undefined while transforming. + * **When to use** + * + * Use when working with APIs or functions that return nullable values, + * providing a clean way to filter out null or undefined while transforming. + * + * **Example** (FlatMapping nullable results) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1797,16 +1910,17 @@ export const filter = /*#__PURE__*/dual(2, (self, predicate) => ({ * ``` * * @category sequencing - * @since 2.0.0 + * @since 4.0.0 */ export const flatMapNullishOr = /*#__PURE__*/dual(2, (self, f) => filterMap(self, a => { const b = f(a); return b == null ? R.failVoid : R.succeed(b); })); /** - * Check if a predicate holds true for some `Iterable` element. + * Checks whether a predicate holds true for some `Iterable` element. + * + * **Example** (Checking whether some element matches) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1856,11 +1970,14 @@ export const some = /*#__PURE__*/dual(2, (self, predicate) => { * Generates an iterable by repeatedly applying a function that produces the * next element and state. * + * **Details** + * * This is useful for creating iterables from a generating function that * maintains state. The function should return `Option.some([value, nextState])` * to continue or `Option.none()` to stop. * - * @example + * **Example** (Unfolding state into values) + * * ```ts * import { Iterable, Option } from "effect" * @@ -1912,9 +2029,10 @@ export const unfold = (b, f) => ({ } }); /** - * Iterate over the `Iterable` applying `f`. + * Iterates over the `Iterable`, applying `f` to each element. + * + * **Example** (Iterating with side effects) * - * @example * ```ts * import { Iterable } from "effect" * @@ -1955,12 +2073,15 @@ export const forEach = /*#__PURE__*/dual(2, (self, f) => { } }); /** - * Reduce an iterable to a single value by applying a function to each element and accumulating the result. + * Reduces an iterable to a single value by applying a function to each element and accumulating the result. + * + * **Details** * * This function applies a reducing function against an accumulator and each element * of the iterable (from left to right) to reduce it to a single value. * - * @example + * **Example** (Reducing an iterable) + * * ```ts * import { Iterable } from "effect" * @@ -2016,7 +2137,8 @@ export const reduce = /*#__PURE__*/dual(3, (self, b, f) => { /** * Deduplicates adjacent elements that are identical using the provided `isEquivalent` function. * - * @example + * **Example** (Deduplicating adjacent elements with custom equivalence) + * * ```ts * import { Iterable } from "effect" * @@ -2087,7 +2209,8 @@ export const dedupeAdjacentWith = /*#__PURE__*/dual(2, (self, isEquivalent) => ( /** * Deduplicates adjacent elements that are identical. * - * @example + * **Example** (Deduplicating adjacent elements) + * * ```ts * import { Iterable } from "effect" * @@ -2125,7 +2248,8 @@ export const dedupeAdjacent = /*#__PURE__*/dedupeAdjacentWith(/*#__PURE__*/Equal /** * Zips this Iterable crosswise with the specified Iterable using the specified combiner. * - * @example + * **Example** (Combining cartesian products) + * * ```ts * import { Iterable } from "effect" * @@ -2168,14 +2292,15 @@ export const dedupeAdjacent = /*#__PURE__*/dedupeAdjacentWith(/*#__PURE__*/Equal * // ["admin_can_read", "admin_can_write", "admin_can_delete", "user_can_read", "user_can_write", "user_can_delete"] * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export const cartesianWith = /*#__PURE__*/dual(3, (self, that, f) => flatMap(self, a => map(that, b => f(a, b)))); /** * Zips this Iterable crosswise with the specified Iterable. * - * @example + * **Example** (Generating cartesian pairs) + * * ```ts * import { Iterable } from "effect" * @@ -2209,14 +2334,14 @@ export const cartesianWith = /*#__PURE__*/dual(3, (self, that, f) => flatMap(sel * console.log(Array.from(withEmpty)) // [] * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export const cartesian = /*#__PURE__*/dual(2, (self, that) => cartesianWith(self, that, (a, b) => [a, b])); /** - * Counts all the element of the given iterable that pass the given predicate + * Computes how many elements of the iterable pass the given predicate. * - * **Example** + * **Example** (Counting matching elements) * * ```ts * import { Iterable } from "effect" diff --git a/.opencode/node_modules/effect/dist/Iterable.js.map b/.opencode/node_modules/effect/dist/Iterable.js.map index 9fa9659ea57c24f940988b6dce4c3a4392c04078..12bb114afd9eb20bfa868204a8011bdc4d6d29a0 100644 --- a/.opencode/node_modules/effect/dist/Iterable.js.map +++ b/.opencode/node_modules/effect/dist/Iterable.js.map @@ -1 +1 @@ -{"version":3,"file":"Iterable.js","names":["Equal","dual","O","isBoolean","R","Tuple","makeBy","f","options","max","length","undefined","Math","floor","Infinity","Symbol","iterator","i","next","value","done","range","start","end","replicate","a","n","repeat","self","flatten","forever","fromRecord","key","Object","hasOwn","prepend","head","prependAll","that","appendAll","append","last","iterA","doneA","iterB","r","scan","b","acc","result","isEmpty","size","count","none","some","headUnsafe","Error","take","takeWhile","predicate","drop","findFirst","o","isSome","findLast","zip","zipWith","make","selfIterator","thatIterator","selfResult","thatResult","intersperse","middle","emitted","containsWith","isEquivalent","contains","asEquivalence","chunksOf","safeN","chunk","push","groupWith","nextResult","group","groupBy","out","k","constEmpty","constEmptyIterator","empty","of","map","flatMap","outerIterator","innerIterator","filterMap","isSuccess","success","filterMapWhile","getSomes","getFailures","isFailure","failure","getSuccesses","filter","flatMapNullishOr","failVoid","succeed","unfold","ab","isNone","forEach","reduce","Array","isArray","dedupeAdjacentWith","first","current","dedupeAdjacent","cartesianWith","cartesian","countBy"],"sources":["../src/Iterable.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,SAASC,IAAI,QAAQ,eAAe;AAEpC,OAAO,KAAKC,CAAC,MAAM,aAAa;AAChC,SAASC,SAAS,QAAQ,gBAAgB;AAG1C,OAAO,KAAKC,CAAC,MAAM,aAAa;AAChC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAGnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,MAAMC,MAAM,GAAGA,CAAIC,CAAmB,EAAEC,OAE9C,KAAiB;EAChB,MAAMC,GAAG,GAAGD,OAA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C,CAACkB,CAAC,EAAER,CAAC,CAAC,EAAE;MACXmC,KAAK,EAAE;IACT;IACAnC,CAAC,EAAE;EACL;EACA,OAAOmC,KAAK;AACd,CAAC,CACF","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Iterable.js","names":["Equal","dual","O","isBoolean","R","Tuple","makeBy","f","options","max","length","undefined","Math","floor","Infinity","Symbol","iterator","i","next","value","done","range","start","end","replicate","a","n","repeat","self","flatten","forever","fromRecord","key","Object","hasOwn","prepend","head","prependAll","that","appendAll","append","last","iterA","doneA","iterB","r","scan","b","acc","result","isEmpty","size","count","none","some","headUnsafe","Error","take","takeWhile","predicate","drop","findFirst","o","isSome","findLast","zip","zipWith","make","selfIterator","thatIterator","selfResult","thatResult","intersperse","middle","emitted","containsWith","isEquivalent","contains","asEquivalence","chunksOf","safeN","chunk","push","groupWith","nextResult","group","groupBy","out","k","constEmpty","constEmptyIterator","empty","of","map","flatMap","outerIterator","innerIterator","filterMap","isSuccess","success","filterMapWhile","getSomes","getFailures","isFailure","failure","getSuccesses","filter","flatMapNullishOr","failVoid","succeed","unfold","ab","isNone","forEach","reduce","Array","isArray","dedupeAdjacentWith","first","current","dedupeAdjacent","cartesianWith","cartesian","countBy"],"sources":["../src/Iterable.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;AAYA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,SAASC,IAAI,QAAQ,eAAe;AAEpC,OAAO,KAAKC,CAAC,MAAM,aAAa;AAChC,SAASC,SAAS,QAAQ,gBAAgB;AAG1C,OAAO,KAAKC,CAAC,MAAM,aAAa;AAChC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAGnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,MAAMC,MAAM,GAAGA,CAAIC,CAAmB,EAAEC,OAE9C,KAAiB;EAChB,MAAMC,GAAG,GAAGD,OAAO,EAAEE,MAAM,KAAKC,SAAS,GAAGC,IAAI,CAACH,GAAG,C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;EACV,IAAI6C,KAAK,GAAG,CAAC;EACb,IAAInC,CAAC,GAAG,CAAC;EACT,KAAK,MAAMQ,CAAC,IAAIG,IAAI,EAAE;IACpB,IAAIrB,CAAC,CAACkB,CAAC,EAAER,CAAC,CAAC,EAAE;MACXmC,KAAK,EAAE;IACT;IACAnC,CAAC,EAAE;EACL;EACA,OAAOmC,KAAK;AACd,CAAC,CACF","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/JsonPatch.d.ts b/.opencode/node_modules/effect/dist/JsonPatch.d.ts index 8f7ba2017fb85b983eeb7b4bb8ea210a4efa28ce..bb91b547c6928df1151fdb3d51fda6ba95c1d490 100644 --- a/.opencode/node_modules/effect/dist/JsonPatch.d.ts +++ b/.opencode/node_modules/effect/dist/JsonPatch.d.ts @@ -2,25 +2,24 @@ import type * as Schema from "./Schema.ts"; /** * A single JSON Patch operation. * - * Represents one transformation step in a JSON Patch document. This is a subset of RFC 6902, restricted to operations that can be applied deterministically without additional context. + * **When to use** * - * ## When to use this + * Use to manually construct patch operations, accept patch operations from + * callers, or type-check patch operation structures. * - * - Defining patch operation types in your code - * - Manually constructing patch operations - * - Type-checking patch operation structures + * **Details** * - * ## Behavior - * - * - All fields are readonly; operations are immutable value objects - * - Paths use JSON Pointer syntax; empty string `""` refers to the root document - * - The `description` field is optional and can be used for documentation - * - Operations are discriminated unions based on the `op` field + * Represents one transformation step in a JSON Patch document. This is a subset + * of RFC 6902, restricted to operations that can be applied deterministically + * without additional context. All fields are readonly, paths use JSON Pointer + * syntax, and the empty string `""` refers to the root document. Operations are + * discriminated by the `op` field, and the optional `description` field can be + * used for documentation. * * **Example** (All operation types) * * ```ts - * import * as JsonPatch from "effect/JsonPatch" + * import { JsonPatch } from "effect" * * const addOp: JsonPatch.JsonPatchOperation = { * op: "add", @@ -40,33 +39,45 @@ import type * as Schema from "./Schema.ts"; * } * ``` * - * ## See also - * - * - {@link JsonPatch} - Array of operations forming a complete patch - * - {@link get} - Computes operations automatically from value differences - * - {@link apply} - Applies operations to transform documents - * - * @category Model + * @see {@link JsonPatch} for the array of operations forming a complete patch + * @see {@link get} to compute operations automatically from value differences + * @see {@link apply} to apply operations to transform documents + * @category models * @since 4.0.0 */ export type JsonPatchOperation = { readonly op: "add"; /** - * JSON Pointer to the target location. + * JSON Pointer to the target location. For arrays, the last token may be `-` + * to append. + * + * **When to use** * - * For arrays, the last token may be `-` to append. + * Use to identify where the `add` operation inserts its value. */ readonly path: string; readonly value: Schema.Json; readonly description?: string; } | { readonly op: "remove"; - /** JSON Pointer to the target location. */ + /** + * JSON Pointer to the target location. + * + * **When to use** + * + * Use to identify which location the `remove` operation deletes. + */ readonly path: string; readonly description?: string; } | { readonly op: "replace"; - /** JSON Pointer to the target location. Use `""` to replace the root document. */ + /** + * JSON Pointer to the target location. Use `""` to replace the root document. + * + * **When to use** + * + * Use to identify which location the `replace` operation overwrites. + */ readonly path: string; readonly value: Schema.Json; readonly description?: string; @@ -74,26 +85,21 @@ export type JsonPatchOperation = { /** * A JSON Patch document (an ordered list of operations). * - * Represents a complete transformation as a sequence of operations. Operations are applied in order, and later operations observe the changes made by earlier ones. - * - * ## When to use this + * **When to use** * - * - Storing or serializing patch documents - * - Passing patches between functions or systems - * - Type-checking patch arrays - * - Validating patch structure + * Use to store, serialize, pass, or validate complete patch documents. * - * ## Behavior + * **Details** * - * - Operations are applied sequentially from first to last - * - Empty arrays represent no-op patches (return original document) - * - Later operations see the document state after earlier operations - * - The array is readonly; individual operations are immutable + * Represents a complete transformation as a readonly sequence of immutable + * operations. Operations are applied sequentially from first to last, and later + * operations observe the document state produced by earlier operations. An empty + * array represents a no-op patch and returns the original document. * * **Example** (Multi-operation patch) * * ```ts - * import * as JsonPatch from "effect/JsonPatch" + * import { JsonPatch } from "effect" * * const patch: JsonPatch.JsonPatch = [ * { op: "add", path: "/items/-", value: "apple" }, @@ -105,43 +111,39 @@ export type JsonPatchOperation = { * // { count: 5, items: ["apple"] } * ``` * - * ## See also - * - * - {@link JsonPatchOperation} - Individual operation types - * - {@link get} - Generates patches from value differences - * - {@link apply} - Executes patches to transform documents - * - * @category Model + * @see {@link JsonPatchOperation} for individual operation types + * @see {@link get} to generate patches from value differences + * @see {@link apply} to execute patches to transform documents + * @category models * @since 4.0.0 */ export type JsonPatch = ReadonlyArray; /** - * Compute a patch that transforms `oldValue` into `newValue`. + * Computes a structural patch that transforms `oldValue` into `newValue`. + * + * **When to use** * - * Generates a structural diff between two JSON values, producing a patch that when applied to `oldValue` yields `newValue`. + * Use to compute a JSON Patch from before and after JSON documents, detect + * structural changes, or create deterministic update operations. * - * ## When to use this + * **Details** * - * - Computing differences between JSON documents - * - Detecting changes in data structures - * - Generating patches for synchronization or version control - * - Creating minimal update operations from before/after states + * Generates a structural diff between two JSON values, producing a patch that + * yields `newValue` when applied to `oldValue`. It returns an empty array when + * values are identical, recursively diffs nested structures, emits root + * `replace` operations for primitive changes, and processes object keys in + * sorted order for stable output. * - * ## Behavior + * **Gotchas** * - * - Returns an empty array if values are identical (same reference or deep equal) - * - Does not mutate inputs; returns a new patch array - * - Primitives (numbers, strings, booleans, null) result in a root `replace` operation - * - Arrays are compared by index position; no move or copy detection - * - Objects are compared by key; keys processed in sorted order for stable output - * - Array removals emitted from highest to lowest index to prevent index shifting - * - Output is deterministic but not guaranteed to be minimal - * - Nested structures are recursively diffed + * Arrays are compared by index position, with no move or copy detection. Array + * removals are emitted from highest to lowest index to prevent index shifting. + * The output is deterministic but not guaranteed to be minimal. * * **Example** (Computing object diff) * * ```ts - * import * as JsonPatch from "effect/JsonPatch" + * import { JsonPatch } from "effect" * * const oldValue = { users: [{ id: 1, name: "Alice" }], count: 1 } * const newValue = { users: [{ id: 1, name: "Bob" }, { id: 2, name: "Charlie" }], count: 2 } @@ -154,40 +156,38 @@ export type JsonPatch = ReadonlyArray; * // ] * ``` * - * ## See also - * - * - {@link apply} - Applies the generated patch to a document - * - {@link JsonPatchOperation} - The operation types in the patch - * + * @see {@link apply} to apply the generated patch to a document + * @see {@link JsonPatchOperation} for the operation types in the patch + * @category transforming * @since 4.0.0 */ export declare function get(oldValue: Schema.Json, newValue: Schema.Json): JsonPatch; /** - * Apply a JSON Patch to a document. + * Applies a JSON Patch to a JSON document. + * + * **When to use** * - * Executes a sequence of patch operations on a JSON document, returning a new document with all transformations applied. + * Use to execute patches generated by {@link get}, transform documents + * with manually constructed patches, or process patch operations from external + * sources. * - * ## When to use this + * **Details** * - * - Applying patches generated by {@link get} - * - Transforming documents with manually constructed patches - * - Implementing patch-based update mechanisms - * - Processing patch operations from external sources + * Executes patch operations sequentially, so later operations see changes made + * by earlier operations. It never mutates the input document; array and object + * operations copy the affected containers. An empty patch returns the original + * reference, and a root replace (`path: ""`) returns the provided value + * directly. * - * ## Behavior + * **Gotchas** * - * - Never mutates the input document; returns a new value - * - Returns the original reference if patch is empty (no allocation) - * - Operations applied sequentially; later operations see earlier changes - * - Root replace (`path: ""`) returns the provided value directly - * - Throws errors for invalid paths, missing properties, or out-of-bounds array indices - * - Array operations preserve immutability by copying affected arrays - * - Object operations preserve immutability by copying affected objects + * Invalid paths, missing properties, and out-of-bounds array indices throw + * errors. * * **Example** (Applying a patch) * * ```ts - * import * as JsonPatch from "effect/JsonPatch" + * import { JsonPatch } from "effect" * * const document = { items: [1, 2, 3], total: 6 } * const patch: JsonPatch.JsonPatch = [ @@ -199,11 +199,9 @@ export declare function get(oldValue: Schema.Json, newValue: Schema.Json): JsonP * // { items: [1, 2, 3, 4], total: 10 } * ``` * - * ## See also - * - * - {@link get} - Generates patches from value differences - * - {@link JsonPatchOperation} - The operation types being applied - * + * @see {@link get} to generate patches from value differences + * @see {@link JsonPatchOperation} for the operation types being applied + * @category transforming * @since 4.0.0 */ export declare function apply(patch: JsonPatch, oldValue: Schema.Json): Schema.Json; diff --git a/.opencode/node_modules/effect/dist/JsonPatch.d.ts.map b/.opencode/node_modules/effect/dist/JsonPatch.d.ts.map index 9ec345688d236d365a200a387167a7e128ef1616..b2b010b6f0be1716a60039228f7b1c56d4a9d956 100644 --- a/.opencode/node_modules/effect/dist/JsonPatch.d.ts.map +++ b/.opencode/node_modules/effect/dist/JsonPatch.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"JsonPatch.d.ts","sourceRoot":"","sources":["../src/JsonPatch.ts"],"names":[],"mappings":"AAyDA,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IACA,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAA;IAClB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAA;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAC9B,GACC;IACA,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAA;IACrB,2CAA2C;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAC9B,GACC;IACA,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAA;IACtB,kFAAkF;IAClF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAA;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAC9B,CAAA;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,MAAM,SAAS,GAAG,aAAa,CAAC,kBAAkB,CAAC,CAAA;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,IA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GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,SAAS,CA6D3E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAqB1E"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/JsonPatch.js b/.opencode/node_modules/effect/dist/JsonPatch.js index 8713b3443284210ba6409309eb5c5cb256230e6a..de5d204d8a9770754fb4d39e450e8de27b6e4724 100644 --- a/.opencode/node_modules/effect/dist/JsonPatch.js +++ b/.opencode/node_modules/effect/dist/JsonPatch.js @@ -1,54 +1,9 @@ /** - * JSON Patch operations for transforming JSON documents. - * - * This module implements a subset of RFC 6902, providing operations that can be applied deterministically without additional context. It supports computing structural diffs between JSON values and applying patches to transform documents. - * - * ## Mental model - * - * - **JSON Patch**: An ordered sequence of operations that transform a document from one state to another - * - **JSON Pointer**: Path syntax for targeting specific locations in a JSON document (e.g., `/users/0/name`) - * - **Operations**: Three types - `add` (insert value), `remove` (delete value), `replace` (update value) - * - **Immutable transformations**: All operations return new values; inputs are never mutated - * - **Sequential application**: Operations are applied in order, with later operations observing changes from earlier ones - * - **Structural diff**: The `get` function computes differences by comparing structure, not content semantics - * - * ## Common tasks - * - * - Computing diffs between JSON values → {@link get} - * - Applying patches to transform documents → {@link apply} - * - Creating patches manually → {@link JsonPatchOperation} - * - Storing and validating patch documents → {@link JsonPatch} - * - * ## Gotchas - * - * - Array removals are emitted from highest index to lowest to avoid index shifting during application - * - Root operations use an empty string path `""` to target the entire document - * - Array append operations use `-` as the last token in the path (e.g., `/items/-`) - * - Generated patches are deterministic but not guaranteed to be minimal - * - Empty patches return the original document reference (no allocation) - * - Invalid paths or operations throw errors rather than returning a result type - * - * ## Quickstart - * - * **Example** (Computing and applying a patch) - * - * ```ts - * import * as JsonPatch from "effect/JsonPatch" - * - * const oldValue = { name: "Alice", age: 30 } - * const newValue = { name: "Alice", age: 31, city: "NYC" } - * - * const patch = JsonPatch.get(oldValue, newValue) - * // [{ op: "replace", path: "/age", value: 31 }, { op: "add", path: "/city", value: "NYC" }] - * - * const result = JsonPatch.apply(patch, oldValue) - * // { name: "Alice", age: 31, city: "NYC" } - * ``` - * - * ## See also - * - * - {@link JsonPointer} - Utilities for working with JSON Pointer paths - * - {@link Schema.Json} - The JSON value type used by this module + * The `JsonPatch` module computes and applies deterministic patch documents for + * JSON values. A patch is an ordered list of `add`, `remove`, and `replace` + * operations addressed by JSON Pointer paths. Use it to describe the structural + * difference between two JSON documents, serialize that difference, and replay + * it without mutating the original input. * * @since 4.0.0 */ @@ -56,32 +11,31 @@ import { format } from "./Formatter.js"; import { escapeToken, unescapeToken } from "./JsonPointer.js"; import * as Predicate from "./Predicate.js"; /** - * Compute a patch that transforms `oldValue` into `newValue`. + * Computes a structural patch that transforms `oldValue` into `newValue`. * - * Generates a structural diff between two JSON values, producing a patch that when applied to `oldValue` yields `newValue`. + * **When to use** * - * ## When to use this + * Use to compute a JSON Patch from before and after JSON documents, detect + * structural changes, or create deterministic update operations. * - * - Computing differences between JSON documents - * - Detecting changes in data structures - * - Generating patches for synchronization or version control - * - Creating minimal update operations from before/after states + * **Details** * - * ## Behavior + * Generates a structural diff between two JSON values, producing a patch that + * yields `newValue` when applied to `oldValue`. It returns an empty array when + * values are identical, recursively diffs nested structures, emits root + * `replace` operations for primitive changes, and processes object keys in + * sorted order for stable output. * - * - Returns an empty array if values are identical (same reference or deep equal) - * - Does not mutate inputs; returns a new patch array - * - Primitives (numbers, strings, booleans, null) result in a root `replace` operation - * - Arrays are compared by index position; no move or copy detection - * - Objects are compared by key; keys processed in sorted order for stable output - * - Array removals emitted from highest to lowest index to prevent index shifting - * - Output is deterministic but not guaranteed to be minimal - * - Nested structures are recursively diffed + * **Gotchas** + * + * Arrays are compared by index position, with no move or copy detection. Array + * removals are emitted from highest to lowest index to prevent index shifting. + * The output is deterministic but not guaranteed to be minimal. * * **Example** (Computing object diff) * * ```ts - * import * as JsonPatch from "effect/JsonPatch" + * import { JsonPatch } from "effect" * * const oldValue = { users: [{ id: 1, name: "Alice" }], count: 1 } * const newValue = { users: [{ id: 1, name: "Bob" }, { id: 2, name: "Charlie" }], count: 2 } @@ -94,11 +48,9 @@ import * as Predicate from "./Predicate.js"; * // ] * ``` * - * ## See also - * - * - {@link apply} - Applies the generated patch to a document - * - {@link JsonPatchOperation} - The operation types in the patch - * + * @see {@link apply} to apply the generated patch to a document + * @see {@link JsonPatchOperation} for the operation types in the patch + * @category transforming * @since 4.0.0 */ export function get(oldValue, newValue) { @@ -172,31 +124,31 @@ export function get(oldValue, newValue) { return patches; } /** - * Apply a JSON Patch to a document. + * Applies a JSON Patch to a JSON document. * - * Executes a sequence of patch operations on a JSON document, returning a new document with all transformations applied. + * **When to use** * - * ## When to use this + * Use to execute patches generated by {@link get}, transform documents + * with manually constructed patches, or process patch operations from external + * sources. * - * - Applying patches generated by {@link get} - * - Transforming documents with manually constructed patches - * - Implementing patch-based update mechanisms - * - Processing patch operations from external sources + * **Details** * - * ## Behavior + * Executes patch operations sequentially, so later operations see changes made + * by earlier operations. It never mutates the input document; array and object + * operations copy the affected containers. An empty patch returns the original + * reference, and a root replace (`path: ""`) returns the provided value + * directly. * - * - Never mutates the input document; returns a new value - * - Returns the original reference if patch is empty (no allocation) - * - Operations applied sequentially; later operations see earlier changes - * - Root replace (`path: ""`) returns the provided value directly - * - Throws errors for invalid paths, missing properties, or out-of-bounds array indices - * - Array operations preserve immutability by copying affected arrays - * - Object operations preserve immutability by copying affected objects + * **Gotchas** + * + * Invalid paths, missing properties, and out-of-bounds array indices throw + * errors. * * **Example** (Applying a patch) * * ```ts - * import * as JsonPatch from "effect/JsonPatch" + * import { JsonPatch } from "effect" * * const document = { items: [1, 2, 3], total: 6 } * const patch: JsonPatch.JsonPatch = [ @@ -208,11 +160,9 @@ export function get(oldValue, newValue) { * // { items: [1, 2, 3, 4], total: 10 } * ``` * - * ## See also - * - * - {@link get} - Generates patches from value differences - * - {@link JsonPatchOperation} - The operation types being applied - * + * @see {@link get} to generate patches from value differences + * @see {@link JsonPatchOperation} for the operation types being applied + * @category transforming * @since 4.0.0 */ export function apply(patch, oldValue) { diff --git a/.opencode/node_modules/effect/dist/JsonPatch.js.map b/.opencode/node_modules/effect/dist/JsonPatch.js.map index 0aada65a670eb597d7bd966f4f670c903532e596..5b83f743d067018a237c9ee88ff5adc5527134e6 100644 --- a/.opencode/node_modules/effect/dist/JsonPatch.js.map +++ b/.opencode/node_modules/effect/dist/JsonPatch.js.map @@ -1 +1 @@ -{"version":3,"file":"JsonPatch.js","names":["format","escapeToken","unescapeToken","Predicate","get","oldValue","newValue","Object","is","patches","Array","isArray","len1","length","len2","shared","Math","min","i","path","patch","op","prefixPathInPlace","push","value","isJsonObject","keys1","keys","keys2","allKeys","from","Set","sort","key","esc","hasKey1","hasOwn","hasKey2","apply","doc","setAt","addAt","undefined","parent","isObject","tokenize","pointer","charCodeAt","Error","split","slice","map","toIndex","token","test","Number","val","resolved","resolveParent","lastToken","stack","idx","updated","splice","rebuildFromStack","mode","tokens","cur","container","newParent","acc","copy"],"sources":["../src/JsonPatch.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,SAASA,MAAM,QAAQ,gBAAgB;AACvC,SAASC,WAAW,EAAEC,aAAa,QAAQ,kBAAkB;AAC7D,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AA4H3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,OAAM,SAAUC,GAAGA,CAACC,QAAqB,EAAEC,QAAqB;EAC9D,IAAIC,MAAM,CAACC,EAAE,CAACH,QAAQ,EAAEC,QAAQ,CAAC,EAAE,OAAO,EA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C,OAAO,CAACyD,SAAS,CAAC,EAAE;MAC5B,MAAMG,IAAI,GAAGH,SAAS,CAAClB,KAAK,EAAE;MAC9BqB,IAAI,CAAClB,KAAe,CAAC,GAAGiB,GAAG;MAC3BA,GAAG,GAAGC,IAAI;IACZ,CAAC,MAAM;MACL,MAAMA,IAAI,GAAG;QAAE,GAAIH;MAA+B,CAAE;MACpDG,IAAI,CAAClB,KAAe,CAAC,GAAGiB,GAAG;MAC3BA,GAAG,GAAGC,IAAI;IACZ;EACF;EAEA,OAAOD,GAAG;AACZ","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"JsonPatch.js","names":["format","escapeToken","unescapeToken","Predicate","get","oldValue","newValue","Object","is","patches","Array","isArray","len1","length","len2","shared","Math","min","i","path","patch","op","prefixPathInPlace","push","value","isJsonObject","keys1","keys","keys2","allKeys","from","Set","sort","key","esc","hasKey1","hasOwn","hasKey2","apply","doc","setAt","addAt","undefined","parent","isObject","tokenize","pointer","charCodeAt","Error","split","slice","map","toIndex","token","test","Number","val","resolved","resolveParent","lastToken","stack","idx","updated","splice","rebuildFromStack","mode","tokens","cur","container","newParent","acc","copy"],"sources":["../src/JsonPatch.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;AASA,SAASA,MAAM,QAAQ,gBAAgB;AACvC,SAASC,WAAW,EAAEC,aAAa,QAAQ,kBAAkB;AAC7D,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AA+H3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,OAAM,SAAUC,GAAGA,CAACC,QAAqB,EAAEC,QAAqB;EAC9D,IAAIC,MAAM,CAACC,EAAE,CAACH,QAAQ,EAAEC,QAAQ,CAAC,EAAE,OAAO,EAAE;EAC5C,MAAMG,OAAO,GAA8B,EAAE;EAE7C,IAAIC,KAAK,CAACC,OAAO,CAACN,QAAQ,CAAC,IAAIK,KAAK,CAACC,OAAO,CAACL,QAAQ,CAAC,EAAE;IACtD,MAA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AAGC,IAAI;IACZ,CAAC,MAAM;MACL,MAAMA,IAAI,GAAG;QAAE,GAAIH;MAA+B,CAAE;MACpDG,IAAI,CAAClB,KAAe,CAAC,GAAGiB,GAAG;MAC3BA,GAAG,GAAGC,IAAI;IACZ;EACF;EAEA,OAAOD,GAAG;AACZ","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/JsonPointer.d.ts b/.opencode/node_modules/effect/dist/JsonPointer.d.ts index 00fc7380d64e9ab04ce7aeaed36c9a9ab63aedc7..650339f575f676bd527bc5bd8a48528fde0d99d8 100644 --- a/.opencode/node_modules/effect/dist/JsonPointer.d.ts +++ b/.opencode/node_modules/effect/dist/JsonPointer.d.ts @@ -1,125 +1,74 @@ /** - * Utilities for escaping and unescaping JSON Pointer reference tokens according to RFC 6901. - * - * JSON Pointer (RFC 6901) defines a string syntax for identifying a specific value within a JSON document. - * A JSON Pointer is a sequence of reference tokens separated by forward slashes (`/`). Each reference token - * must be escaped when it contains special characters (`~` or `/`). - * - * ## Mental model - * - * - **Reference token**: A single segment of a JSON Pointer path (e.g., `"foo"`, `"bar/baz"`, `"key~with~tilde"`) - * - **Escaping**: Encoding special characters in a token so it can be safely used in a JSON Pointer (`~` → `~0`, `/` → `~1`) - * - **Unescaping**: Decoding escaped characters back to their original form (`~0` → `~`, `~1` → `/`) - * - **RFC 6901 compliance**: These functions implement the standard escaping rules for JSON Pointer reference tokens - * - **Pure functions**: Both operations are pure, immutable, and have no side effects - * - * ## Common tasks - * - * - Building JSON Pointers from path segments → {@link escapeToken} - * - Parsing JSON Pointers to extract original token values → {@link unescapeToken} - * - Escaping object keys or path segments before constructing JSON Pointers → {@link escapeToken} - * - Extracting unescaped identifiers from JSON Pointer strings → {@link unescapeToken} - * - * ## Gotchas - * - * - These functions operate on **reference tokens**, not full JSON Pointers. A full JSON Pointer like `/foo/bar` must be split into tokens (`["foo", "bar"]`) before escaping/unescaping - * - The order of replacement operations matters: `escapeToken` replaces `~` before `/` to avoid double-escaping - * - Empty strings are valid tokens and are returned unchanged - * - These functions do not validate JSON Pointer syntax; they only handle token-level escaping - * - * ## Quickstart - * - * **Example** (Building and parsing a JSON Pointer) - * - * ```ts - * import { escapeToken, unescapeToken } from "effect/JsonPointer" - * - * // Build a JSON Pointer from path segments - * const segments = ["users", "name/alias", "value"] - * const pointer = "/" + segments.map(escapeToken).join("/") - * // "/users/name~1alias/value" - * - * // Parse a JSON Pointer back to segments - * const tokens = pointer.split("/").slice(1).map(unescapeToken) - * // ["users", "name/alias", "value"] - * ``` - * - * ## See also - * - * - {@link JsonPatch} - Uses these utilities for JSON Patch operations - * - {@link JsonSchema} - Uses these utilities for schema reference resolution + * Helpers for escaping and unescaping JSON Pointer path segments. JSON Pointer + * uses `/` to separate path tokens inside a JSON document, so token text must + * encode literal `~` and `/` characters. This module provides the two RFC 6901 + * token conversions used by JSON Patch and related path handling. * * @since 4.0.0 */ /** - * Escapes a JSON Pointer reference token according to RFC 6901. - * - * Encodes special characters in a reference token so it can be safely used as a segment in a JSON Pointer. + * Escapes a JSON Pointer reference token according to RFC 6901 by encoding special characters so the token can be safely used as a segment in a JSON Pointer. * - * ## When to use this + * **When to use** * - * - Building JSON Pointers from object keys or path segments that may contain special characters - * - Escaping tokens before joining them with `/` to form a complete JSON Pointer - * - Preparing reference tokens for use in JSON Patch operations or schema references + * Use when you need to escape a single JSON Pointer path segment. * - * ## Behavior + * **Details** * - * - Does not mutate the input string; returns a new escaped string + * - Returns a new escaped string * - Replaces `~` (tilde) with `~0` and `/` (forward slash) with `~1` - * - Replacement order matters: `~` is replaced before `/` to prevent double-escaping * - Returns the input unchanged if it contains no special characters * - Empty strings are valid and returned unchanged * + * **Gotchas** + * + * The replacement order matters: `~` is replaced before `/` to prevent double-escaping. + * * **Example** (Escaping special characters) * * ```ts - * import { escapeToken } from "effect/JsonPointer" + * import { JsonPointer } from "effect" * - * escapeToken("a/b") // "a~1b" - * escapeToken("c~d") // "c~0d" - * escapeToken("path/to~key") // "path~1to~0key" + * JsonPointer.escapeToken("a/b") // "a~1b" + * JsonPointer.escapeToken("c~d") // "c~0d" + * JsonPointer.escapeToken("path/to~key") // "path~1to~0key" * ``` * - * ## See also - * - * - {@link unescapeToken} - The inverse operation for decoding escaped tokens - * + * @see {@link unescapeToken} The inverse operation for decoding escaped tokens + * @category encoding * @since 4.0.0 */ export declare function escapeToken(token: string): string; /** - * Unescapes a JSON Pointer reference token according to RFC 6901. - * - * Decodes escaped characters in a reference token to recover the original token value. + * Decodes a JSON Pointer reference token according to RFC 6901 escaping rules. * - * ## When to use this + * **When to use** * - * - Parsing JSON Pointers to extract the original token values from escaped segments - * - Converting escaped tokens back to their original form for use as object keys or identifiers - * - Resolving schema references or JSON Patch paths that use escaped tokens + * Use when you need to decode a single escaped JSON Pointer path segment. * - * ## Behavior + * **Details** * - * - Does not mutate the input string; returns a new unescaped string + * - Returns a new unescaped string * - Replaces `~1` with `/` (forward slash) and `~0` with `~` (tilde) - * - Replacement order matters: `~1` is replaced before `~0` to prevent incorrect decoding * - Returns the input unchanged if it contains no escaped sequences * - Empty strings are valid and returned unchanged * + * **Gotchas** + * + * The replacement order matters: `~1` is replaced before `~0` to prevent incorrect decoding. + * * **Example** (Unescaping special characters) * * ```ts - * import { unescapeToken } from "effect/JsonPointer" + * import { JsonPointer } from "effect" * - * unescapeToken("a~1b") // "a/b" - * unescapeToken("c~0d") // "c~d" - * unescapeToken("path~1to~0key") // "path/to~key" + * JsonPointer.unescapeToken("a~1b") // "a/b" + * JsonPointer.unescapeToken("c~0d") // "c~d" + * JsonPointer.unescapeToken("path~1to~0key") // "path/to~key" * ``` * - * ## See also - * - * - {@link escapeToken} - The inverse operation for encoding tokens - * + * @see {@link escapeToken} The inverse operation for encoding tokens + * @category decoding * @since 4.0.0 */ export declare function unescapeToken(token: string): string; diff --git a/.opencode/node_modules/effect/dist/JsonPointer.d.ts.map b/.opencode/node_modules/effect/dist/JsonPointer.d.ts.map index a3bc769f3de932c45533d6f0228eac36d920f31e..eb76be97acba92fd4f05b4773bd63b21fdaade63 100644 --- a/.opencode/node_modules/effect/dist/JsonPointer.d.ts.map +++ b/.opencode/node_modules/effect/dist/JsonPointer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"JsonPointer.d.ts","sourceRoot":"","sources":["../src/JsonPointer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnD"} \ No newline at end of file +{"version":3,"file":"JsonPointer.d.ts","sourceRoot":"","sources":["../src/JsonPointer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnD"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/JsonPointer.js b/.opencode/node_modules/effect/dist/JsonPointer.js index d06757efd9963283aa21a31690897eed351f4430..ae9005dbb20a29e9e700b7471cab0fc4ca6afc28 100644 --- a/.opencode/node_modules/effect/dist/JsonPointer.js +++ b/.opencode/node_modules/effect/dist/JsonPointer.js @@ -1,127 +1,76 @@ /** - * Utilities for escaping and unescaping JSON Pointer reference tokens according to RFC 6901. - * - * JSON Pointer (RFC 6901) defines a string syntax for identifying a specific value within a JSON document. - * A JSON Pointer is a sequence of reference tokens separated by forward slashes (`/`). Each reference token - * must be escaped when it contains special characters (`~` or `/`). - * - * ## Mental model - * - * - **Reference token**: A single segment of a JSON Pointer path (e.g., `"foo"`, `"bar/baz"`, `"key~with~tilde"`) - * - **Escaping**: Encoding special characters in a token so it can be safely used in a JSON Pointer (`~` → `~0`, `/` → `~1`) - * - **Unescaping**: Decoding escaped characters back to their original form (`~0` → `~`, `~1` → `/`) - * - **RFC 6901 compliance**: These functions implement the standard escaping rules for JSON Pointer reference tokens - * - **Pure functions**: Both operations are pure, immutable, and have no side effects - * - * ## Common tasks - * - * - Building JSON Pointers from path segments → {@link escapeToken} - * - Parsing JSON Pointers to extract original token values → {@link unescapeToken} - * - Escaping object keys or path segments before constructing JSON Pointers → {@link escapeToken} - * - Extracting unescaped identifiers from JSON Pointer strings → {@link unescapeToken} - * - * ## Gotchas - * - * - These functions operate on **reference tokens**, not full JSON Pointers. A full JSON Pointer like `/foo/bar` must be split into tokens (`["foo", "bar"]`) before escaping/unescaping - * - The order of replacement operations matters: `escapeToken` replaces `~` before `/` to avoid double-escaping - * - Empty strings are valid tokens and are returned unchanged - * - These functions do not validate JSON Pointer syntax; they only handle token-level escaping - * - * ## Quickstart - * - * **Example** (Building and parsing a JSON Pointer) - * - * ```ts - * import { escapeToken, unescapeToken } from "effect/JsonPointer" - * - * // Build a JSON Pointer from path segments - * const segments = ["users", "name/alias", "value"] - * const pointer = "/" + segments.map(escapeToken).join("/") - * // "/users/name~1alias/value" - * - * // Parse a JSON Pointer back to segments - * const tokens = pointer.split("/").slice(1).map(unescapeToken) - * // ["users", "name/alias", "value"] - * ``` - * - * ## See also - * - * - {@link JsonPatch} - Uses these utilities for JSON Patch operations - * - {@link JsonSchema} - Uses these utilities for schema reference resolution + * Helpers for escaping and unescaping JSON Pointer path segments. JSON Pointer + * uses `/` to separate path tokens inside a JSON document, so token text must + * encode literal `~` and `/` characters. This module provides the two RFC 6901 + * token conversions used by JSON Patch and related path handling. * * @since 4.0.0 */ /** - * Escapes a JSON Pointer reference token according to RFC 6901. - * - * Encodes special characters in a reference token so it can be safely used as a segment in a JSON Pointer. + * Escapes a JSON Pointer reference token according to RFC 6901 by encoding special characters so the token can be safely used as a segment in a JSON Pointer. * - * ## When to use this + * **When to use** * - * - Building JSON Pointers from object keys or path segments that may contain special characters - * - Escaping tokens before joining them with `/` to form a complete JSON Pointer - * - Preparing reference tokens for use in JSON Patch operations or schema references + * Use when you need to escape a single JSON Pointer path segment. * - * ## Behavior + * **Details** * - * - Does not mutate the input string; returns a new escaped string + * - Returns a new escaped string * - Replaces `~` (tilde) with `~0` and `/` (forward slash) with `~1` - * - Replacement order matters: `~` is replaced before `/` to prevent double-escaping * - Returns the input unchanged if it contains no special characters * - Empty strings are valid and returned unchanged * + * **Gotchas** + * + * The replacement order matters: `~` is replaced before `/` to prevent double-escaping. + * * **Example** (Escaping special characters) * * ```ts - * import { escapeToken } from "effect/JsonPointer" + * import { JsonPointer } from "effect" * - * escapeToken("a/b") // "a~1b" - * escapeToken("c~d") // "c~0d" - * escapeToken("path/to~key") // "path~1to~0key" + * JsonPointer.escapeToken("a/b") // "a~1b" + * JsonPointer.escapeToken("c~d") // "c~0d" + * JsonPointer.escapeToken("path/to~key") // "path~1to~0key" * ``` * - * ## See also - * - * - {@link unescapeToken} - The inverse operation for decoding escaped tokens - * + * @see {@link unescapeToken} The inverse operation for decoding escaped tokens + * @category encoding * @since 4.0.0 */ export function escapeToken(token) { return token.replace(/~/g, "~0").replace(/\//g, "~1"); } /** - * Unescapes a JSON Pointer reference token according to RFC 6901. - * - * Decodes escaped characters in a reference token to recover the original token value. + * Decodes a JSON Pointer reference token according to RFC 6901 escaping rules. * - * ## When to use this + * **When to use** * - * - Parsing JSON Pointers to extract the original token values from escaped segments - * - Converting escaped tokens back to their original form for use as object keys or identifiers - * - Resolving schema references or JSON Patch paths that use escaped tokens + * Use when you need to decode a single escaped JSON Pointer path segment. * - * ## Behavior + * **Details** * - * - Does not mutate the input string; returns a new unescaped string + * - Returns a new unescaped string * - Replaces `~1` with `/` (forward slash) and `~0` with `~` (tilde) - * - Replacement order matters: `~1` is replaced before `~0` to prevent incorrect decoding * - Returns the input unchanged if it contains no escaped sequences * - Empty strings are valid and returned unchanged * + * **Gotchas** + * + * The replacement order matters: `~1` is replaced before `~0` to prevent incorrect decoding. + * * **Example** (Unescaping special characters) * * ```ts - * import { unescapeToken } from "effect/JsonPointer" + * import { JsonPointer } from "effect" * - * unescapeToken("a~1b") // "a/b" - * unescapeToken("c~0d") // "c~d" - * unescapeToken("path~1to~0key") // "path/to~key" + * JsonPointer.unescapeToken("a~1b") // "a/b" + * JsonPointer.unescapeToken("c~0d") // "c~d" + * JsonPointer.unescapeToken("path~1to~0key") // "path/to~key" * ``` * - * ## See also - * - * - {@link escapeToken} - The inverse operation for encoding tokens - * + * @see {@link escapeToken} The inverse operation for encoding tokens + * @category decoding * @since 4.0.0 */ export function unescapeToken(token) { diff --git a/.opencode/node_modules/effect/dist/JsonPointer.js.map b/.opencode/node_modules/effect/dist/JsonPointer.js.map index c04f00a72abbf5be9b2c0a1655818e5842c7265b..aa27824a944820d69e32703ae31ff7557de5c01b 100644 --- a/.opencode/node_modules/effect/dist/JsonPointer.js.map +++ b/.opencode/node_modules/effect/dist/JsonPointer.js.map @@ -1 +1 @@ -{"version":3,"file":"JsonPointer.js","names":["escapeToken","token","replace","unescapeToken"],"sources":["../src/JsonPointer.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAM,SAAUA,WAAWA,CAACC,KAAa;EACvC,OAAOA,KAAK,CAACC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAACA,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC;AACvD;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAM,SAAUC,aAAaA,CAACF,KAAa;EACzC,OAAOA,KAAK,CAACC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAACA,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;AACtD","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"JsonPointer.js","names":["escapeToken","token","replace","unescapeToken"],"sources":["../src/JsonPointer.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAM,SAAUA,WAAWA,CAACC,KAAa;EACvC,OAAOA,KAAK,CAACC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAACA,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC;AACvD;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAM,SAAUC,aAAaA,CAACF,KAAa;EACzC,OAAOA,KAAK,CAACC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAACA,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;AACtD","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/JsonSchema.d.ts b/.opencode/node_modules/effect/dist/JsonSchema.d.ts index 5b777bf262780762bc0e37fab9ae2d699134ebad..ed5d54c20255057b2bb0b89b91faa58370e76248 100644 --- a/.opencode/node_modules/effect/dist/JsonSchema.d.ts +++ b/.opencode/node_modules/effect/dist/JsonSchema.d.ts @@ -1,10 +1,16 @@ /** * A plain object representing a single JSON Schema node. * - * This is an open record type (`[x: string]: unknown`) so it can hold any - * JSON Schema keyword. Most functions in this module accept or return this - * type. + * **When to use** * + * Use to represent an arbitrary JSON Schema object regardless of dialect. + * + * **Details** + * + * This is an open record type (`[x: string]: unknown`) so it can hold any JSON + * Schema keyword. Most functions in this module accept or return this type. + * + * @category models * @since 4.0.0 */ export interface JsonSchema { @@ -13,23 +19,53 @@ export interface JsonSchema { /** * The set of JSON Schema dialects supported by this module. * - * - `"draft-07"` — JSON Schema Draft-07 - * - `"draft-2020-12"` — JSON Schema Draft 2020-12 (canonical internal form) - * - `"openapi-3.1"` — OpenAPI 3.1 (uses Draft 2020-12 as its schema dialect) - * - `"openapi-3.0"` — OpenAPI 3.0 (uses a Draft-04/07 subset with extensions) + * **When to use** + * + * Use as the dialect marker for `JsonSchema` documents when parsing, + * converting, or emitting schemas across the supported formats. + * + * **Details** * + * Supported values are `"draft-07"` for JSON Schema Draft-07, + * `"draft-2020-12"` for JSON Schema Draft 2020-12 and the canonical internal + * form, `"openapi-3.1"` for OpenAPI 3.1, and `"openapi-3.0"` for OpenAPI 3.0. + * + * @see {@link Document} for a single root schema tagged with a dialect + * @see {@link MultiDocument} for multiple root schemas tagged with a dialect + * + * @category models * @since 4.0.0 */ export type Dialect = "draft-07" | "draft-2020-12" | "openapi-3.1" | "openapi-3.0"; /** * The JSON Schema primitive type names. * + * **When to use** + * + * Use to restrict a JSON Schema `type` keyword to the supported primitive names. + * + * @category models * @since 4.0.0 */ export type Type = "string" | "number" | "boolean" | "array" | "object" | "null" | "integer"; /** * A record of named JSON Schema definitions, keyed by definition name. * + * **When to use** + * + * Use as the shared lookup table for named JSON Schema nodes that are + * referenced from JSON Schema documents. + * + * **Details** + * + * The map is dialect-neutral. Conversion APIs emit it as `$defs`, + * `definitions`, or `components.schemas` depending on the target format. + * + * @see {@link Document} for a single root schema with definitions + * @see {@link MultiDocument} for multiple root schemas sharing definitions + * @see {@link resolve$ref} for resolving a `$ref` against definitions + * + * @category models * @since 4.0.0 */ export interface Definitions extends Record { @@ -38,16 +74,19 @@ export interface Definitions extends Record { * A structured container for a single JSON Schema and its associated * definitions. * - * - Use when you need to carry a root schema together with its - * shared definitions. - * - Use when converting between dialects via the `from*` / `to*` functions. + * **When to use** + * + * Use when you need to carry a root schema together with its shared + * definitions, or when converting between dialects with the `from*` and `to*` + * functions. + * + * **Details** * * The `schema` field holds the root schema *without* the definitions * collection. Root definitions are stored separately in `definitions` and - * referenced via: - * - `#/$defs/` for Draft-2020-12 - * - `#/definitions/` for Draft-07 - * - `#/components/schemas/` for OpenAPI 3.1 and OpenAPI 3.0 + * referenced via `#/$defs/` for Draft-2020-12, `#/definitions/` + * for Draft-07, and `#/components/schemas/` for OpenAPI 3.1 and + * OpenAPI 3.0. * * **Example** (Inspecting a parsed document) * @@ -68,7 +107,7 @@ export interface Definitions extends Record { * * @see {@link MultiDocument} * @see {@link fromSchemaDraft2020_12} - * + * @category models * @since 4.0.0 */ export interface Document { @@ -78,15 +117,20 @@ export interface Document { } /** * Like {@link Document}, but carries multiple root schemas that share a - * single definitions pool. The `schemas` tuple is non-empty (at least one - * element). + * single definitions pool. + * + * **When to use** * - * - Use when generating several schemas (e.g. request body + response body) - * that reference the same set of definitions. + * Use when generating several schemas, such as a request body + * and a response body, that reference the same set of definitions. + * + * **Details** + * + * The `schemas` tuple is non-empty and contains at least one element. * * @see {@link Document} * @see {@link toMultiDocumentOpenApi3_1} - * + * @category models * @since 4.0.0 */ export interface MultiDocument { @@ -95,27 +139,61 @@ export interface MultiDocument { readonly definitions: Definitions; } /** - * The `$schema` meta-schema URI for JSON Schema Draft-07. + * Represents the `$schema` meta-schema URI for JSON Schema Draft-07. + * + * **When to use** + * + * Use when constructing a Draft-07 JSON Schema document and you need a stable + * value for the root `$schema` field. * + * **Details** + * + * The exported value is the literal string + * `http://json-schema.org/draft-07/schema`. + * + * @see {@link META_SCHEMA_URI_DRAFT_2020_12} for the Draft 2020-12 `$schema` URI + * + * @category constants * @since 4.0.0 */ export declare const META_SCHEMA_URI_DRAFT_07 = "http://json-schema.org/draft-07/schema"; /** - * The `$schema` meta-schema URI for JSON Schema Draft 2020-12. + * Represents the `$schema` meta-schema URI for JSON Schema Draft 2020-12. + * + * **When to use** * + * Use when you need to populate the `$schema` field while emitting a JSON + * Schema document that should declare JSON Schema Draft 2020-12. + * + * **Details** + * + * The exported value is the literal string + * `https://json-schema.org/draft/2020-12/schema`. + * + * @see {@link META_SCHEMA_URI_DRAFT_07} for the Draft-07 `$schema` URI + * + * @category constants * @since 4.0.0 */ export declare const META_SCHEMA_URI_DRAFT_2020_12 = "https://json-schema.org/draft/2020-12/schema"; /** * Parses a raw Draft-07 JSON Schema into a `Document<"draft-2020-12">`. * - * - Use when you have a JSON Schema that follows Draft-07 conventions. - * - Converts Draft-07 tuple syntax (`items` as array + `additionalItems`) - * to Draft-2020-12 form (`prefixItems` + `items`). - * - Rewrites `#/definitions/...` refs to `#/$defs/...`. - * - Extracts root-level `definitions` into the `definitions` field. - * - Does not mutate the input. Allocates a new `Document`. - * - Unsupported keywords (e.g. `if`/`then`/`else`, `$id`) are dropped. + * **When to use** + * + * Use when you have a raw JSON Schema object that follows Draft-07 conventions + * and need the canonical Draft-2020-12 document representation. + * + * **Details** + * + * This converts Draft-07 tuple syntax (`items` as array plus + * `additionalItems`) to Draft-2020-12 form (`prefixItems` plus `items`), + * rewrites `#/definitions/...` refs to `#/$defs/...`, and extracts root-level + * `definitions` into the `definitions` field. + * + * **Gotchas** + * + * Unsupported keywords, such as `if`/`then`/`else` and `$id`, are dropped. * * **Example** (Parsing a Draft-07 schema) * @@ -140,17 +218,21 @@ export declare const META_SCHEMA_URI_DRAFT_2020_12 = "https://json-schema.org/dr * @see {@link fromSchemaDraft2020_12} * @see {@link fromSchemaOpenApi3_0} * @see {@link toDocumentDraft07} - * + * @category decoding * @since 4.0.0 */ export declare function fromSchemaDraft07(js: JsonSchema): Document<"draft-2020-12">; /** * Parses a raw Draft-2020-12 JSON Schema into a `Document<"draft-2020-12">`. * - * - Use when you already have a schema in Draft-2020-12 format. - * - Separates `$defs` from the root schema into the `definitions` field. - * - Does not mutate the input. Allocates a new `Document`. - * - Unlike {@link fromSchemaDraft07}, this performs no keyword rewriting. + * **When to use** + * + * Use when you already have a raw JSON Schema object in Draft-2020-12 format. + * + * **Details** + * + * This separates `$defs` from the root schema into the `definitions` field. + * Unlike {@link fromSchemaDraft07}, this performs no keyword rewriting. * * **Example** (Parsing a Draft-2020-12 schema) * @@ -170,17 +252,22 @@ export declare function fromSchemaDraft07(js: JsonSchema): Document<"draft-2020- * * @see {@link fromSchemaDraft07} * @see {@link fromSchemaOpenApi3_1} - * + * @category decoding * @since 4.0.0 */ export declare function fromSchemaDraft2020_12(js: JsonSchema): Document<"draft-2020-12">; /** * Parses a raw OpenAPI 3.1 JSON Schema into a `Document<"draft-2020-12">`. * - * - Use when consuming schemas from an OpenAPI 3.1 specification. - * - Rewrites `#/components/schemas/...` refs to `#/$defs/...`. - * - Delegates to {@link fromSchemaDraft2020_12} after rewriting refs. - * - Does not mutate the input. Allocates a new `Document`. + * **When to use** + * + * Use when you need to consume raw JSON Schema objects from an OpenAPI 3.1 + * specification. + * + * **Details** + * + * This rewrites `#/components/schemas/...` refs to `#/$defs/...`, then delegates + * to {@link fromSchemaDraft2020_12}. * * **Example** (Parsing an OpenAPI 3.1 schema) * @@ -201,19 +288,24 @@ export declare function fromSchemaDraft2020_12(js: JsonSchema): Document<"draft- * * @see {@link fromSchemaOpenApi3_0} * @see {@link toMultiDocumentOpenApi3_1} - * + * @category decoding * @since 4.0.0 */ export declare function fromSchemaOpenApi3_1(js: JsonSchema): Document<"draft-2020-12">; /** * Parses a raw OpenAPI 3.0 JSON Schema into a `Document<"draft-2020-12">`. * - * - Use when consuming schemas from an OpenAPI 3.0 specification. - * - Handles OpenAPI 3.0 extensions: `nullable`, singular `example`, - * boolean `exclusiveMinimum`/`exclusiveMaximum`. - * - Normalizes the schema to Draft-07 first, then converts to - * Draft-2020-12 via {@link fromSchemaDraft07}. - * - Does not mutate the input. Allocates a new `Document`. + * **When to use** + * + * Use when you need to consume raw JSON Schema objects from an OpenAPI 3.0 + * specification. + * + * **Details** + * + * This handles OpenAPI 3.0 extensions, including `nullable`, singular + * `example`, and boolean `exclusiveMinimum` or `exclusiveMaximum`. It + * normalizes the schema to Draft-07 first, then converts to Draft-2020-12 via + * {@link fromSchemaDraft07}. * * **Example** (Parsing an OpenAPI 3.0 nullable schema) * @@ -232,20 +324,28 @@ export declare function fromSchemaOpenApi3_1(js: JsonSchema): Document<"draft-20 * * @see {@link fromSchemaOpenApi3_1} * @see {@link fromSchemaDraft07} - * + * @category decoding * @since 4.0.0 */ export declare function fromSchemaOpenApi3_0(schema: JsonSchema): Document<"draft-2020-12">; /** * Converts a `Document<"draft-2020-12">` to a `Document<"draft-07">`. * - * - Use when you need to output a schema in Draft-07 format. - * - Rewrites `#/$defs/...` refs to `#/definitions/...`. - * - Converts Draft-2020-12 tuple syntax (`prefixItems` + `items`) to - * Draft-07 form (`items` as array + `additionalItems`). - * - Converts both the root schema and all definitions. - * - Does not mutate the input. Allocates a new `Document`. - * - Unsupported Draft-2020-12 keywords are dropped. + * **When to use** + * + * Use when you need to output a canonical JSON Schema document in Draft-07 + * format. + * + * **Details** + * + * This rewrites `#/$defs/...` refs to `#/definitions/...`, converts + * Draft-2020-12 tuple syntax (`prefixItems` plus `items`) to Draft-07 form + * (`items` as array plus `additionalItems`), and converts both the root schema + * and all definitions. + * + * **Gotchas** + * + * Unsupported Draft-2020-12 keywords are dropped. * * **Example** (Converting to Draft-07) * @@ -266,7 +366,7 @@ export declare function fromSchemaOpenApi3_0(schema: JsonSchema): Document<"draf * * @see {@link fromSchemaDraft07} * @see {@link toMultiDocumentOpenApi3_1} - * + * @category encoding * @since 4.0.0 */ export declare function toDocumentDraft07(document: Document<"draft-2020-12">): Document<"draft-07">; @@ -274,13 +374,18 @@ export declare function toDocumentDraft07(document: Document<"draft-2020-12">): * Converts a `MultiDocument<"draft-2020-12">` to a * `MultiDocument<"openapi-3.1">`. * - * - Use when generating an OpenAPI 3.1 specification from internal schemas. - * - Rewrites `#/$defs/...` refs to `#/components/schemas/...`. - * - Sanitizes definition keys to match the OpenAPI component key pattern - * (`^[a-zA-Z0-9.\-_]+$`), replacing invalid characters with `_`. - * - Updates all `$ref` pointers to use the sanitized keys. - * - Converts all schemas and definitions in the multi-document. - * - Does not mutate the input. Allocates a new `MultiDocument`. + * **When to use** + * + * Use when you need to emit an OpenAPI 3.1 multi-document from canonical JSON + * Schema documents. + * + * **Details** + * + * This rewrites `#/$defs/...` refs to `#/components/schemas/...`, sanitizes + * definition keys to match the OpenAPI component key pattern + * (`^[a-zA-Z0-9.\-_]+$`) by replacing invalid characters with `_`, updates all + * `$ref` pointers to use the sanitized keys, and converts all schemas and + * definitions in the multi-document. * * **Example** (Converting to OpenAPI 3.1) * @@ -302,7 +407,7 @@ export declare function toDocumentDraft07(document: Document<"draft-2020-12">): * * @see {@link toDocumentDraft07} * @see {@link MultiDocument} - * + * @category encoding * @since 4.0.0 */ export declare function toMultiDocumentOpenApi3_1(multiDocument: MultiDocument<"draft-2020-12">): MultiDocument<"openapi-3.1">; @@ -310,12 +415,19 @@ export declare function toMultiDocumentOpenApi3_1(multiDocument: MultiDocument<" * Resolves a `$ref` string by looking up the last path segment in a * definitions map. * - * - Use when you need to dereference a `$ref` pointer to get the - * actual schema it points to. - * - Only resolves the final segment of the ref path (e.g. `"User"` from - * `"#/$defs/User"`); does not follow arbitrary JSON Pointer paths. - * - Returns `undefined` if the definition is not found. - * - Does not mutate anything. Pure function. + * **When to use** + * + * Use when you need to dereference a `$ref` pointer to get the JSON Schema + * object it points to. + * + * **Details** + * + * This only resolves the final segment of the ref path, such as `"User"` from + * `"#/$defs/User"`. It returns `undefined` if the definition is not found. + * + * **Gotchas** + * + * This function does not follow arbitrary JSON Pointer paths. * * **Example** (Resolving a $ref) * @@ -335,20 +447,22 @@ export declare function toMultiDocumentOpenApi3_1(multiDocument: MultiDocument<" * * @see {@link resolveTopLevel$ref} * @see {@link Definitions} - * + * @category getters * @since 4.0.0 */ export declare function resolve$ref($ref: string, definitions: Definitions): JsonSchema | undefined; /** - * If the root schema of a document is a `$ref`, resolves it against the - * document's definitions and returns a new document with the inlined - * schema. Returns the original document unchanged if the root schema is - * not a `$ref` or if the referenced definition is not found. + * Resolves a document whose root schema is a top-level `$ref`. * - * - Use to dereference a top-level `$ref` before inspecting the root - * schema's properties directly. - * - Does not mutate the input. Returns the same object if no change is - * needed, or a shallow copy with the resolved schema. + * **When to use** + * + * Use when you need to dereference a top-level `$ref` before inspecting the + * root JSON Schema object's properties directly. + * + * **Details** + * + * This returns the same object if no change is needed, or a shallow copy with + * the resolved schema. * * **Example** (Resolving a top-level $ref) * @@ -369,7 +483,7 @@ export declare function resolve$ref($ref: string, definitions: Definitions): Jso * * @see {@link resolve$ref} * @see {@link Document} - * + * @category transforming * @since 4.0.0 */ export declare function resolveTopLevel$ref(document: Document<"draft-2020-12">): Document<"draft-2020-12">; diff --git a/.opencode/node_modules/effect/dist/JsonSchema.d.ts.map b/.opencode/node_modules/effect/dist/JsonSchema.d.ts.map index e3a956e2bb46b4cb16a836597db116a1e5039c72..93c4b5807b279c99c4ffa6d2b0302aa8db3a9876 100644 --- a/.opencode/node_modules/effect/dist/JsonSchema.d.ts.map +++ b/.opencode/node_modules/effect/dist/JsonSchema.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"JsonSchema.d.ts","sourceRoot":"","sources":["../src/JsonSchema.ts"],"names":[],"mappings":"AA2FA;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,eAAe,GAAG,aAAa,GAAG,aAAa,CAAA;AAElF;;;;GAIG;AACH,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAA;AAE5F;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;CAAG;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC,SAAS,OAAO;IACzC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAA;IACnB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;IAC3B,QAAQ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GAsCG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,GAAG,UAAU,GAAG,SAAS,CAS1F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,GAAG,QAAQ,CAAC,eAAe,CAAC,CAQlG"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/JsonSchema.js b/.opencode/node_modules/effect/dist/JsonSchema.js index c8715ce54b79072fb2bf97a27a401eb85f9eefc2..e4de2228d8896f2d98281e24bb7fffcb9afa36e5 100644 --- a/.opencode/node_modules/effect/dist/JsonSchema.js +++ b/.opencode/node_modules/effect/dist/JsonSchema.js @@ -1,86 +1,10 @@ /** - * Convert JSON Schema documents between dialects (Draft-07, Draft-2020-12, - * OpenAPI 3.0, OpenAPI 3.1). All dialects are normalized to an internal - * `Document<"draft-2020-12">` representation before optional conversion to - * an output dialect. - * - * ## Mental model - * - * - **JsonSchema** — a plain object with string keys; represents any single - * JSON Schema node. - * - **Dialect** — one of `"draft-07"`, `"draft-2020-12"`, `"openapi-3.1"`, - * or `"openapi-3.0"`. - * - **Document** — a structured container holding a root `schema`, its - * companion `definitions`, and the target `dialect`. Definitions are - * stored separately from the root schema so they can be relocated when - * converting between dialects. - * - **MultiDocument** — same as `Document` but carries multiple root - * schemas (at least one). Useful when generating several schemas that - * share a single definitions pool. - * - **Definitions** — a `Record` keyed by definition - * name. The ref pointer prefix depends on the dialect. - * - **`from*` functions** — parse a raw JSON Schema object into the - * canonical `Document<"draft-2020-12">`. - * - **`to*` functions** — convert from the canonical representation to a - * specific output dialect. - * - * ## Common tasks - * - * - Parse a Draft-07 schema → {@link fromSchemaDraft07} - * - Parse a Draft-2020-12 schema → {@link fromSchemaDraft2020_12} - * - Parse an OpenAPI 3.1 schema → {@link fromSchemaOpenApi3_1} - * - Parse an OpenAPI 3.0 schema → {@link fromSchemaOpenApi3_0} - * - Convert to Draft-07 output → {@link toDocumentDraft07} - * - Convert to OpenAPI 3.1 output → {@link toMultiDocumentOpenApi3_1} - * - Resolve a `$ref` against definitions → {@link resolve$ref} - * - Inline the root `$ref` of a document → {@link resolveTopLevel$ref} - * - * ## Gotchas - * - * - All `from*` functions normalize to `Document<"draft-2020-12">` - * regardless of the input dialect. - * - Unsupported or unrecognized JSON Schema keywords are silently dropped - * during conversion. - * - Draft-07 tuple syntax (`items` as array + `additionalItems`) is - * converted to 2020-12 form (`prefixItems` + `items`), and vice-versa. - * - OpenAPI 3.0 `nullable: true` is expanded into `type` arrays or - * `anyOf` unions. The `nullable` keyword is removed. - * - OpenAPI 3.0 singular `example` is converted to `examples` (array). - * - {@link resolve$ref} only looks up the last segment of the ref path in - * the definitions map; it does not follow arbitrary JSON Pointer paths. - * - * ## Quickstart - * - * **Example** (Parse a Draft-07 schema and convert to Draft-07 output) - * - * ```ts - * import { JsonSchema } from "effect" - * - * const raw: JsonSchema.JsonSchema = { - * type: "object", - * properties: { - * name: { type: "string" } - * }, - * required: ["name"] - * } - * - * // Parse into canonical form - * const doc = JsonSchema.fromSchemaDraft07(raw) - * - * // Convert back to Draft-07 - * const draft07 = JsonSchema.toDocumentDraft07(doc) - * - * console.log(draft07.dialect) // "draft-07" - * console.log(draft07.schema) // { type: "object", properties: { name: { type: "string" } }, required: ["name"] } - * ``` - * - * ## See also - * - * - {@link Document} - * - {@link MultiDocument} - * - {@link fromSchemaDraft07} - * - {@link toDocumentDraft07} - * - {@link resolve$ref} + * Helpers for normalizing and converting JSON Schema and OpenAPI schema + * documents. Supported inputs include JSON Schema Draft-07, Draft 2020-12, + * OpenAPI 3.0, and OpenAPI 3.1; conversions normalize through + * `Document<"draft-2020-12">` before emitting another dialect. The module also + * defines document types, meta-schema constants, OpenAPI component-key helpers, + * and `$ref` resolution utilities. * * @since 4.0.0 */ @@ -89,14 +13,40 @@ import { unescapeToken } from "./JsonPointer.js"; import * as Predicate from "./Predicate.js"; import * as Rec from "./Record.js"; /** - * The `$schema` meta-schema URI for JSON Schema Draft-07. + * Represents the `$schema` meta-schema URI for JSON Schema Draft-07. * + * **When to use** + * + * Use when constructing a Draft-07 JSON Schema document and you need a stable + * value for the root `$schema` field. + * + * **Details** + * + * The exported value is the literal string + * `http://json-schema.org/draft-07/schema`. + * + * @see {@link META_SCHEMA_URI_DRAFT_2020_12} for the Draft 2020-12 `$schema` URI + * + * @category constants * @since 4.0.0 */ export const META_SCHEMA_URI_DRAFT_07 = "http://json-schema.org/draft-07/schema"; /** - * The `$schema` meta-schema URI for JSON Schema Draft 2020-12. + * Represents the `$schema` meta-schema URI for JSON Schema Draft 2020-12. + * + * **When to use** + * + * Use when you need to populate the `$schema` field while emitting a JSON + * Schema document that should declare JSON Schema Draft 2020-12. + * + * **Details** * + * The exported value is the literal string + * `https://json-schema.org/draft/2020-12/schema`. + * + * @see {@link META_SCHEMA_URI_DRAFT_07} for the Draft-07 `$schema` URI + * + * @category constants * @since 4.0.0 */ export const META_SCHEMA_URI_DRAFT_2020_12 = "https://json-schema.org/draft/2020-12/schema"; @@ -106,13 +56,21 @@ const RE_COMPONENTS_SCHEMAS = /^#\/components\/schemas(?=\/|$)/; /** * Parses a raw Draft-07 JSON Schema into a `Document<"draft-2020-12">`. * - * - Use when you have a JSON Schema that follows Draft-07 conventions. - * - Converts Draft-07 tuple syntax (`items` as array + `additionalItems`) - * to Draft-2020-12 form (`prefixItems` + `items`). - * - Rewrites `#/definitions/...` refs to `#/$defs/...`. - * - Extracts root-level `definitions` into the `definitions` field. - * - Does not mutate the input. Allocates a new `Document`. - * - Unsupported keywords (e.g. `if`/`then`/`else`, `$id`) are dropped. + * **When to use** + * + * Use when you have a raw JSON Schema object that follows Draft-07 conventions + * and need the canonical Draft-2020-12 document representation. + * + * **Details** + * + * This converts Draft-07 tuple syntax (`items` as array plus + * `additionalItems`) to Draft-2020-12 form (`prefixItems` plus `items`), + * rewrites `#/definitions/...` refs to `#/$defs/...`, and extracts root-level + * `definitions` into the `definitions` field. + * + * **Gotchas** + * + * Unsupported keywords, such as `if`/`then`/`else` and `$id`, are dropped. * * **Example** (Parsing a Draft-07 schema) * @@ -137,7 +95,7 @@ const RE_COMPONENTS_SCHEMAS = /^#\/components\/schemas(?=\/|$)/; * @see {@link fromSchemaDraft2020_12} * @see {@link fromSchemaOpenApi3_0} * @see {@link toDocumentDraft07} - * + * @category decoding * @since 4.0.0 */ export function fromSchemaDraft07(js) { @@ -237,10 +195,14 @@ export function fromSchemaDraft07(js) { /** * Parses a raw Draft-2020-12 JSON Schema into a `Document<"draft-2020-12">`. * - * - Use when you already have a schema in Draft-2020-12 format. - * - Separates `$defs` from the root schema into the `definitions` field. - * - Does not mutate the input. Allocates a new `Document`. - * - Unlike {@link fromSchemaDraft07}, this performs no keyword rewriting. + * **When to use** + * + * Use when you already have a raw JSON Schema object in Draft-2020-12 format. + * + * **Details** + * + * This separates `$defs` from the root schema into the `definitions` field. + * Unlike {@link fromSchemaDraft07}, this performs no keyword rewriting. * * **Example** (Parsing a Draft-2020-12 schema) * @@ -260,7 +222,7 @@ export function fromSchemaDraft07(js) { * * @see {@link fromSchemaDraft07} * @see {@link fromSchemaOpenApi3_1} - * + * @category decoding * @since 4.0.0 */ export function fromSchemaDraft2020_12(js) { @@ -277,10 +239,15 @@ export function fromSchemaDraft2020_12(js) { /** * Parses a raw OpenAPI 3.1 JSON Schema into a `Document<"draft-2020-12">`. * - * - Use when consuming schemas from an OpenAPI 3.1 specification. - * - Rewrites `#/components/schemas/...` refs to `#/$defs/...`. - * - Delegates to {@link fromSchemaDraft2020_12} after rewriting refs. - * - Does not mutate the input. Allocates a new `Document`. + * **When to use** + * + * Use when you need to consume raw JSON Schema objects from an OpenAPI 3.1 + * specification. + * + * **Details** + * + * This rewrites `#/components/schemas/...` refs to `#/$defs/...`, then delegates + * to {@link fromSchemaDraft2020_12}. * * **Example** (Parsing an OpenAPI 3.1 schema) * @@ -301,7 +268,7 @@ export function fromSchemaDraft2020_12(js) { * * @see {@link fromSchemaOpenApi3_0} * @see {@link toMultiDocumentOpenApi3_1} - * + * @category decoding * @since 4.0.0 */ export function fromSchemaOpenApi3_1(js) { @@ -311,12 +278,17 @@ export function fromSchemaOpenApi3_1(js) { /** * Parses a raw OpenAPI 3.0 JSON Schema into a `Document<"draft-2020-12">`. * - * - Use when consuming schemas from an OpenAPI 3.0 specification. - * - Handles OpenAPI 3.0 extensions: `nullable`, singular `example`, - * boolean `exclusiveMinimum`/`exclusiveMaximum`. - * - Normalizes the schema to Draft-07 first, then converts to - * Draft-2020-12 via {@link fromSchemaDraft07}. - * - Does not mutate the input. Allocates a new `Document`. + * **When to use** + * + * Use when you need to consume raw JSON Schema objects from an OpenAPI 3.0 + * specification. + * + * **Details** + * + * This handles OpenAPI 3.0 extensions, including `nullable`, singular + * `example`, and boolean `exclusiveMinimum` or `exclusiveMaximum`. It + * normalizes the schema to Draft-07 first, then converts to Draft-2020-12 via + * {@link fromSchemaDraft07}. * * **Example** (Parsing an OpenAPI 3.0 nullable schema) * @@ -335,7 +307,7 @@ export function fromSchemaOpenApi3_1(js) { * * @see {@link fromSchemaOpenApi3_1} * @see {@link fromSchemaDraft07} - * + * @category decoding * @since 4.0.0 */ export function fromSchemaOpenApi3_0(schema) { @@ -345,13 +317,21 @@ export function fromSchemaOpenApi3_0(schema) { /** * Converts a `Document<"draft-2020-12">` to a `Document<"draft-07">`. * - * - Use when you need to output a schema in Draft-07 format. - * - Rewrites `#/$defs/...` refs to `#/definitions/...`. - * - Converts Draft-2020-12 tuple syntax (`prefixItems` + `items`) to - * Draft-07 form (`items` as array + `additionalItems`). - * - Converts both the root schema and all definitions. - * - Does not mutate the input. Allocates a new `Document`. - * - Unsupported Draft-2020-12 keywords are dropped. + * **When to use** + * + * Use when you need to output a canonical JSON Schema document in Draft-07 + * format. + * + * **Details** + * + * This rewrites `#/$defs/...` refs to `#/definitions/...`, converts + * Draft-2020-12 tuple syntax (`prefixItems` plus `items`) to Draft-07 form + * (`items` as array plus `additionalItems`), and converts both the root schema + * and all definitions. + * + * **Gotchas** + * + * Unsupported Draft-2020-12 keywords are dropped. * * **Example** (Converting to Draft-07) * @@ -372,7 +352,7 @@ export function fromSchemaOpenApi3_0(schema) { * * @see {@link fromSchemaDraft07} * @see {@link toMultiDocumentOpenApi3_1} - * + * @category encoding * @since 4.0.0 */ export function toDocumentDraft07(document) { @@ -474,13 +454,18 @@ function toSchemaDraft07(schema) { * Converts a `MultiDocument<"draft-2020-12">` to a * `MultiDocument<"openapi-3.1">`. * - * - Use when generating an OpenAPI 3.1 specification from internal schemas. - * - Rewrites `#/$defs/...` refs to `#/components/schemas/...`. - * - Sanitizes definition keys to match the OpenAPI component key pattern - * (`^[a-zA-Z0-9.\-_]+$`), replacing invalid characters with `_`. - * - Updates all `$ref` pointers to use the sanitized keys. - * - Converts all schemas and definitions in the multi-document. - * - Does not mutate the input. Allocates a new `MultiDocument`. + * **When to use** + * + * Use when you need to emit an OpenAPI 3.1 multi-document from canonical JSON + * Schema documents. + * + * **Details** + * + * This rewrites `#/$defs/...` refs to `#/components/schemas/...`, sanitizes + * definition keys to match the OpenAPI component key pattern + * (`^[a-zA-Z0-9.\-_]+$`) by replacing invalid characters with `_`, updates all + * `$ref` pointers to use the sanitized keys, and converts all schemas and + * definitions in the multi-document. * * **Example** (Converting to OpenAPI 3.1) * @@ -502,7 +487,7 @@ function toSchemaDraft07(schema) { * * @see {@link toDocumentDraft07} * @see {@link MultiDocument} - * + * @category encoding * @since 4.0.0 */ export function toMultiDocumentOpenApi3_1(multiDocument) { @@ -682,12 +667,19 @@ function widen_type(node) { * Resolves a `$ref` string by looking up the last path segment in a * definitions map. * - * - Use when you need to dereference a `$ref` pointer to get the - * actual schema it points to. - * - Only resolves the final segment of the ref path (e.g. `"User"` from - * `"#/$defs/User"`); does not follow arbitrary JSON Pointer paths. - * - Returns `undefined` if the definition is not found. - * - Does not mutate anything. Pure function. + * **When to use** + * + * Use when you need to dereference a `$ref` pointer to get the JSON Schema + * object it points to. + * + * **Details** + * + * This only resolves the final segment of the ref path, such as `"User"` from + * `"#/$defs/User"`. It returns `undefined` if the definition is not found. + * + * **Gotchas** + * + * This function does not follow arbitrary JSON Pointer paths. * * **Example** (Resolving a $ref) * @@ -707,7 +699,7 @@ function widen_type(node) { * * @see {@link resolveTopLevel$ref} * @see {@link Definitions} - * + * @category getters * @since 4.0.0 */ export function resolve$ref($ref, definitions) { @@ -721,15 +713,17 @@ export function resolve$ref($ref, definitions) { } } /** - * If the root schema of a document is a `$ref`, resolves it against the - * document's definitions and returns a new document with the inlined - * schema. Returns the original document unchanged if the root schema is - * not a `$ref` or if the referenced definition is not found. + * Resolves a document whose root schema is a top-level `$ref`. * - * - Use to dereference a top-level `$ref` before inspecting the root - * schema's properties directly. - * - Does not mutate the input. Returns the same object if no change is - * needed, or a shallow copy with the resolved schema. + * **When to use** + * + * Use when you need to dereference a top-level `$ref` before inspecting the + * root JSON Schema object's properties directly. + * + * **Details** + * + * This returns the same object if no change is needed, or a shallow copy with + * the resolved schema. * * **Example** (Resolving a top-level $ref) * @@ -750,7 +744,7 @@ export function resolve$ref($ref, definitions) { * * @see {@link resolve$ref} * @see {@link Document} - * + * @category transforming * @since 4.0.0 */ export function resolveTopLevel$ref(document) { diff --git a/.opencode/node_modules/effect/dist/JsonSchema.js.map b/.opencode/node_modules/effect/dist/JsonSchema.js.map index ae9d7f184559fb6e2eed642ba8b5ccc2d603b916..44629c6c335a346a72d9c10e99736f279a9d0b19 100644 --- a/.opencode/node_modules/effect/dist/JsonSchema.js.map +++ b/.opencode/node_modules/effect/dist/JsonSchema.js.map @@ -1 +1 @@ -{"version":3,"file":"JsonSchema.js","names":["Arr","unescapeToken","Predicate","Rec","META_SCHEMA_URI_DRAFT_07","META_SCHEMA_URI_DRAFT_2020_12","RE_DEFINITIONS","RE_DEFS","RE_COMPONENTS_SCHEMAS","fromSchemaDraft07","js","definitions","schema","walk","dialect","node","isRoot","Array","isArray","map","v","isObject","out","prefixItems","undefined","additionalItems","k","Object","keys","$ref","replace","mapped","walk_object","x","items","fromSchemaDraft2020_12","$defs","fromSchemaOpenApi3_1","rewrite_refs","ref","fromSchemaOpenApi3_0","normalized","normalize_OpenApi3_0_to_Draft07","toDocumentDraft07","document","toSchemaDraft07","rewrite","_isRoot","src","toMultiDocumentOpenApi3_1","multiDocument","keyMap","Map","key","sanitized","sanitizeOpenApiComponentsSchemasKey","set","tokens","split","length","identifier","get","slice","join","schemas","mapEntries","definition","VALID_OPEN_API_COMPONENTS_SCHEMAS_KEY_REGEXP","s","test","ch","code","codePointAt","push","f","value","examples","adjust_exclusivity","nullable","apply_nullable","exclusiveMinimum","minimum","exclusiveMaximum","maximum","enum","widen_type","includes","type","const","anyOf","t","resolve$ref","resolveTopLevel$ref"],"sources":["../src/JsonSchema.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsFA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,SAASC,aAAa,QAAQ,kBAAkB;AAChD,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,GAAG,MAAM,aAAa;AAuGlC;;;;;AAKA,OAAO,MAAMC,wBAAwB,GAAG,wCAAwC;AAEhF;;;;;AAKA,OAAO,MAAMC,6BAA6B,GAAG,8CAA8C;AAE3F,MAAMC,cAAc,GAAG,yBAAyB;AAChD,MAAMC,OAAO,GAAG,oBAAoB;AACpC,MAAMC,qBAAqB,GAAG,iCAAiC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,OAAM,SAAUC,iBAAiBA,CAACC,EAAc;EAC9C,IAAIC,WAAoC;EAExC,MAAMC,MAAM,GAAGC,IAAI,CAACH,EAAE,EAAE,IAAI,CAAe;EAC3C,OAAO;IACLI,OAAO,EAAE,eAAe;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;MAAM,CAAE;IAChC;EACF;EACA,OAAOgC,QAAQ;AACjB","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"JsonSchema.js","names":["Arr","unescapeToken","Predicate","Rec","META_SCHEMA_URI_DRAFT_07","META_SCHEMA_URI_DRAFT_2020_12","RE_DEFINITIONS","RE_DEFS","RE_COMPONENTS_SCHEMAS","fromSchemaDraft07","js","definitions","schema","walk","dialect","node","isRoot","Array","isArray","map","v","isObject","out","prefixItems","undefined","additionalItems","k","Object","keys","$ref","replace","mapped","walk_object","x","items","fromSchemaDraft2020_12","$defs","fromSchemaOpenApi3_1","rewrite_refs","ref","fromSchemaOpenApi3_0","normalized","normalize_OpenApi3_0_to_Draft07","toDocumentDraft07","document","toSchemaDraft07","rewrite","_isRoot","src","toMultiDocumentOpenApi3_1","multiDocument","keyMap","Map","key","sanitized","sanitizeOpenApiComponentsSchemasKey","set","tokens","split","length","identifier","get","slice","join","schemas","mapEntries","definition","VALID_OPEN_API_COMPONENTS_SCHEMAS_KEY_REGEXP","s","test","ch","code","codePointAt","push","f","value","examples","adjust_exclusivity","nullable","apply_nullable","exclusiveMinimum","minimum","exclusiveMaximum","maximum","enum","widen_type","includes","type","const","anyOf","t","resolve$ref","resolveTopLevel$ref"],"sources":["../src/JsonSchema.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;AAUA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,SAASC,aAAa,QAAQ,kBAAkB;AAChD,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,GAAG,MAAM,aAAa;AAmJlC;;;;;;;;;;;;;;;;;;AAkBA,OAAO,MAAMC,wBAAwB,GAAG,wCAAwC;AAEhF;;;;;;;;;;;;;;;;;;AAkBA,OAAO,MAAMC,6BAA6B,GAAG,8CAA8C;AAE3F,MAAMC,cAAc,GAAG,yBAAyB;AAChD,MAAMC,OAAO,GAAG,oBAAoB;AACpC,MAAMC,qBAAqB,GAAG,iCAAiC;A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C;EACrE,IAAI,OAAOA,QAAQ,CAAChC,MAAM,CAACiB,IAAI,KAAK,QAAQ,EAAE;IAC5C,MAAMjB,MAAM,GAAG+E,WAAW,CAAC/C,QAAQ,CAAChC,MAAM,CAACiB,IAAI,EAAEe,QAAQ,CAACjC,WAAW,CAAC;IACtE,IAAIC,MAAM,KAAKY,SAAS,EAAE;MACxB,OAAO;QAAE,GAAGoB,QAAQ;QAAEhC;MAAM,CAAE;IAChC;EACF;EACA,OAAOgC,QAAQ;AACjB","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Latch.d.ts b/.opencode/node_modules/effect/dist/Latch.d.ts index efcf100b955815e8a620932c0d2e2a4f507ad81a..882fee766b990b337411644220a1d3c01156dcf3 100644 --- a/.opencode/node_modules/effect/dist/Latch.d.ts +++ b/.opencode/node_modules/effect/dist/Latch.d.ts @@ -1,11 +1,31 @@ /** - * @since 3.8.0 + * Reusable synchronization primitives for coordinating fibers. A `Latch` is + * either open or closed: when it is closed, `await` and `whenOpen` suspend + * until the latch opens or the current waiters are released. The module + * includes effectful and synchronous constructors plus helpers to open, release, + * close, wait, and gate effects behind the latch. + * + * @since 4.0.0 */ import type * as Effect from "./Effect.ts"; /** - * @category models - * @since 3.8.0 - * @example + * A reusable coordination primitive that lets fibers wait until they are + * released by the latch. + * + * **When to use** + * + * Use to coordinate fibers that must wait for an explicit open or release + * signal before continuing. + * + * **Details** + * + * A closed latch causes `await` and `whenOpen` to suspend. `open` opens the + * latch and releases current and future waiters, `release` releases only + * current waiters without opening it, and `close` makes future waiters suspend + * again. + * + * **Example** (Coordinating fibers with a latch) + * * ```ts * import { Effect, Latch } from "effect" * @@ -19,33 +39,87 @@ import type * as Effect from "./Effect.ts"; * return "Latch was opened!" * }) * ``` + * + * @see {@link make} for creating a latch inside Effect code + * @see {@link open} for releasing current and future waiters + * @see {@link release} for releasing only the current waiters + * + * @category models + * @since 4.0.0 */ export interface Latch { - /** open the latch, releasing all fibers waiting on it */ + /** + * Opens the latch, releasing all fibers waiting on it. + * + * **When to use** + * + * Use to let current and future waiters continue. + */ readonly open: Effect.Effect; - /** open the latch, releasing all fibers waiting on it */ + /** + * Opens the latch synchronously, releasing all fibers waiting on it. + * + * **When to use** + * + * Use when synchronous code must open the latch immediately. + */ openUnsafe(this: Latch): boolean; - /** release all fibers waiting on the latch, without opening it */ + /** + * Releases all fibers currently waiting on the latch without opening it. + * + * **When to use** + * + * Use to let current waiters continue while future waiters still suspend. + */ readonly release: Effect.Effect; - /** wait for the latch to be opened */ + /** + * Waits for the latch to be opened or released. + * + * **When to use** + * + * Use to suspend until the latch allows the current fiber to continue. + */ readonly await: Effect.Effect; - /** close the latch */ + /** + * Closes the latch so future waiters suspend again. + * + * **When to use** + * + * Use to re-enable waiting after a latch has been opened. + */ readonly close: Effect.Effect; - /** close the latch */ + /** + * Closes the latch synchronously so future waiters suspend again. + * + * **When to use** + * + * Use when synchronous code must close the latch immediately. + */ closeUnsafe(this: Latch): boolean; - /** only run the given effect when the latch is open */ + /** + * Runs the given effect only after the latch allows waiting fibers to + * continue. + * + * **When to use** + * + * Use to gate an effect behind the latch signal. + */ whenOpen(self: Effect.Effect): Effect.Effect; } /** - * Creates a new Latch unsafely. + * Creates a `Latch` synchronously, outside of `Effect`. + * + * **When to use** * - * **Previously Known As** + * Use when you need to allocate a `Latch` synchronously outside an Effect + * workflow. * - * This API replaces the following from Effect 3.x: + * **Details** * - * - `Effect.makeLatchUnsafe` + * The latch starts closed by default; pass `true` to create it open. + * + * **Example** (Creating a latch unsafely) * - * @example * ```ts * import { Effect, Latch } from "effect" * @@ -66,20 +140,25 @@ export interface Latch { * const program = Effect.all([waiter, opener]) * ``` * + * @see {@link make} for creating a latch inside Effect code + * * @category constructors - * @since 3.8.0 + * @since 4.0.0 */ export declare const makeUnsafe: (open?: boolean | undefined) => Latch; /** - * Creates a new Latch. + * Creates a `Latch` inside `Effect`. * - * **Previously Known As** + * **When to use** * - * This API replaces the following from Effect 3.x: + * Use to create a latch for coordinating fibers inside Effect code. * - * - `Effect.makeLatch` + * **Details** + * + * The latch starts closed by default; pass `true` to create it open. + * + * **Example** (Creating a latch) * - * @example * ```ts * import { Effect, Latch } from "effect" * @@ -102,26 +181,68 @@ export declare const makeUnsafe: (open?: boolean | undefined) => Latch; * }) * ``` * + * @see {@link makeUnsafe} for synchronous allocation outside Effect code + * * @category constructors - * @since 3.8.0 + * @since 4.0.0 */ export declare const make: (open?: boolean | undefined) => Effect.Effect; /** - * Opens the latch, releasing all fibers waiting on it. + * Opens the latch and releases fibers waiting on it. + * + * **When to use** + * + * Use to open a latch and release all fibers that are waiting on it. + * + * **Details** + * + * The returned effect succeeds with `true` when this call changed the latch + * from closed to open, or `false` if it was already open. + * + * @see {@link openUnsafe} for a synchronous variant + * @see {@link release} to release waiting fibers without opening the latch * * @category combinators * @since 4.0.0 */ export declare const open: (self: Latch) => Effect.Effect; /** - * Opens the latch, releasing all fibers waiting on it. + * Opens the latch synchronously and releases fibers waiting on it. + * + * **When to use** + * + * Use when you need synchronous code to open a latch immediately and release + * the fibers waiting on it. + * + * **Details** + * + * Returns `true` when this call changed the latch from closed to open, or + * `false` if it was already open. This unsafe variant performs the state + * change immediately instead of returning an `Effect`. + * + * @see {@link open} for the effectful variant + * @see {@link release} to release waiting fibers without opening the latch + * @see {@link closeUnsafe} for the synchronous inverse operation * * @category unsafe * @since 4.0.0 */ export declare const openUnsafe: (self: Latch) => boolean; /** - * Releases all fibers waiting on the latch, without opening it. + * Releases the fibers currently waiting on a closed latch without opening it. + * + * **When to use** + * + * Use to let the fibers currently waiting on a latch proceed while keeping the + * latch closed for future waiters. + * + * **Details** + * + * The returned effect succeeds with `true` when release was requested while + * the latch was closed, or `false` if the latch was already open. Future + * waiters still suspend until the latch is opened or released again. + * + * @see {@link open} for opening the latch for current and future waiters * * @category combinators * @since 4.0.0 @@ -132,40 +253,136 @@ export { /** * Waits for the latch to be opened. * + * **When to use** + * + * Use to suspend the current fiber until the latch is opened or the current + * set of waiters is released. + * + * **Details** + * + * Awaiting an already open latch completes immediately. Awaiting a closed + * latch suspends until `open` or `release` resumes the waiters. + * + * **Gotchas** + * + * `release` can resume current waiters without opening the latch, so later + * waiters may still suspend. + * + * @see {@link open} for opening the latch for current and future waiters + * @see {@link release} for resuming current waiters without opening the latch + * @see {@link whenOpen} for waiting before running another effect + * * @category getters * @since 4.0.0 */ _await as await }; /** - * Closes the latch. + * Closes the latch so future `await` and `whenOpen` calls suspend. + * + * **When to use** + * + * Use to re-enable waiting on a latch after it was opened, so later `await` + * and `whenOpen` calls suspend again. + * + * **Details** + * + * The returned effect succeeds with `true` when this call changed the latch + * from open to closed, or `false` if it was already closed. + * + * @see {@link closeUnsafe} for a synchronous variant + * @see {@link open} for opening the latch for current and future waiters * * @category combinators * @since 4.0.0 */ export declare const close: (self: Latch) => Effect.Effect; /** - * Closes the latch. + * Closes the latch synchronously so future `await` and `whenOpen` calls + * suspend. + * + * **When to use** + * + * Use to close a latch synchronously when the state change must happen outside + * an `Effect`. + * + * **Details** + * + * Returns `true` when this call changed the latch from open to closed, or + * `false` if it was already closed. This unsafe variant performs the state + * change immediately instead of returning an `Effect`. + * + * @see {@link close} for the effectful variant + * @see {@link openUnsafe} to synchronously open the latch and release waiting + * fibers * * @category unsafe * @since 4.0.0 */ export declare const closeUnsafe: (self: Latch) => boolean; /** - * Runs the given effect only when the latch is open. + * Waits on the latch, then runs the provided effect. + * + * **When to use** + * + * Use to gate another effect so it starts only after the latch is opened or + * the current waiters are released. + * + * **Details** + * + * If the latch is open, the effect runs immediately. If it is closed, the + * returned effect suspends until the latch is opened or the current waiters are + * released. The provided effect's success, failure, and requirements are + * preserved. + * + * @see `await` for waiting without running another effect + * @see {@link open} for opening the latch for current and future waiters + * @see {@link release} for resuming current waiters without opening the latch * * @category combinators * @since 4.0.0 */ export declare const whenOpen: { /** - * Runs the given effect only when the latch is open. + * Waits on the latch, then runs the provided effect. + * + * **When to use** + * + * Use to gate another effect so it starts only after the latch is opened or + * the current waiters are released. + * + * **Details** + * + * If the latch is open, the effect runs immediately. If it is closed, the + * returned effect suspends until the latch is opened or the current waiters are + * released. The provided effect's success, failure, and requirements are + * preserved. + * + * @see `await` for waiting without running another effect + * @see {@link open} for opening the latch for current and future waiters + * @see {@link release} for resuming current waiters without opening the latch * * @category combinators * @since 4.0.0 */ (self: Latch): (effect: Effect.Effect) => Effect.Effect; /** - * Runs the given effect only when the latch is open. + * Waits on the latch, then runs the provided effect. + * + * **When to use** + * + * Use to gate another effect so it starts only after the latch is opened or + * the current waiters are released. + * + * **Details** + * + * If the latch is open, the effect runs immediately. If it is closed, the + * returned effect suspends until the latch is opened or the current waiters are + * released. The provided effect's success, failure, and requirements are + * preserved. + * + * @see `await` for waiting without running another effect + * @see {@link open} for opening the latch for current and future waiters + * @see {@link release} for resuming current waiters without opening the latch * * @category combinators * @since 4.0.0 diff --git a/.opencode/node_modules/effect/dist/Latch.d.ts.map b/.opencode/node_modules/effect/dist/Latch.d.ts.map index 6f0f7343eeeecff8d45a79c06a6da3705eed7110..fb9e72d01bb64587c806014b194246f01240cebd 100644 --- a/.opencode/node_modules/effect/dist/Latch.d.ts.map +++ b/.opencode/node_modules/effect/dist/Latch.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Latch.d.ts","sourceRoot":"","sources":["../src/Latch.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAG1C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,KAAK;IACpB,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACrC,yDAAyD;IACzD,UAAU,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAA;IAChC,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACxC,sCAAsC;IACtC,QAAQ,CAA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AI,KAAK,EAChB,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,KAAK,GAAI,MAAM,KAAK,KAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAe,CAAA;AAExE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,KAAK,KAAG,OAA6B,CAAA;AAEvE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,QAAQ,EAAE;IACrB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IAClF;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;CAQvE,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Latch.js b/.opencode/node_modules/effect/dist/Latch.js index 51c361a362f6c4162ca57fad4679a6de523804ec..d0ffb9c7c7a2980793e7994babf7aff69ba67fae 100644 --- a/.opencode/node_modules/effect/dist/Latch.js +++ b/.opencode/node_modules/effect/dist/Latch.js @@ -1,14 +1,18 @@ import * as internal from "./internal/effect.js"; /** - * Creates a new Latch unsafely. + * Creates a `Latch` synchronously, outside of `Effect`. * - * **Previously Known As** + * **When to use** * - * This API replaces the following from Effect 3.x: + * Use when you need to allocate a `Latch` synchronously outside an Effect + * workflow. * - * - `Effect.makeLatchUnsafe` + * **Details** + * + * The latch starts closed by default; pass `true` to create it open. + * + * **Example** (Creating a latch unsafely) * - * @example * ```ts * import { Effect, Latch } from "effect" * @@ -29,20 +33,25 @@ import * as internal from "./internal/effect.js"; * const program = Effect.all([waiter, opener]) * ``` * + * @see {@link make} for creating a latch inside Effect code + * * @category constructors - * @since 3.8.0 + * @since 4.0.0 */ export const makeUnsafe = internal.makeLatchUnsafe; /** - * Creates a new Latch. + * Creates a `Latch` inside `Effect`. + * + * **When to use** + * + * Use to create a latch for coordinating fibers inside Effect code. * - * **Previously Known As** + * **Details** * - * This API replaces the following from Effect 3.x: + * The latch starts closed by default; pass `true` to create it open. * - * - `Effect.makeLatch` + * **Example** (Creating a latch) * - * @example * ```ts * import { Effect, Latch } from "effect" * @@ -65,26 +74,68 @@ export const makeUnsafe = internal.makeLatchUnsafe; * }) * ``` * + * @see {@link makeUnsafe} for synchronous allocation outside Effect code + * * @category constructors - * @since 3.8.0 + * @since 4.0.0 */ export const make = internal.makeLatch; /** - * Opens the latch, releasing all fibers waiting on it. + * Opens the latch and releases fibers waiting on it. + * + * **When to use** + * + * Use to open a latch and release all fibers that are waiting on it. + * + * **Details** + * + * The returned effect succeeds with `true` when this call changed the latch + * from closed to open, or `false` if it was already open. + * + * @see {@link openUnsafe} for a synchronous variant + * @see {@link release} to release waiting fibers without opening the latch * * @category combinators * @since 4.0.0 */ export const open = self => self.open; /** - * Opens the latch, releasing all fibers waiting on it. + * Opens the latch synchronously and releases fibers waiting on it. + * + * **When to use** + * + * Use when you need synchronous code to open a latch immediately and release + * the fibers waiting on it. + * + * **Details** + * + * Returns `true` when this call changed the latch from closed to open, or + * `false` if it was already open. This unsafe variant performs the state + * change immediately instead of returning an `Effect`. + * + * @see {@link open} for the effectful variant + * @see {@link release} to release waiting fibers without opening the latch + * @see {@link closeUnsafe} for the synchronous inverse operation * * @category unsafe * @since 4.0.0 */ export const openUnsafe = self => self.openUnsafe(); /** - * Releases all fibers waiting on the latch, without opening it. + * Releases the fibers currently waiting on a closed latch without opening it. + * + * **When to use** + * + * Use to let the fibers currently waiting on a latch proceed while keeping the + * latch closed for future waiters. + * + * **Details** + * + * The returned effect succeeds with `true` when release was requested while + * the latch was closed, or `false` if the latch was already open. Future + * waiters still suspend until the latch is opened or released again. + * + * @see {@link open} for opening the latch for current and future waiters * * @category combinators * @since 4.0.0 @@ -95,26 +146,90 @@ export { /** * Waits for the latch to be opened. * + * **When to use** + * + * Use to suspend the current fiber until the latch is opened or the current + * set of waiters is released. + * + * **Details** + * + * Awaiting an already open latch completes immediately. Awaiting a closed + * latch suspends until `open` or `release` resumes the waiters. + * + * **Gotchas** + * + * `release` can resume current waiters without opening the latch, so later + * waiters may still suspend. + * + * @see {@link open} for opening the latch for current and future waiters + * @see {@link release} for resuming current waiters without opening the latch + * @see {@link whenOpen} for waiting before running another effect + * * @category getters * @since 4.0.0 */ _await as await }; /** - * Closes the latch. + * Closes the latch so future `await` and `whenOpen` calls suspend. + * + * **When to use** + * + * Use to re-enable waiting on a latch after it was opened, so later `await` + * and `whenOpen` calls suspend again. + * + * **Details** + * + * The returned effect succeeds with `true` when this call changed the latch + * from open to closed, or `false` if it was already closed. + * + * @see {@link closeUnsafe} for a synchronous variant + * @see {@link open} for opening the latch for current and future waiters * * @category combinators * @since 4.0.0 */ export const close = self => self.close; /** - * Closes the latch. + * Closes the latch synchronously so future `await` and `whenOpen` calls + * suspend. + * + * **When to use** + * + * Use to close a latch synchronously when the state change must happen outside + * an `Effect`. + * + * **Details** + * + * Returns `true` when this call changed the latch from open to closed, or + * `false` if it was already closed. This unsafe variant performs the state + * change immediately instead of returning an `Effect`. + * + * @see {@link close} for the effectful variant + * @see {@link openUnsafe} to synchronously open the latch and release waiting + * fibers * * @category unsafe * @since 4.0.0 */ export const closeUnsafe = self => self.closeUnsafe(); /** - * Runs the given effect only when the latch is open. + * Waits on the latch, then runs the provided effect. + * + * **When to use** + * + * Use to gate another effect so it starts only after the latch is opened or + * the current waiters are released. + * + * **Details** + * + * If the latch is open, the effect runs immediately. If it is closed, the + * returned effect suspends until the latch is opened or the current waiters are + * released. The provided effect's success, failure, and requirements are + * preserved. + * + * @see `await` for waiting without running another effect + * @see {@link open} for opening the latch for current and future waiters + * @see {@link release} for resuming current waiters without opening the latch * * @category combinators * @since 4.0.0 diff --git a/.opencode/node_modules/effect/dist/Latch.js.map b/.opencode/node_modules/effect/dist/Latch.js.map index a2740e4e5303678d6d5732acb6b6cf40e06c6189..a97176eadb378fda8bb87b8d54c7d1cfd6b5e6cc 100644 --- a/.opencode/node_modules/effect/dist/Latch.js.map +++ b/.opencode/node_modules/effect/dist/Latch.js.map @@ -1 +1 @@ -{"version":3,"file":"Latch.js","names":["internal","makeUnsafe","makeLatchUnsafe","make","makeLatch","open","self","openUnsafe","release","_await","await","close","closeUnsafe","whenOpen","args","length","effect"],"sources":["../src/Latch.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,sBAAsB;AAqChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,OAAO,MAAMC,UAAU,GAA0CD,QAAQ,CAACE,eAAe;AAEzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAO,MAAMC,IAAI,GAAyDH,QAAQ,CAACI,SAAS;AAE5F;;;;;;AAMA,OAAO,MAAMC,IAAI,GAAIC,IAAW,IAA6BA,IAAI,CAACD,IAAI;AAEtE;;;;;;AAMA,OAAO,MAAME,UAAU,GAAID,IAAW,IAAcA,IAAI,CAACC,UAAU,EAAE;AAErE;;;;;;AAMA,OAAO,MAAMC,OAAO,GAAIF,IAAW,IAA6BA,IAAI,CAACE,OAAO;AAE5E,MAAMC,MAAM,GAAIH,IAAW,IAA0BA,IAAI,CAACI,KAAK;AAE/D;AACE;;;;;;AAMAD,MAAM,IAAIC,KAAK;AAGjB;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAIL,IAAW,IAA6BA,IAAI,CAACK,KAAK;AAExE;;;;;;AAMA,OAAO,MAAMC,WAAW,GAAIN,IAAW,IAAcA,IAAI,CAACM,WAAW,EAAE;AAEvE;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAehBA,CAAC,GAAGC,IAAgB,KAAI;EAC3B,IAAIA,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;IACrB,MAAM,CAACT,IAAI,CAAC,GAAGQ,IAAI;IACnB,OAAQE,MAAoC,IAAKV,IAAI,CAACO,QAAQ,CAACG,MAAM,CAAC;EACxE;EACA,MAAM,CAACV,IAAI,EAAEU,MAAM,CAAC,GAAGF,IAAI;EAC3B,OAAOR,IAAI,CAACO,QAAQ,CAACG,MAAM,CAAC;AAC9B,CAAS","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Latch.js","names":["internal","makeUnsafe","makeLatchUnsafe","make","makeLatch","open","self","openUnsafe","release","_await","await","close","closeUnsafe","whenOpen","args","length","effect"],"sources":["../src/Latch.ts"],"sourcesContent":[null],"mappings":"AAUA,OAAO,KAAKA,QAAQ,MAAM,sBAAsB;AA2GhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,OAAO,MAAMC,UAAU,GAA0CD,QAAQ,CAACE,eAAe;AAEzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,OAAO,MAAMC,IAAI,GAAyDH,QAAQ,CAACI,SAAS;AAE5F;;;;;;;;;;;;;;;;;;AAkBA,OAAO,MAAMC,IAAI,GAAIC,IAAW,IAA6BA,IAAI,CAACD,IAAI;AAEtE;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAME,UAAU,GAAID,IAAW,IAAcA,IAAI,CAACC,UAAU,EAAE;AAErE;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,OAAO,GAAIF,IAAW,IAA6BA,IAAI,CAACE,OAAO;AAE5E,MAAMC,MAAM,GAAIH,IAAW,IAA0BA,IAAI,CAACI,KAAK;AAE/D;AACE;;;;;;;;;;;;;;;;;;;;;;;;;AAyBAD,MAAM,IAAIC,KAAK;AAGjB;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,KAAK,GAAIL,IAAW,IAA6BA,IAAI,CAACK,KAAK;AAExE;;;;;;;;;;;;;;;;;;;;;;AAsBA,OAAO,MAAMC,WAAW,GAAIN,IAAW,IAAcA,IAAI,CAACM,WAAW,EAAE;AAEvE;;;;;;;;;;;;;;;;;;;;;;AAsBA,OAAO,MAAMC,QAAQ,GA+ChBA,CAAC,GAAGC,IAAgB,KAAI;EAC3B,IAAIA,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;IACrB,MAAM,CAACT,IAAI,CAAC,GAAGQ,IAAI;IACnB,OAAQE,MAAoC,IAAKV,IAAI,CAACO,QAAQ,CAACG,MAAM,CAAC;EACxE;EACA,MAAM,CAACV,IAAI,EAAEU,MAAM,CAAC,GAAGF,IAAI;EAC3B,OAAOR,IAAI,CAACO,QAAQ,CAACG,MAAM,CAAC;AAC9B,CAAS","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Layer.d.ts b/.opencode/node_modules/effect/dist/Layer.d.ts index f71e766b81de293f14190f6b2bc88f2b5a3fcb4b..75330e3ebebf6ff5865ab07c72a46a0c4fff6d94 100644 --- a/.opencode/node_modules/effect/dist/Layer.d.ts +++ b/.opencode/node_modules/effect/dist/Layer.d.ts @@ -1,19 +1,11 @@ /** - * A `Layer` describes how to build one or more services in your - * application. Services can be injected into effects via - * `Effect.provideService`. Effects can require services via `Effect.service`. + * Builds and wires services for Effect applications. * - * Layer can be thought of as recipes for producing bundles of services, given - * their dependencies (other services). - * - * Construction of services can be effectful and utilize resources that must be - * acquired and safely released when the services are done being utilized. - * - * By default layers are shared, meaning that if the same layer is used twice - * the layer will only be allocated a single time. - * - * Because of their excellent composition properties, layers are the idiomatic - * way in Effect-TS to create services that depend on other services. + * A `Layer` describes how to acquire one or more services, which + * services are required to build them, and which errors can occur during + * acquisition. Layers can manage scoped resources, memoize shared services, + * combine with other layers, provide services to effects or streams, and attach + * error handling, tracing, or lifecycle hooks. * * @since 2.0.0 */ @@ -32,15 +24,22 @@ import type * as Types from "./Types.ts"; import type * as Unify from "./Unify.ts"; declare const TypeId = "~effect/Layer"; /** - * A Layer describes how to build one or more services for dependency injection. + * A `Layer` describes how to build one or more services for dependency injection. * - * A Layer represents: - * - ROut: The services this layer provides - * - E: The possible errors during layer construction - * - RIn: The services this layer requires as dependencies + * **When to use** + * + * Use to model construction of application services for dependency injection, + * especially when services have dependencies, can fail during construction, or + * need scoped setup and release. + * + * **Details** + * + * A `Layer` represents `ROut` as the services this layer + * provides, `E` as the possible errors during layer construction, and `RIn` as + * the services this layer requires as dependencies. * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface Layer extends Variance, Pipeable { [Unify.typeSymbol]?: unknown; @@ -48,8 +47,16 @@ export interface Layer extends Variance [Unify.ignoreSymbol]?: LayerUnifyIgnore; } /** - * @since 4.0.0 + * Type-level hook that allows `Layer` values to participate in `Unify` + * inference. + * + * **Details** + * + * This is used by Effect's pipe and unification machinery to preserve the + * provided services, error, and requirements of a `Layer`. + * * @category models + * @since 4.0.0 */ export interface LayerUnify A[Unify.typeSymbol] extends Layer | infer _ ? Layer>, Error>, Services>> : never; } /** - * @since 4.0.0 + * Type-level marker used by `Unify` for `Layer` types that should be ignored + * during unification. + * * @category models + * @since 4.0.0 */ export interface LayerUnifyIgnore { } /** * The variance interface for Layer type parameters. * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface Variance { readonly [TypeId]: { @@ -76,13 +86,26 @@ export interface Variance { }; } /** - * A constraint interface for working with any Layer type. + * A type-level constraint for working with any `Layer` type. + * + * **When to use** * - * This interface is used to constrain generic types to Layer types - * without specifying exact type parameters. + * Use to constrain generic parameters or layer collections to any `Layer` + * value while preserving its provided, error, and required service types for + * inference. + * + * **Details** * + * This interface is used to constrain generic types to `Layer` values without + * specifying exact type parameters. + * + * @see {@link Layer} for the concrete layer interface + * @see {@link Services} for extracting required services from a layer type + * @see {@link Error} for extracting construction errors from a layer type + * @see {@link Success} for extracting provided services from a layer type + * + * @category utility types * @since 3.9.0 - * @category type-level */ export interface Any { readonly [TypeId]: { @@ -92,36 +115,64 @@ export interface Any { }; } /** - * Extracts the service dependencies (RIn) from a Layer type. + * Extracts the service requirements (`RIn`) from a `Layer` type. * - * @since 2.0.0 - * @category type-level + * **When to use** + * + * Use to derive the dependency requirements of a generic or inferred `Layer` + * without restating its `RIn` type parameter. + * + * @see {@link Success} for extracting the services provided by the same `Layer` + * @see {@link Error} for extracting the construction failure type from the same `Layer` + * + * @category utility types + * @since 4.0.0 */ export type Services = T extends infer L ? L extends Layer ? _RIn : never : never; /** - * Extracts the error type (E) from a Layer type. + * Extracts the error type (`E`) from a `Layer` type. * + * **When to use** + * + * Use to derive a layer construction error type for helper types, wrappers, or + * APIs that preserve a layer failure channel. + * + * @see {@link Success} for extracting the services provided by the same `Layer` + * @see {@link Services} for extracting the dependency requirements of the same `Layer` + * + * @category utility types * @since 2.0.0 - * @category type-level */ export type Error = T extends Layer ? _E : never; /** - * Extracts the service output type (ROut) from a Layer type. + * Extracts the service output type (`ROut`) from a `Layer` type. + * + * **When to use** * + * Use to derive the services provided by an existing or generic `Layer` without + * restating its `ROut` type parameter. + * + * @see {@link Error} for extracting the layer construction error type instead + * @see {@link Services} for extracting the layer input service requirements instead + * + * @category utility types * @since 2.0.0 - * @category type-level */ export type Success = T extends Layer ? _ROut : never; declare const MemoMapTypeId = "~effect/Layer/MemoMap"; /** - * A MemoMap is used to memoize layer construction and ensure sharing of layers. + * A `MemoMap` is used to memoize layer construction and ensure sharing of + * layers. + * + * **Details** * - * The MemoMap prevents duplicate construction of the same layer instance, + * The `MemoMap` prevents duplicate construction of the same layer instance, * enabling efficient resource sharing across layer dependencies. * - * @example + * **Example** (Sharing layer construction with a memo map) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -132,7 +183,7 @@ declare const MemoMapTypeId = "~effect/Layer/MemoMap"; * const memoMap = yield* Layer.makeMemoMap * const scope = yield* Effect.scope * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) * const context = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope) @@ -141,25 +192,27 @@ declare const MemoMapTypeId = "~effect/Layer/MemoMap"; * }) * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface MemoMap { readonly [MemoMapTypeId]: typeof MemoMapTypeId; + readonly get: (layer: Layer, scope: Scope.Scope) => Effect, E, RIn> | undefined; readonly getOrElseMemoize: (layer: Layer, scope: Scope.Scope, build: (memoMap: MemoMap, scope: Scope.Scope) => Effect, E, RIn>) => Effect, E, RIn>; } /** * Returns `true` if the specified value is a `Layer`, `false` otherwise. * - * @example + * **Example** (Checking whether a value is a layer) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) * const notALayer = { someProperty: "value" } @@ -168,19 +221,23 @@ export interface MemoMap { * console.log(Layer.isLayer(notALayer)) // false * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export declare const isLayer: (u: unknown) => u is Layer; /** - * Constructs a Layer from a function that uses a `MemoMap` and `Scope` to build the layer. + * Constructs a `Layer` from a function that uses a `MemoMap` and `Scope` to + * build the layer. + * + * **Details** * * The function receives a `MemoMap` for memoization and a `Scope` for resource management. * A child scope is created, and if the build fails, the child scope is closed. * - * @example + * **Example** (Constructing a layer from a build function) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -195,20 +252,23 @@ export declare const isLayer: (u: unknown) => u is Layer(build: (memoMap: MemoMap, scope: Scope.Scope) => Effect, E, RIn>) => Layer; /** - * Constructs a Layer from a function that uses a `MemoMap` and `Scope` to build the layer, - * with automatic memoization. + * Constructs a `Layer` from a function that uses a `MemoMap` and `Scope` to + * build the layer, with automatic memoization. + * + * **Details** * * This is similar to `fromBuild` but provides automatic memoization of the layer construction. * The layer will be memoized based on the provided `MemoMap`. * - * @example + * **Example** (Memoizing layer construction) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -223,16 +283,17 @@ export declare const fromBuild: (build: (memoMap: MemoMap, scope: * ) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export declare const fromBuildMemo: (build: (memoMap: MemoMap, scope: Scope.Scope) => Effect, E, RIn>) => Layer; /** - * Constructs a `MemoMap` that can be used to build additional layers. + * Constructs a `MemoMap` synchronously so it can be used to build additional layers. + * + * **Example** (Creating a memo map unsafely) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -243,7 +304,7 @@ export declare const fromBuildMemo: (build: (memoMap: MemoMap, sco * const memoMap = Layer.makeMemoMapUnsafe() * const scope = yield* Effect.scope * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) * const context = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope) @@ -252,16 +313,35 @@ export declare const fromBuildMemo: (build: (memoMap: MemoMap, sco * }) * ``` * - * @since 4.0.0 * @category memo map + * @since 4.0.0 */ export declare const makeMemoMapUnsafe: () => MemoMap; /** - * Constructs a `MemoMap` that can be used to build additional layers. + * Constructs a child `MemoMap` synchronously, allowing it to reuse layers + * already memoized in the parent while isolating any new layer allocations to + * the child map. + * + * **When to use** + * + * Use to synchronously fork a memo map for manual layer building when child + * builds should see parent memoized layers without writing newly built layers + * back to the parent. + * + * @see {@link forkMemoMap} for allocating the child memo map inside `Effect` + * @see {@link makeMemoMapUnsafe} for creating a root memo map without a parent + * + * @category memo map + * @since 4.0.0 + */ +export declare const forkMemoMapUnsafe: (parent: MemoMap) => MemoMap; +/** + * Constructs a `MemoMap` effectfully so it can be used to build additional layers. + * + * **Example** (Creating a memo map in an effect) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -272,7 +352,7 @@ export declare const makeMemoMapUnsafe: () => MemoMap; * const memoMap = yield* Layer.makeMemoMap * const scope = yield* Effect.scope * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) * const context = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope) @@ -281,19 +361,46 @@ export declare const makeMemoMapUnsafe: () => MemoMap; * }) * ``` * - * @since 2.0.0 * @category memo map + * @since 2.0.0 */ export declare const makeMemoMap: Effect; +/** + * Constructs a child `MemoMap` effectfully, allowing it to reuse layers already + * memoized in the parent while isolating any new layer allocations to the child + * map. + * + * **When to use** + * + * Use when a layer build should inherit already memoized layers from an + * existing `MemoMap` while keeping newly memoized layers out of the parent map. + * + * @see {@link makeMemoMap} for creating a root memo map in an `Effect` + * @see {@link forkMemoMapUnsafe} for the synchronous constructor variant + * @see {@link buildWithMemoMap} for building layers with an explicit memo map + * + * @category memo map + * @since 4.0.0 + */ +export declare const forkMemoMap: (parent: MemoMap) => Effect; declare const CurrentMemoMap_base: Context.ServiceClass; /** - * A service reference for the current `MemoMap` used in layer construction. + * Context service for the current `MemoMap` used in layer construction. * - * This service provides access to the current memoization map during layer building, - * allowing layers to share memoized results. + * **When to use** + * + * Use when building custom layer operations that need to access the current + * memoization map from the fiber context. + * + * **Details** + * + * This service wraps a `MemoMap` as a `Context.Service`, making it available + * for dependency injection during layer construction. + * + * @see {@link MemoMap} the memoization map type wrapped by this service * - * @since 3.13.0 * @category models + * @since 3.13.0 */ export declare class CurrentMemoMap extends CurrentMemoMap_base { static getOrCreate: (self: Context.Context) => MemoMap; @@ -302,9 +409,10 @@ export declare class CurrentMemoMap extends CurrentMemoMap_base { * Builds a layer into an `Effect` value, using the specified `MemoMap` to memoize * the layer construction. * - * @example + * **Example** (Building layers with an explicit memo map) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -320,13 +428,13 @@ export declare class CurrentMemoMap extends CurrentMemoMap_base { * const scope = yield* Effect.scope * * // Build database layer with memoization - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) * const dbContext = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope) * * // Build logger layer with same memoization (reuses memo if same layer) - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg))) * }) * const loggerContext = yield* Layer.buildWithMemoMap( @@ -342,17 +450,18 @@ export declare class CurrentMemoMap extends CurrentMemoMap_base { * }) * ``` * - * @since 2.0.0 * @category memo map + * @since 2.0.0 */ export declare const buildWithMemoMap: { /** * Builds a layer into an `Effect` value, using the specified `MemoMap` to memoize * the layer construction. * - * @example + * **Example** (Building layers with an explicit memo map) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -368,13 +477,13 @@ export declare const buildWithMemoMap: { * const scope = yield* Effect.scope * * // Build database layer with memoization - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) * const dbContext = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope) * * // Build logger layer with same memoization (reuses memo if same layer) - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg))) * }) * const loggerContext = yield* Layer.buildWithMemoMap( @@ -390,17 +499,18 @@ export declare const buildWithMemoMap: { * }) * ``` * - * @since 2.0.0 * @category memo map + * @since 2.0.0 */ (memoMap: MemoMap, scope: Scope.Scope): (self: Layer) => Effect, E, RIn>; /** * Builds a layer into an `Effect` value, using the specified `MemoMap` to memoize * the layer construction. * - * @example + * **Example** (Building layers with an explicit memo map) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -416,13 +526,13 @@ export declare const buildWithMemoMap: { * const scope = yield* Effect.scope * * // Build database layer with memoization - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) * const dbContext = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope) * * // Build logger layer with same memoization (reuses memo if same layer) - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg))) * }) * const loggerContext = yield* Layer.buildWithMemoMap( @@ -438,17 +548,18 @@ export declare const buildWithMemoMap: { * }) * ``` * - * @since 2.0.0 * @category memo map + * @since 2.0.0 */ (self: Layer, memoMap: MemoMap, scope: Scope.Scope): Effect, E, RIn>; }; /** * Builds a layer into a scoped value. * - * @example + * **Example** (Building a layer into a context) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -456,7 +567,7 @@ export declare const buildWithMemoMap: { * * // Build a layer to get its services * const program = Effect.gen(function*() { - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) * @@ -470,20 +581,27 @@ export declare const buildWithMemoMap: { * }) * ``` * - * @since 2.0.0 * @category destructors + * @since 2.0.0 */ export declare const build: (self: Layer) => Effect, E, RIn | Scope.Scope>; /** - * Builds a layer into an `Effect` value. Any resources associated with this - * layer will be released when the specified scope is closed unless their scope - * has been extended. This allows building layers where the lifetime of some of - * the services output by the layer exceed the lifetime of the effect the - * layer is provided to. + * Builds a layer using an explicit scope. + * + * **When to use** + * + * Use to control the lifetime of layer resources with a scope supplied by the + * caller. + * + * **Details** + * + * Resources created by the layer are released when the supplied scope is + * closed, unless a resource extends its own scope. + * + * **Example** (Building a layer with an explicit scope) * - * @example * ```ts - * import { Effect, Layer, Scope, Context } from "effect" + * import { Context, Effect, Layer, Scope } from "effect" * * class Database extends Context.Service Effect.Effect @@ -493,7 +611,7 @@ export declare const build: (self: Layer) => Effect< * const program = Effect.gen(function*() { * const scope = yield* Effect.scope * - * const dbLayer = Layer.effect(Database)(Effect.gen(function*() { + * const dbLayer = Layer.effect(Database, Effect.gen(function*() { * console.log("Initializing database...") * yield* Scope.addFinalizer( * scope, @@ -511,20 +629,27 @@ export declare const build: (self: Layer) => Effect< * }) * ``` * - * @since 2.0.0 * @category destructors + * @since 2.0.0 */ export declare const buildWithScope: { /** - * Builds a layer into an `Effect` value. Any resources associated with this - * layer will be released when the specified scope is closed unless their scope - * has been extended. This allows building layers where the lifetime of some of - * the services output by the layer exceed the lifetime of the effect the - * layer is provided to. + * Builds a layer using an explicit scope. + * + * **When to use** + * + * Use to control the lifetime of layer resources with a scope supplied by the + * caller. + * + * **Details** + * + * Resources created by the layer are released when the supplied scope is + * closed, unless a resource extends its own scope. + * + * **Example** (Building a layer with an explicit scope) * - * @example * ```ts - * import { Effect, Layer, Scope, Context } from "effect" + * import { Context, Effect, Layer, Scope } from "effect" * * class Database extends Context.Service Effect.Effect @@ -534,7 +659,7 @@ export declare const buildWithScope: { * const program = Effect.gen(function*() { * const scope = yield* Effect.scope * - * const dbLayer = Layer.effect(Database)(Effect.gen(function*() { + * const dbLayer = Layer.effect(Database, Effect.gen(function*() { * console.log("Initializing database...") * yield* Scope.addFinalizer( * scope, @@ -552,20 +677,27 @@ export declare const buildWithScope: { * }) * ``` * - * @since 2.0.0 * @category destructors + * @since 2.0.0 */ (scope: Scope.Scope): (self: Layer) => Effect, E, RIn>; /** - * Builds a layer into an `Effect` value. Any resources associated with this - * layer will be released when the specified scope is closed unless their scope - * has been extended. This allows building layers where the lifetime of some of - * the services output by the layer exceed the lifetime of the effect the - * layer is provided to. + * Builds a layer using an explicit scope. + * + * **When to use** + * + * Use to control the lifetime of layer resources with a scope supplied by the + * caller. + * + * **Details** + * + * Resources created by the layer are released when the supplied scope is + * closed, unless a resource extends its own scope. + * + * **Example** (Building a layer with an explicit scope) * - * @example * ```ts - * import { Effect, Layer, Scope, Context } from "effect" + * import { Context, Effect, Layer, Scope } from "effect" * * class Database extends Context.Service Effect.Effect @@ -575,7 +707,7 @@ export declare const buildWithScope: { * const program = Effect.gen(function*() { * const scope = yield* Effect.scope * - * const dbLayer = Layer.effect(Database)(Effect.gen(function*() { + * const dbLayer = Layer.effect(Database, Effect.gen(function*() { * console.log("Initializing database...") * yield* Scope.addFinalizer( * scope, @@ -593,151 +725,117 @@ export declare const buildWithScope: { * }) * ``` * - * @since 2.0.0 * @category destructors + * @since 2.0.0 */ (self: Layer, scope: Scope.Scope): Effect, E, RIn>; }; /** - * Constructs a layer from the specified value. + * Constructs a layer that provides a single service from an already available + * value. + * + * **When to use** + * + * Use when you need a `Layer` that provides a service from an already + * constructed implementation without effectful acquisition. + * + * **Example** (Creating a layer from a service implementation) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * class Logger extends Context.Service Effect.Effect - * }>()("Logger") {} - * - * // Create layers from concrete service implementations - * const databaseLayer = Layer.succeed(Database)({ + * const DatabaseLive = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Query result: ${sql}`)) * }) - * - * const loggerLayer = Layer.succeed(Logger)({ - * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) - * }) - * - * // Use the layers in a program - * const program = Effect.gen(function*() { - * const database = yield* Database - * const logger = yield* Logger - * - * yield* logger.log("Starting database query") - * const result = yield* database.query("SELECT * FROM users") - * yield* logger.log(`Query completed: ${result}`) - * - * return result - * }).pipe( - * Effect.provide(Layer.mergeAll(databaseLayer, loggerLayer)) - * ) * ``` * - * @since 2.0.0 + * @see {@link sync} for constructing layers from lazy values + * * @category constructors + * @since 2.0.0 */ export declare const succeed: { /** - * Constructs a layer from the specified value. + * Constructs a layer that provides a single service from an already available + * value. + * + * **When to use** + * + * Use when you need a `Layer` that provides a service from an already + * constructed implementation without effectful acquisition. + * + * **Example** (Creating a layer from a service implementation) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * class Logger extends Context.Service Effect.Effect - * }>()("Logger") {} - * - * // Create layers from concrete service implementations - * const databaseLayer = Layer.succeed(Database)({ + * const DatabaseLive = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Query result: ${sql}`)) * }) - * - * const loggerLayer = Layer.succeed(Logger)({ - * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) - * }) - * - * // Use the layers in a program - * const program = Effect.gen(function*() { - * const database = yield* Database - * const logger = yield* Logger - * - * yield* logger.log("Starting database query") - * const result = yield* database.query("SELECT * FROM users") - * yield* logger.log(`Query completed: ${result}`) - * - * return result - * }).pipe( - * Effect.provide(Layer.mergeAll(databaseLayer, loggerLayer)) - * ) * ``` * - * @since 2.0.0 + * @see {@link sync} for constructing layers from lazy values + * * @category constructors + * @since 2.0.0 */ (service: Context.Key): (resource: S) => Layer; /** - * Constructs a layer from the specified value. + * Constructs a layer that provides a single service from an already available + * value. + * + * **When to use** + * + * Use when you need a `Layer` that provides a service from an already + * constructed implementation without effectful acquisition. + * + * **Example** (Creating a layer from a service implementation) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * class Logger extends Context.Service Effect.Effect - * }>()("Logger") {} - * - * // Create layers from concrete service implementations - * const databaseLayer = Layer.succeed(Database)({ + * const DatabaseLive = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Query result: ${sql}`)) * }) - * - * const loggerLayer = Layer.succeed(Logger)({ - * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) - * }) - * - * // Use the layers in a program - * const program = Effect.gen(function*() { - * const database = yield* Database - * const logger = yield* Logger - * - * yield* logger.log("Starting database query") - * const result = yield* database.query("SELECT * FROM users") - * yield* logger.log(`Query completed: ${result}`) - * - * return result - * }).pipe( - * Effect.provide(Layer.mergeAll(databaseLayer, loggerLayer)) - * ) * ``` * - * @since 2.0.0 + * @see {@link sync} for constructing layers from lazy values + * * @category constructors + * @since 2.0.0 */ (service: Context.Key, resource: Types.NoInfer): Layer; }; /** - * Constructs a layer from the specified value, which must return one or more - * services. + * Constructs a layer that provides all services in an already available + * `Context`. + * + * **When to use** + * + * Use when you need a `Layer` built from an existing `Context`, including when + * you need to provide multiple services at once. * - * This is a more general version of `succeed` that allows you to provide multiple - * services at once through a `Context`. + * **Details** + * + * This is a more general version of `succeed` that allows you to provide + * multiple services at once through a `Context`. + * + * **Example** (Providing multiple services from a context) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -758,107 +856,155 @@ export declare const succeed: { * const layer = Layer.succeedContext(context) * ``` * - * @since 2.0.0 + * @see {@link succeed} for providing a single service from a value + * * @category constructors + * @since 2.0.0 */ export declare const succeedContext: (context: Context.Context) => Layer; /** - * A Layer that constructs an empty Context. + * An empty layer that provides no services, cannot fail, has no requirements, + * and performs no construction or finalization work. + * + * **When to use** + * + * Use as the no-op branch when conditionally composing layers. * - * This layer provides no services and can be used as a neutral element - * in layer composition or as a starting point for building layers. + * **Example** (Disabling optional lifecycle work) * - * @example * ```ts - * import { Layer } from "effect" + * import { Console, Layer } from "effect" + * + * declare const flag: boolean * - * const emptyLayer = Layer.empty + * const StartupLogLive = flag + * ? Layer.effectDiscard(Console.log("application starting")) + * : Layer.empty * ``` * - * @since 2.0.0 + * @see {@link effectDiscard} for running an effect while providing no services + * * @category constructors + * @since 2.0.0 */ export declare const empty: Layer; /** - * Lazily constructs a layer from the specified value. + * Constructs a layer lazily that provides a single service. + * + * **When to use** + * + * Use when you need a `Layer` that provides one service whose value is created + * synchronously, but creation should be deferred until the layer is built. + * + * **Details** * * This is a lazy version of `succeed` where the service value is computed * synchronously only when the layer is built. * - * @example + * **Example** (Lazily providing a service) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * const layer = Layer.sync(Database)(() => ({ + * const layer = Layer.sync(Database, () => ({ * query: (sql: string) => Effect.succeed(`Query: ${sql}`) * })) * ``` * - * @since 2.0.0 + * @see {@link succeed} for constructing layers from static values + * * @category constructors + * @since 2.0.0 */ export declare const sync: { /** - * Lazily constructs a layer from the specified value. + * Constructs a layer lazily that provides a single service. + * + * **When to use** + * + * Use when you need a `Layer` that provides one service whose value is created + * synchronously, but creation should be deferred until the layer is built. + * + * **Details** * * This is a lazy version of `succeed` where the service value is computed * synchronously only when the layer is built. * - * @example + * **Example** (Lazily providing a service) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * const layer = Layer.sync(Database)(() => ({ + * const layer = Layer.sync(Database, () => ({ * query: (sql: string) => Effect.succeed(`Query: ${sql}`) * })) * ``` * - * @since 2.0.0 + * @see {@link succeed} for constructing layers from static values + * * @category constructors + * @since 2.0.0 */ (service: Context.Key): (evaluate: LazyArg) => Layer; /** - * Lazily constructs a layer from the specified value. + * Constructs a layer lazily that provides a single service. + * + * **When to use** + * + * Use when you need a `Layer` that provides one service whose value is created + * synchronously, but creation should be deferred until the layer is built. + * + * **Details** * * This is a lazy version of `succeed` where the service value is computed * synchronously only when the layer is built. * - * @example + * **Example** (Lazily providing a service) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * const layer = Layer.sync(Database)(() => ({ + * const layer = Layer.sync(Database, () => ({ * query: (sql: string) => Effect.succeed(`Query: ${sql}`) * })) * ``` * - * @since 2.0.0 + * @see {@link succeed} for constructing layers from static values + * * @category constructors + * @since 2.0.0 */ (service: Context.Key, evaluate: LazyArg>): Layer; }; /** - * Lazily constructs a layer from the specified value, which must return one or more - * services. + * Constructs a layer lazily that provides all services in a `Context`. + * + * **When to use** * - * This is a lazy version of `succeedContext` where the Context is computed + * Use when you need a `Layer` that creates multiple services synchronously but + * defers that work until the layer is built. + * + * **Details** + * + * This is a lazy version of `succeedContext` where the `Context` is computed * synchronously only when the layer is built. * - * @example + * **Example** (Lazily providing a context) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -871,117 +1017,143 @@ export declare const sync: { * ) * ``` * - * @since 2.0.0 + * @see {@link sync} for lazily providing a single service + * @see {@link succeedContext} for providing an already available context + * * @category constructors + * @since 2.0.0 */ export declare const syncContext: (evaluate: LazyArg>) => Layer; /** - * Constructs a layer from the specified scoped effect. + * Constructs a layer from an effect that produces a single service. * - * This allows you to create a Layer from an Effect that produces a service. - * The Effect is executed in the scope of the layer, allowing for proper - * resource management. + * **When to use** + * + * Use when you need to construct a `Layer`-provided service with an `Effect`, + * dependencies, or scoped resource acquisition. * - * **Previously Known As** + * **Details** * - * This API replaces the following from Effect 3.x: + * This allows you to create a `Layer` from an `Effect` that produces a service. + * The `Effect` is executed in the scope of the layer, allowing for proper + * resource management. * - * - `Layer.scoped` + * **Example** (Creating a layer from an effect) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * const layer = Layer.effect(Database)( + * const layer = Layer.effect(Database, * Effect.sync(() => ({ * query: (sql: string) => Effect.succeed(`Query: ${sql}`) * })) * ) * ``` * - * @since 2.0.0 + * @see {@link effectContext} for effectfully providing multiple services + * @see {@link effectDiscard} for running construction work without providing services + * * @category constructors + * @since 2.0.0 */ export declare const effect: { /** - * Constructs a layer from the specified scoped effect. + * Constructs a layer from an effect that produces a single service. * - * This allows you to create a Layer from an Effect that produces a service. - * The Effect is executed in the scope of the layer, allowing for proper - * resource management. + * **When to use** * - * **Previously Known As** + * Use when you need to construct a `Layer`-provided service with an `Effect`, + * dependencies, or scoped resource acquisition. * - * This API replaces the following from Effect 3.x: + * **Details** * - * - `Layer.scoped` + * This allows you to create a `Layer` from an `Effect` that produces a service. + * The `Effect` is executed in the scope of the layer, allowing for proper + * resource management. + * + * **Example** (Creating a layer from an effect) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * const layer = Layer.effect(Database)( + * const layer = Layer.effect(Database, * Effect.sync(() => ({ * query: (sql: string) => Effect.succeed(`Query: ${sql}`) * })) * ) * ``` * - * @since 2.0.0 + * @see {@link effectContext} for effectfully providing multiple services + * @see {@link effectDiscard} for running construction work without providing services + * * @category constructors + * @since 2.0.0 */ (service: Context.Key): (effect: Effect) => Layer>; /** - * Constructs a layer from the specified scoped effect. + * Constructs a layer from an effect that produces a single service. * - * This allows you to create a Layer from an Effect that produces a service. - * The Effect is executed in the scope of the layer, allowing for proper - * resource management. + * **When to use** * - * **Previously Known As** + * Use when you need to construct a `Layer`-provided service with an `Effect`, + * dependencies, or scoped resource acquisition. + * + * **Details** * - * This API replaces the following from Effect 3.x: + * This allows you to create a `Layer` from an `Effect` that produces a service. + * The `Effect` is executed in the scope of the layer, allowing for proper + * resource management. * - * - `Layer.scoped` + * **Example** (Creating a layer from an effect) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * const layer = Layer.effect(Database)( + * const layer = Layer.effect(Database, * Effect.sync(() => ({ * query: (sql: string) => Effect.succeed(`Query: ${sql}`) * })) * ) * ``` * - * @since 2.0.0 + * @see {@link effectContext} for effectfully providing multiple services + * @see {@link effectDiscard} for running construction work without providing services + * * @category constructors + * @since 2.0.0 */ (service: Context.Key, effect: Effect, E, R>): Layer>; }; /** - * Constructs a layer from the specified scoped effect, which must return one - * or more services. + * Constructs a layer from an effect that produces all services in a `Context`. * - * This allows you to create a Layer from an effectful computation that returns - * multiple services. The Effect is executed in the scope of the layer. + * **When to use** + * + * Use when you need a `Layer` that effectfully constructs a `Context` with + * multiple services. + * + * **Details** + * + * This allows you to create a `Layer` from an effectful computation that + * returns multiple services. The `Effect` is executed in the scope of the + * layer. + * + * **Example** (Creating a layer from an effectful context) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service< * Database, @@ -995,23 +1167,23 @@ export declare const effect: { * ) * ``` * - * @since 2.0.0 + * @see {@link effect} for effectfully providing a single service + * * @category constructors + * @since 2.0.0 */ export declare const effectContext: (effect: Effect, E, R>) => Layer>; /** - * Constructs a layer from the specified scoped effect. - * - * This is useful when you want to run an Effect for its side effects during - * layer construction, but don't need to provide any services. + * Constructs a layer from an effect, discarding its value and providing no + * services. * - * **Previously Known As** + * **When to use** * - * This API replaces the following from Effect 3.x: + * Use when layer construction should run an Effect for its side effects while providing no + * services. * - * - `Layer.scopedDiscard` + * **Example** (Running an effect during layer construction) * - * @example * ```ts * import { Effect, Layer } from "effect" * @@ -1022,19 +1194,24 @@ export declare const effectContext: (effect: Effect, * ) * ``` * - * @since 2.0.0 + * @see {@link empty} for a no-op layer that performs no construction work + * * @category constructors + * @since 2.0.0 */ export declare const effectDiscard: (effect: Effect) => Layer>; /** - * Lazily constructs a layer using the specified factory. + * Constructs a layer lazily using the specified factory. + * + * **Details** * * The factory is evaluated only when the suspended layer is first built, and * the result is memoized with normal layer sharing semantics. * - * @example + * **Example** (Choosing a layer lazily) + * * ```ts - * import { Layer, Context } from "effect" + * import { Context, Layer } from "effect" * * class Config extends Context.Service()("Config") {} * @@ -1042,50 +1219,68 @@ export declare const effectDiscard: (effect: Effect) => Layer< * * const layer = Layer.suspend(() => * useProd - * ? Layer.succeed(Config)("https://api.example.com") - * : Layer.succeed(Config)("http://localhost:3000") + * ? Layer.succeed(Config, "https://api.example.com") + * : Layer.succeed(Config, "http://localhost:3000") * ) * ``` * - * @since 4.0.0 * @category constructors + * @since 2.0.0 */ export declare const suspend: (evaluate: LazyArg>) => Layer; /** - * Unwraps a Layer from an Effect, flattening the nested structure. + * Unwraps a `Layer` from an `Effect`, flattening the nested structure. + * + * **When to use** + * + * Use when you have an `Effect` that produces a `Layer` and you want to + * use that layer directly. + * + * **Details** + * + * The resulting Layer will have the combined error and dependency types from + * both the outer Effect and the inner Layer. * - * This is useful when you have an Effect that produces a Layer, and you want to - * use that Layer directly. The resulting Layer will have the combined error and - * dependency types from both the outer Effect and the inner Layer. + * **Example** (Unwrapping an effectful layer) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * * const layerEffect = Effect.succeed( - * Layer.succeed(Database)({ query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) }) + * Layer.succeed(Database, { query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) }) * ) * * const unwrappedLayer = Layer.unwrap(layerEffect) * ``` * + * @category converting * @since 4.0.0 - * @category utils */ export declare const unwrap: (self: Effect, E, R>) => Layer>; /** - * Combines all the provided layers concurrently, creating a new layer with merged input, error, and output types. + * Combines all the provided layers concurrently, creating a new layer with + * merged input, error, and output types. + * + * **When to use** + * + * Use when you need to combine multiple independent layers. + * + * **Details** * * All layers are built concurrently, and their outputs are merged into a single layer. - * This is useful when you need to combine multiple independent layers. * - * @example + * If multiple merged layers depend on the same layer value, that dependency is + * shared by default. Reuse a named layer value when you want services to share + * the same resource, such as one database pool. + * + * **Example** (Merging independent layers) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1095,29 +1290,41 @@ export declare const unwrap: (self: Effect, E, * readonly log: (msg: string) => Effect.Effect * }>()("Logger") {} * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg))) * }) * * const mergedLayer = Layer.mergeAll(dbLayer, loggerLayer) * ``` * - * @since 2.0.0 + * @see {@link merge} for merging one layer with another layer or array + * * @category zipping + * @since 2.0.0 */ export declare const mergeAll: , ...Array>]>(...layers: Layers) => Layer, Error, Services>; /** - * Merges this layer with the specified layer concurrently, producing a new layer with combined input and output types. + * Merges this layer with another layer concurrently, producing a new layer with + * combined input, error, and output types. * - * This is a binary version of `mergeAll` that merges exactly two layers or one layer with an array of layers. - * The layers are built concurrently and their outputs are combined. + * **When to use** + * + * Use to combine an existing `Layer` with another `Layer` or an array of + * layers while preserving pipeline style. + * + * **Details** + * + * This is a binary version of `mergeAll` that merges exactly two layers or one + * layer with an array of layers. The layers are built concurrently and their + * outputs are combined. + * + * **Example** (Merging two layers) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1127,29 +1334,41 @@ export declare const mergeAll: , ...Array * readonly log: (msg: string) => Effect.Effect * }>()("Logger") {} * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg))) * }) * * const mergedLayer = Layer.merge(dbLayer, loggerLayer) * ``` * - * @since 2.0.0 + * @see {@link mergeAll} for merging several layers at once + * * @category zipping + * @since 2.0.0 */ export declare const merge: { /** - * Merges this layer with the specified layer concurrently, producing a new layer with combined input and output types. + * Merges this layer with another layer concurrently, producing a new layer with + * combined input, error, and output types. * - * This is a binary version of `mergeAll` that merges exactly two layers or one layer with an array of layers. - * The layers are built concurrently and their outputs are combined. + * **When to use** + * + * Use to combine an existing `Layer` with another `Layer` or an array of + * layers while preserving pipeline style. + * + * **Details** + * + * This is a binary version of `mergeAll` that merges exactly two layers or one + * layer with an array of layers. The layers are built concurrently and their + * outputs are combined. + * + * **Example** (Merging two layers) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1159,29 +1378,41 @@ export declare const merge: { * readonly log: (msg: string) => Effect.Effect * }>()("Logger") {} * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg))) * }) * * const mergedLayer = Layer.merge(dbLayer, loggerLayer) * ``` * - * @since 2.0.0 + * @see {@link mergeAll} for merging several layers at once + * * @category zipping + * @since 2.0.0 */ (that: Layer): (self: Layer) => Layer; /** - * Merges this layer with the specified layer concurrently, producing a new layer with combined input and output types. + * Merges this layer with another layer concurrently, producing a new layer with + * combined input, error, and output types. * - * This is a binary version of `mergeAll` that merges exactly two layers or one layer with an array of layers. - * The layers are built concurrently and their outputs are combined. + * **When to use** + * + * Use to combine an existing `Layer` with another `Layer` or an array of + * layers while preserving pipeline style. + * + * **Details** + * + * This is a binary version of `mergeAll` that merges exactly two layers or one + * layer with an array of layers. The layers are built concurrently and their + * outputs are combined. + * + * **Example** (Merging two layers) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1191,29 +1422,41 @@ export declare const merge: { * readonly log: (msg: string) => Effect.Effect * }>()("Logger") {} * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg))) * }) * * const mergedLayer = Layer.merge(dbLayer, loggerLayer) * ``` * - * @since 2.0.0 + * @see {@link mergeAll} for merging several layers at once + * * @category zipping + * @since 2.0.0 */ ]>(that: Layers): (self: Layer) => Layer, E | Error, Services | R>; /** - * Merges this layer with the specified layer concurrently, producing a new layer with combined input and output types. + * Merges this layer with another layer concurrently, producing a new layer with + * combined input, error, and output types. + * + * **When to use** * - * This is a binary version of `mergeAll` that merges exactly two layers or one layer with an array of layers. - * The layers are built concurrently and their outputs are combined. + * Use to combine an existing `Layer` with another `Layer` or an array of + * layers while preserving pipeline style. + * + * **Details** + * + * This is a binary version of `mergeAll` that merges exactly two layers or one + * layer with an array of layers. The layers are built concurrently and their + * outputs are combined. + * + * **Example** (Merging two layers) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1223,29 +1466,41 @@ export declare const merge: { * readonly log: (msg: string) => Effect.Effect * }>()("Logger") {} * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg))) * }) * * const mergedLayer = Layer.merge(dbLayer, loggerLayer) * ``` * - * @since 2.0.0 + * @see {@link mergeAll} for merging several layers at once + * * @category zipping + * @since 2.0.0 */ (self: Layer, that: Layer): Layer; /** - * Merges this layer with the specified layer concurrently, producing a new layer with combined input and output types. + * Merges this layer with another layer concurrently, producing a new layer with + * combined input, error, and output types. + * + * **When to use** + * + * Use to combine an existing `Layer` with another `Layer` or an array of + * layers while preserving pipeline style. + * + * **Details** + * + * This is a binary version of `mergeAll` that merges exactly two layers or one + * layer with an array of layers. The layers are built concurrently and their + * outputs are combined. * - * This is a binary version of `mergeAll` that merges exactly two layers or one layer with an array of layers. - * The layers are built concurrently and their outputs are combined. + * **Example** (Merging two layers) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1255,29 +1510,40 @@ export declare const merge: { * readonly log: (msg: string) => Effect.Effect * }>()("Logger") {} * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg))) * }) * * const mergedLayer = Layer.merge(dbLayer, loggerLayer) * ``` * - * @since 2.0.0 + * @see {@link mergeAll} for merging several layers at once + * * @category zipping + * @since 2.0.0 */ ]>(self: Layer, that: Layers): Layer, E | Error, Services | R>; }; /** - * Feeds the output services of this builder into the input of the specified - * builder, resulting in a new builder with the inputs of this builder as - * well as any leftover inputs, and the outputs of the specified builder. + * Feeds the output services of the dependency layer into the requirements of + * this layer, returning a layer that only provides the services from this layer. + * + * **When to use** + * + * Use when you need to hide an implementation dependency layer from callers. + * + * **Details** + * + * In `serviceLayer.pipe(Layer.provide(dependencyLayer))`, the dependency layer is + * built first and is used to satisfy the requirements of `serviceLayer`. + * + * **Example** (Providing layer dependencies) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1295,16 +1561,16 @@ export declare const merge: { * }>()("Logger") {} * * // Create dependency layers - * const databaseLayer = Layer.succeed(Database)({ + * const databaseLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`)) * }) * - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) * }) * * // UserService depends on Database and Logger - * const userServiceLayer = Layer.effect(UserService)(Effect.gen(function*() { + * const userServiceLayer = Layer.effect(UserService, Effect.gen(function*() { * const database = yield* Database * const logger = yield* Logger * @@ -1333,18 +1599,29 @@ export declare const merge: { * ) * ``` * + * @see {@link provideMerge} for retaining the dependency services + * + * @category providing services * @since 2.0.0 - * @category utils */ export declare const provide: { /** - * Feeds the output services of this builder into the input of the specified - * builder, resulting in a new builder with the inputs of this builder as - * well as any leftover inputs, and the outputs of the specified builder. + * Feeds the output services of the dependency layer into the requirements of + * this layer, returning a layer that only provides the services from this layer. + * + * **When to use** + * + * Use when you need to hide an implementation dependency layer from callers. + * + * **Details** + * + * In `serviceLayer.pipe(Layer.provide(dependencyLayer))`, the dependency layer is + * built first and is used to satisfy the requirements of `serviceLayer`. + * + * **Example** (Providing layer dependencies) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1362,16 +1639,16 @@ export declare const provide: { * }>()("Logger") {} * * // Create dependency layers - * const databaseLayer = Layer.succeed(Database)({ + * const databaseLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`)) * }) * - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) * }) * * // UserService depends on Database and Logger - * const userServiceLayer = Layer.effect(UserService)(Effect.gen(function*() { + * const userServiceLayer = Layer.effect(UserService, Effect.gen(function*() { * const database = yield* Database * const logger = yield* Logger * @@ -1400,18 +1677,29 @@ export declare const provide: { * ) * ``` * + * @see {@link provideMerge} for retaining the dependency services + * + * @category providing services * @since 2.0.0 - * @category utils */ (that: Layer): (self: Layer) => Layer>; /** - * Feeds the output services of this builder into the input of the specified - * builder, resulting in a new builder with the inputs of this builder as - * well as any leftover inputs, and the outputs of the specified builder. + * Feeds the output services of the dependency layer into the requirements of + * this layer, returning a layer that only provides the services from this layer. + * + * **When to use** + * + * Use when you need to hide an implementation dependency layer from callers. + * + * **Details** + * + * In `serviceLayer.pipe(Layer.provide(dependencyLayer))`, the dependency layer is + * built first and is used to satisfy the requirements of `serviceLayer`. + * + * **Example** (Providing layer dependencies) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1429,16 +1717,16 @@ export declare const provide: { * }>()("Logger") {} * * // Create dependency layers - * const databaseLayer = Layer.succeed(Database)({ + * const databaseLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`)) * }) * - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) * }) * * // UserService depends on Database and Logger - * const userServiceLayer = Layer.effect(UserService)(Effect.gen(function*() { + * const userServiceLayer = Layer.effect(UserService, Effect.gen(function*() { * const database = yield* Database * const logger = yield* Logger * @@ -1467,18 +1755,29 @@ export declare const provide: { * ) * ``` * + * @see {@link provideMerge} for retaining the dependency services + * + * @category providing services * @since 2.0.0 - * @category utils */ ]>(that: Layers): (self: Layer) => Layer, Services | Exclude>>; /** - * Feeds the output services of this builder into the input of the specified - * builder, resulting in a new builder with the inputs of this builder as - * well as any leftover inputs, and the outputs of the specified builder. + * Feeds the output services of the dependency layer into the requirements of + * this layer, returning a layer that only provides the services from this layer. + * + * **When to use** + * + * Use when you need to hide an implementation dependency layer from callers. + * + * **Details** + * + * In `serviceLayer.pipe(Layer.provide(dependencyLayer))`, the dependency layer is + * built first and is used to satisfy the requirements of `serviceLayer`. + * + * **Example** (Providing layer dependencies) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1496,16 +1795,16 @@ export declare const provide: { * }>()("Logger") {} * * // Create dependency layers - * const databaseLayer = Layer.succeed(Database)({ + * const databaseLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`)) * }) * - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) * }) * * // UserService depends on Database and Logger - * const userServiceLayer = Layer.effect(UserService)(Effect.gen(function*() { + * const userServiceLayer = Layer.effect(UserService, Effect.gen(function*() { * const database = yield* Database * const logger = yield* Logger * @@ -1534,18 +1833,29 @@ export declare const provide: { * ) * ``` * + * @see {@link provideMerge} for retaining the dependency services + * + * @category providing services * @since 2.0.0 - * @category utils */ (self: Layer, that: Layer): Layer>; /** - * Feeds the output services of this builder into the input of the specified - * builder, resulting in a new builder with the inputs of this builder as - * well as any leftover inputs, and the outputs of the specified builder. + * Feeds the output services of the dependency layer into the requirements of + * this layer, returning a layer that only provides the services from this layer. + * + * **When to use** + * + * Use when you need to hide an implementation dependency layer from callers. + * + * **Details** + * + * In `serviceLayer.pipe(Layer.provide(dependencyLayer))`, the dependency layer is + * built first and is used to satisfy the requirements of `serviceLayer`. + * + * **Example** (Providing layer dependencies) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1563,16 +1873,16 @@ export declare const provide: { * }>()("Logger") {} * * // Create dependency layers - * const databaseLayer = Layer.succeed(Database)({ + * const databaseLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`)) * }) * - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) * }) * * // UserService depends on Database and Logger - * const userServiceLayer = Layer.effect(UserService)(Effect.gen(function*() { + * const userServiceLayer = Layer.effect(UserService, Effect.gen(function*() { * const database = yield* Database * const logger = yield* Logger * @@ -1601,19 +1911,30 @@ export declare const provide: { * ) * ``` * + * @see {@link provideMerge} for retaining the dependency services + * + * @category providing services * @since 2.0.0 - * @category utils */ ]>(self: Layer, that: Layers): Layer, Services | Exclude>>; }; /** - * Feeds the output services of this layer into the input of the specified - * layer, resulting in a new layer with the inputs of this layer, and the - * outputs of both layers. + * Feeds the output services of the dependency layer into the requirements of + * this layer, returning a layer that provides both sets of services. + * + * **When to use** + * + * Use when you need to compose `Layer`s while keeping both the constructed + * service and the dependency used to build it available. + * + * **Details** + * + * Prefer {@link provide} when the dependency should stay private. + * + * **Example** (Providing dependencies while retaining services) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1631,16 +1952,16 @@ export declare const provide: { * }>()("UserService") {} * * // Create dependency layers - * const databaseLayer = Layer.succeed(Database)({ + * const databaseLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`)) * }) * - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) * }) * * // UserService depends on Database and Logger - * const userServiceLayer = Layer.effect(UserService)(Effect.gen(function*() { + * const userServiceLayer = Layer.effect(UserService, Effect.gen(function*() { * const database = yield* Database * const logger = yield* Logger * @@ -1675,18 +1996,29 @@ export declare const provide: { * ) * ``` * + * @see {@link provide} for keeping dependency services private + * + * @category providing services * @since 2.0.0 - * @category utils */ export declare const provideMerge: { /** - * Feeds the output services of this layer into the input of the specified - * layer, resulting in a new layer with the inputs of this layer, and the - * outputs of both layers. + * Feeds the output services of the dependency layer into the requirements of + * this layer, returning a layer that provides both sets of services. + * + * **When to use** + * + * Use when you need to compose `Layer`s while keeping both the constructed + * service and the dependency used to build it available. + * + * **Details** + * + * Prefer {@link provide} when the dependency should stay private. + * + * **Example** (Providing dependencies while retaining services) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1704,16 +2036,16 @@ export declare const provideMerge: { * }>()("UserService") {} * * // Create dependency layers - * const databaseLayer = Layer.succeed(Database)({ + * const databaseLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`)) * }) * - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) * }) * * // UserService depends on Database and Logger - * const userServiceLayer = Layer.effect(UserService)(Effect.gen(function*() { + * const userServiceLayer = Layer.effect(UserService, Effect.gen(function*() { * const database = yield* Database * const logger = yield* Logger * @@ -1748,18 +2080,29 @@ export declare const provideMerge: { * ) * ``` * + * @see {@link provide} for keeping dependency services private + * + * @category providing services * @since 2.0.0 - * @category utils */ (that: Layer): (self: Layer) => Layer>; /** - * Feeds the output services of this layer into the input of the specified - * layer, resulting in a new layer with the inputs of this layer, and the - * outputs of both layers. + * Feeds the output services of the dependency layer into the requirements of + * this layer, returning a layer that provides both sets of services. + * + * **When to use** + * + * Use when you need to compose `Layer`s while keeping both the constructed + * service and the dependency used to build it available. + * + * **Details** + * + * Prefer {@link provide} when the dependency should stay private. + * + * **Example** (Providing dependencies while retaining services) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1777,16 +2120,16 @@ export declare const provideMerge: { * }>()("UserService") {} * * // Create dependency layers - * const databaseLayer = Layer.succeed(Database)({ + * const databaseLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`)) * }) * - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) * }) * * // UserService depends on Database and Logger - * const userServiceLayer = Layer.effect(UserService)(Effect.gen(function*() { + * const userServiceLayer = Layer.effect(UserService, Effect.gen(function*() { * const database = yield* Database * const logger = yield* Logger * @@ -1821,18 +2164,29 @@ export declare const provideMerge: { * ) * ``` * + * @see {@link provide} for keeping dependency services private + * + * @category providing services * @since 2.0.0 - * @category utils */ ]>(that: Layers): (self: Layer) => Layer, E | Error, Services | Exclude>>; /** - * Feeds the output services of this layer into the input of the specified - * layer, resulting in a new layer with the inputs of this layer, and the - * outputs of both layers. + * Feeds the output services of the dependency layer into the requirements of + * this layer, returning a layer that provides both sets of services. + * + * **When to use** + * + * Use when you need to compose `Layer`s while keeping both the constructed + * service and the dependency used to build it available. + * + * **Details** + * + * Prefer {@link provide} when the dependency should stay private. + * + * **Example** (Providing dependencies while retaining services) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1850,16 +2204,16 @@ export declare const provideMerge: { * }>()("UserService") {} * * // Create dependency layers - * const databaseLayer = Layer.succeed(Database)({ + * const databaseLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`)) * }) * - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) * }) * * // UserService depends on Database and Logger - * const userServiceLayer = Layer.effect(UserService)(Effect.gen(function*() { + * const userServiceLayer = Layer.effect(UserService, Effect.gen(function*() { * const database = yield* Database * const logger = yield* Logger * @@ -1894,18 +2248,29 @@ export declare const provideMerge: { * ) * ``` * + * @see {@link provide} for keeping dependency services private + * + * @category providing services * @since 2.0.0 - * @category utils */ (self: Layer, that: Layer): Layer>; /** - * Feeds the output services of this layer into the input of the specified - * layer, resulting in a new layer with the inputs of this layer, and the - * outputs of both layers. + * Feeds the output services of the dependency layer into the requirements of + * this layer, returning a layer that provides both sets of services. + * + * **When to use** + * + * Use when you need to compose `Layer`s while keeping both the constructed + * service and the dependency used to build it available. + * + * **Details** + * + * Prefer {@link provide} when the dependency should stay private. + * + * **Example** (Providing dependencies while retaining services) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1923,16 +2288,16 @@ export declare const provideMerge: { * }>()("UserService") {} * * // Create dependency layers - * const databaseLayer = Layer.succeed(Database)({ + * const databaseLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`)) * }) * - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) * }) * * // UserService depends on Database and Logger - * const userServiceLayer = Layer.effect(UserService)(Effect.gen(function*() { + * const userServiceLayer = Layer.effect(UserService, Effect.gen(function*() { * const database = yield* Database * const logger = yield* Logger * @@ -1967,17 +2332,20 @@ export declare const provideMerge: { * ) * ``` * + * @see {@link provide} for keeping dependency services private + * + * @category providing services * @since 2.0.0 - * @category utils */ ]>(self: Layer, that: Layers): Layer, E | Error, Services | Exclude>>; }; /** * Constructs a layer dynamically based on the output of this layer. * - * @example + * **Example** (Creating services from layer output) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Config extends Context.Service()("Logger") {} * * // Base config layer - * const configLayer = Layer.succeed(Config)({ + * const configLayer = Layer.succeed(Config, { * dbUrl: "postgres://localhost:5432/mydb", * logLevel: "debug" * }) @@ -2004,7 +2372,7 @@ export declare const provideMerge: { * const config = Context.get(context, Config) * * // Create database layer based on config - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => * Effect.succeed( * `Querying ${config.dbUrl}: ${sql}` @@ -2012,7 +2380,7 @@ export declare const provideMerge: { * }) * * // Create logger layer based on config - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => * config.logLevel === "debug" * ? Effect.sync(() => console.log(`[DEBUG] ${msg}`)) @@ -2039,16 +2407,17 @@ export declare const provideMerge: { * ) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ export declare const flatMap: { /** * Constructs a layer dynamically based on the output of this layer. * - * @example + * **Example** (Creating services from layer output) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Config extends Context.Service()("Logger") {} * * // Base config layer - * const configLayer = Layer.succeed(Config)({ + * const configLayer = Layer.succeed(Config, { * dbUrl: "postgres://localhost:5432/mydb", * logLevel: "debug" * }) @@ -2075,7 +2444,7 @@ export declare const flatMap: { * const config = Context.get(context, Config) * * // Create database layer based on config - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => * Effect.succeed( * `Querying ${config.dbUrl}: ${sql}` @@ -2083,7 +2452,7 @@ export declare const flatMap: { * }) * * // Create logger layer based on config - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => * config.logLevel === "debug" * ? Effect.sync(() => console.log(`[DEBUG] ${msg}`)) @@ -2110,16 +2479,17 @@ export declare const flatMap: { * ) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ (f: (context: Context.Context) => Layer): (self: Layer) => Layer; /** * Constructs a layer dynamically based on the output of this layer. * - * @example + * **Example** (Creating services from layer output) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Config extends Context.Service()("Logger") {} * * // Base config layer - * const configLayer = Layer.succeed(Config)({ + * const configLayer = Layer.succeed(Config, { * dbUrl: "postgres://localhost:5432/mydb", * logLevel: "debug" * }) @@ -2146,7 +2516,7 @@ export declare const flatMap: { * const config = Context.get(context, Config) * * // Create database layer based on config - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => * Effect.succeed( * `Querying ${config.dbUrl}: ${sql}` @@ -2154,7 +2524,7 @@ export declare const flatMap: { * }) * * // Create logger layer based on config - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => * config.logLevel === "debug" * ? Effect.sync(() => console.log(`[DEBUG] ${msg}`)) @@ -2181,102 +2551,219 @@ export declare const flatMap: { * ) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ (self: Layer, f: (context: Context.Context) => Layer): Layer; }; /** * Performs the specified effect if this layer succeeds. * - * @since 4.0.0 + * **When to use** + * + * Use to run an effectful observation after a layer has been built + * successfully, such as logging or metrics, without changing the services the + * layer provides. + * + * **Details** + * + * The callback receives the services produced by this layer. Its result is + * discarded, and the original layer output is preserved. + * + * @see {@link tapError} for running an effect when layer construction fails with a typed error + * @see {@link tapCause} for running an effect when layer construction fails with any cause + * * @category sequencing + * @since 2.0.0 */ export declare const tap: { /** * Performs the specified effect if this layer succeeds. * - * @since 4.0.0 + * **When to use** + * + * Use to run an effectful observation after a layer has been built + * successfully, such as logging or metrics, without changing the services the + * layer provides. + * + * **Details** + * + * The callback receives the services produced by this layer. Its result is + * discarded, and the original layer output is preserved. + * + * @see {@link tapError} for running an effect when layer construction fails with a typed error + * @see {@link tapCause} for running an effect when layer construction fails with any cause + * * @category sequencing + * @since 2.0.0 */ (f: (context: Context.Context) => Effect): (self: Layer) => Layer>; /** * Performs the specified effect if this layer succeeds. * - * @since 4.0.0 + * **When to use** + * + * Use to run an effectful observation after a layer has been built + * successfully, such as logging or metrics, without changing the services the + * layer provides. + * + * **Details** + * + * The callback receives the services produced by this layer. Its result is + * discarded, and the original layer output is preserved. + * + * @see {@link tapError} for running an effect when layer construction fails with a typed error + * @see {@link tapCause} for running an effect when layer construction fails with any cause + * * @category sequencing + * @since 2.0.0 */ (self: Layer, f: (context: Context.Context) => Effect): Layer>; }; /** * Performs the specified effect if this layer fails. * - * @since 4.0.0 + * **When to use** + * + * Use to run logging, metrics, or other effects when layer construction fails + * while preserving the original typed error. + * + * **Details** + * + * The callback receives the typed error. If the callback succeeds, the layer + * still fails with the original error; if the callback fails, that failure is + * added to the layer's error type. + * + * @see {@link tap} for running an effect when layer construction succeeds + * @see {@link tapCause} for inspecting the full failure cause, including defects and interruption + * * @category sequencing + * @since 2.0.0 */ export declare const tapError: { /** * Performs the specified effect if this layer fails. * - * @since 4.0.0 + * **When to use** + * + * Use to run logging, metrics, or other effects when layer construction fails + * while preserving the original typed error. + * + * **Details** + * + * The callback receives the typed error. If the callback succeeds, the layer + * still fails with the original error; if the callback fails, that failure is + * added to the layer's error type. + * + * @see {@link tap} for running an effect when layer construction succeeds + * @see {@link tapCause} for inspecting the full failure cause, including defects and interruption + * * @category sequencing + * @since 2.0.0 */ (f: (e: XE) => Effect): (self: Layer) => Layer>; /** * Performs the specified effect if this layer fails. * - * @since 4.0.0 + * **When to use** + * + * Use to run logging, metrics, or other effects when layer construction fails + * while preserving the original typed error. + * + * **Details** + * + * The callback receives the typed error. If the callback succeeds, the layer + * still fails with the original error; if the callback fails, that failure is + * added to the layer's error type. + * + * @see {@link tap} for running an effect when layer construction succeeds + * @see {@link tapCause} for inspecting the full failure cause, including defects and interruption + * * @category sequencing + * @since 2.0.0 */ (self: Layer, f: (e: XE) => Effect): Layer>; }; /** - * Performs the specified effect if this layer fails. + * Performs the specified effect when this layer fails with any cause. + * + * **When to use** * - * **Previously Known As** + * Use to run diagnostics or reporting when layer construction fails and the + * full `Cause` is needed. * - * This API replaces the following from Effect 3.x: + * **Details** * - * - `Layer.tapErrorCause` + * The callback receives the layer's `Cause`, so it can inspect typed errors, + * defects, and interruption information. If the callback succeeds, the layer + * fails again with the original cause; if the callback fails, that failure is + * added to the layer's error type. + * + * @see {@link tapError} for observing only typed layer construction errors + * @see {@link catchCause} for recovering from a layer construction failure by switching to another layer * - * @since 4.0.0 * @category sequencing + * @since 4.0.0 */ export declare const tapCause: { /** - * Performs the specified effect if this layer fails. + * Performs the specified effect when this layer fails with any cause. + * + * **When to use** * - * **Previously Known As** + * Use to run diagnostics or reporting when layer construction fails and the + * full `Cause` is needed. * - * This API replaces the following from Effect 3.x: + * **Details** * - * - `Layer.tapErrorCause` + * The callback receives the layer's `Cause`, so it can inspect typed errors, + * defects, and interruption information. If the callback succeeds, the layer + * fails again with the original cause; if the callback fails, that failure is + * added to the layer's error type. + * + * @see {@link tapError} for observing only typed layer construction errors + * @see {@link catchCause} for recovering from a layer construction failure by switching to another layer * - * @since 4.0.0 * @category sequencing + * @since 4.0.0 */ (f: (cause: Cause.Cause) => Effect): (self: Layer) => Layer>; /** - * Performs the specified effect if this layer fails. + * Performs the specified effect when this layer fails with any cause. + * + * **When to use** * - * **Previously Known As** + * Use to run diagnostics or reporting when layer construction fails and the + * full `Cause` is needed. * - * This API replaces the following from Effect 3.x: + * **Details** * - * - `Layer.tapErrorCause` + * The callback receives the layer's `Cause`, so it can inspect typed errors, + * defects, and interruption information. If the callback succeeds, the layer + * fails again with the original cause; if the callback fails, that failure is + * added to the layer's error type. + * + * @see {@link tapError} for observing only typed layer construction errors + * @see {@link catchCause} for recovering from a layer construction failure by switching to another layer * - * @since 4.0.0 * @category sequencing + * @since 4.0.0 */ (self: Layer, f: (cause: Cause.Cause) => Effect): Layer>; }; /** - * Translates effect failure into death of the fiber, making all failures - * unchecked and not a part of the type of the layer. + * Converts layer construction failures into defects, removing them from the + * layer's error type. + * + * **Details** + * + * Use this only when failures should be treated as unrecoverable defects rather + * than typed errors that callers can handle. + * + * **Example** (Converting layer failures to defects) * - * @example * ```ts - * import { Data, Effect, Layer, Context } from "effect" + * import { Context, Data, Effect, Layer } from "effect" * * class DatabaseError extends Data.TaggedError("DatabaseError")<{ * message: string @@ -2287,14 +2774,9 @@ export declare const tapCause: { * }>()("Database") {} * * // Layer that can fail during construction - * const flakyDatabaseLayer = Layer.effect(Database)(Effect.gen(function*() { - * // Simulate a database connection that might fail - * const shouldFail = Math.random() > 0.5 - * if (shouldFail) { - * return yield* new DatabaseError({ message: "Connection failed" }) - * } - * - * return { query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Result: ${sql}`)) } + * const flakyDatabaseLayer = Layer.effect(Database, Effect.gen(function*() { + * console.log("connecting") + * return yield* new DatabaseError({ message: "Connection failed" }) * })) * * // Convert failures to fiber death - removes error from type @@ -2308,12 +2790,12 @@ export declare const tapCause: { * Effect.provide(reliableDatabaseLayer) * ) * - * // If the database layer fails, the entire fiber will die - * // instead of the effect failing with DatabaseError + * // Running the program prints "connecting", then the DatabaseError is + * // converted into a fiber defect instead of remaining a typed error. * ``` * - * @since 2.0.0 * @category error handling + * @since 2.0.0 */ export declare const orDie: (self: Layer) => Layer; declare const catch_: { @@ -2322,18 +2804,31 @@ declare const catch_: { }; export { /** - * Recovers from all errors. + * Recovers from all typed errors by switching to another layer. + * + * **When to use** + * + * Use when every typed `Layer` construction error should use the same + * recovery path. + * + * @see {@link catchTag} for recovering from specific tagged errors + * @see {@link catchCause} for recovering with access to the full cause * - * @since 4.0.0 * @category error handling + * @since 4.0.0 */ catch_ as catch }; /** * Recovers from specific tagged errors. * - * @example + * **When to use** + * + * Use when only some tagged `Layer` construction errors should be recovered. + * + * **Example** (Recovering from tagged layer errors) + * * ```ts - * import { Data, Effect, Layer, Context } from "effect" + * import { Context, Data, Effect, Layer } from "effect" * * class ConfigError extends Data.TaggedError("ConfigError") {} * @@ -2341,25 +2836,32 @@ catch_ as catch }; * readonly apiUrl: string * }>()("Config") {} * - * const configLayer = Layer.effect(Config)(Effect.fail(new ConfigError())) + * const configLayer = Layer.effect(Config, Effect.fail(new ConfigError())) * - * const fallbackLayer = Layer.succeed(Config)({ apiUrl: "http://localhost" }) + * const fallbackLayer = Layer.succeed(Config, { apiUrl: "http://localhost" }) * * const recovered = configLayer.pipe( * Layer.catchTag("ConfigError", () => fallbackLayer) * ) * ``` * - * @since 4.0.0 + * @see {@link catchCause} for recovering with access to the full cause + * * @category error handling + * @since 4.0.0 */ export declare const catchTag: { /** * Recovers from specific tagged errors. * - * @example + * **When to use** + * + * Use when only some tagged `Layer` construction errors should be recovered. + * + * **Example** (Recovering from tagged layer errors) + * * ```ts - * import { Data, Effect, Layer, Context } from "effect" + * import { Context, Data, Effect, Layer } from "effect" * * class ConfigError extends Data.TaggedError("ConfigError") {} * @@ -2367,25 +2869,32 @@ export declare const catchTag: { * readonly apiUrl: string * }>()("Config") {} * - * const configLayer = Layer.effect(Config)(Effect.fail(new ConfigError())) + * const configLayer = Layer.effect(Config, Effect.fail(new ConfigError())) * - * const fallbackLayer = Layer.succeed(Config)({ apiUrl: "http://localhost" }) + * const fallbackLayer = Layer.succeed(Config, { apiUrl: "http://localhost" }) * * const recovered = configLayer.pipe( * Layer.catchTag("ConfigError", () => fallbackLayer) * ) * ``` * - * @since 4.0.0 + * @see {@link catchCause} for recovering with access to the full cause + * * @category error handling + * @since 4.0.0 */ | NonEmptyReadonlyArray>, E, RIn2, E2, ROut2>(k: K, f: (e: Types.ExtractTag, K extends NonEmptyReadonlyArray ? K[number] : K>) => Layer): (self: Layer) => Layer ? K[number] : K>, RIn2 | RIn>; /** * Recovers from specific tagged errors. * - * @example + * **When to use** + * + * Use when only some tagged `Layer` construction errors should be recovered. + * + * **Example** (Recovering from tagged layer errors) + * * ```ts - * import { Data, Effect, Layer, Context } from "effect" + * import { Context, Data, Effect, Layer } from "effect" * * class ConfigError extends Data.TaggedError("ConfigError") {} * @@ -2393,198 +2902,205 @@ export declare const catchTag: { * readonly apiUrl: string * }>()("Config") {} * - * const configLayer = Layer.effect(Config)(Effect.fail(new ConfigError())) + * const configLayer = Layer.effect(Config, Effect.fail(new ConfigError())) * - * const fallbackLayer = Layer.succeed(Config)({ apiUrl: "http://localhost" }) + * const fallbackLayer = Layer.succeed(Config, { apiUrl: "http://localhost" }) * * const recovered = configLayer.pipe( * Layer.catchTag("ConfigError", () => fallbackLayer) * ) * ``` * - * @since 4.0.0 + * @see {@link catchCause} for recovering with access to the full cause + * * @category error handling + * @since 4.0.0 */ | NonEmptyReadonlyArray>, RIn2, E2, ROut2>(self: Layer, k: K, f: (e: Types.ExtractTag ? K[number] : K>) => Layer): Layer ? K[number] : K>, RIn | RIn2>; }; /** - * Recovers from all errors. + * Recovers from any failure cause by switching to another layer. + * + * **When to use** + * + * Use when you need `Layer` recovery to inspect more than the typed error, + * such as defects or interruption information. + * + * **Details** + * + * The handler receives the full `Cause` of the failed layer, including typed + * errors, unexpected defects, and interruption information, and returns the + * fallback layer to build instead. Finalizers for resources acquired by the + * failed layer are still run before the fallback layer is acquired. + * + * **Example** (Recovering from layer failures by cause) * - * @example * ```ts - * import { Data, Effect, Layer, Context } from "effect" + * import { Context, Data, Effect, Layer } from "effect" * * class DatabaseError extends Data.TaggedError("DatabaseError")<{ * message: string * }> {} * - * class NetworkError extends Data.TaggedError("NetworkError")<{ - * reason: string - * }> {} - * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * class Logger extends Context.Service Effect.Effect - * }>()("Logger") {} - * - * // Primary database layer that might fail - * const primaryDatabaseLayer = Layer.effect(Database)(Effect.gen(function*() { - * return yield* new DatabaseError({ message: "Primary DB unreachable" }) - * return { query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Primary: ${sql}`)) } - * })) + * const primaryDatabaseLayer = Layer.effect(Database, + * Effect.fail(new DatabaseError({ message: "Primary DB unreachable" })) + * ) * - * // Fallback layers for different error causes * const databaseWithFallback = primaryDatabaseLayer.pipe( * Layer.catchCause(() => { - * // For any cause/error, fallback to in-memory database - * return Layer.mergeAll( - * Layer.succeed(Database)({ - * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Memory: ${sql}`)) - * }), - * Layer.succeed(Logger)({ - * log: Effect.fn("Logger.log")((msg: string) => - * Effect.sync(() => console.log(`[FALLBACK] ${msg}`)) - * ) - * }) - * ) + * return Layer.succeed(Database, { + * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Memory: ${sql}`)) + * }) * }) * ) * * const program = Effect.gen(function*() { * const database = yield* Database - * return yield* database.query("SELECT * FROM users") + * const result = yield* database.query("SELECT * FROM users") + * console.log(result) * }).pipe( * Effect.provide(databaseWithFallback) * ) + * + * Effect.runPromise(program) + * // Memory: SELECT * FROM users * ``` * - * @since 2.0.0 + * @see {@link catchTag} for recovering from specific tagged errors + * * @category error handling + * @since 4.0.0 */ export declare const catchCause: { /** - * Recovers from all errors. + * Recovers from any failure cause by switching to another layer. + * + * **When to use** + * + * Use when you need `Layer` recovery to inspect more than the typed error, + * such as defects or interruption information. + * + * **Details** + * + * The handler receives the full `Cause` of the failed layer, including typed + * errors, unexpected defects, and interruption information, and returns the + * fallback layer to build instead. Finalizers for resources acquired by the + * failed layer are still run before the fallback layer is acquired. + * + * **Example** (Recovering from layer failures by cause) * - * @example * ```ts - * import { Data, Effect, Layer, Context } from "effect" + * import { Context, Data, Effect, Layer } from "effect" * * class DatabaseError extends Data.TaggedError("DatabaseError")<{ * message: string * }> {} * - * class NetworkError extends Data.TaggedError("NetworkError")<{ - * reason: string - * }> {} - * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * class Logger extends Context.Service Effect.Effect - * }>()("Logger") {} - * - * // Primary database layer that might fail - * const primaryDatabaseLayer = Layer.effect(Database)(Effect.gen(function*() { - * return yield* new DatabaseError({ message: "Primary DB unreachable" }) - * return { query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Primary: ${sql}`)) } - * })) + * const primaryDatabaseLayer = Layer.effect(Database, + * Effect.fail(new DatabaseError({ message: "Primary DB unreachable" })) + * ) * - * // Fallback layers for different error causes * const databaseWithFallback = primaryDatabaseLayer.pipe( * Layer.catchCause(() => { - * // For any cause/error, fallback to in-memory database - * return Layer.mergeAll( - * Layer.succeed(Database)({ - * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Memory: ${sql}`)) - * }), - * Layer.succeed(Logger)({ - * log: Effect.fn("Logger.log")((msg: string) => - * Effect.sync(() => console.log(`[FALLBACK] ${msg}`)) - * ) - * }) - * ) + * return Layer.succeed(Database, { + * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Memory: ${sql}`)) + * }) * }) * ) * * const program = Effect.gen(function*() { * const database = yield* Database - * return yield* database.query("SELECT * FROM users") + * const result = yield* database.query("SELECT * FROM users") + * console.log(result) * }).pipe( * Effect.provide(databaseWithFallback) * ) + * + * Effect.runPromise(program) + * // Memory: SELECT * FROM users * ``` * - * @since 2.0.0 + * @see {@link catchTag} for recovering from specific tagged errors + * * @category error handling + * @since 4.0.0 */ (onError: (cause: Cause.Cause) => Layer): (self: Layer) => Layer; /** - * Recovers from all errors. + * Recovers from any failure cause by switching to another layer. + * + * **When to use** + * + * Use when you need `Layer` recovery to inspect more than the typed error, + * such as defects or interruption information. + * + * **Details** + * + * The handler receives the full `Cause` of the failed layer, including typed + * errors, unexpected defects, and interruption information, and returns the + * fallback layer to build instead. Finalizers for resources acquired by the + * failed layer are still run before the fallback layer is acquired. + * + * **Example** (Recovering from layer failures by cause) * - * @example * ```ts - * import { Data, Effect, Layer, Context } from "effect" + * import { Context, Data, Effect, Layer } from "effect" * * class DatabaseError extends Data.TaggedError("DatabaseError")<{ * message: string * }> {} * - * class NetworkError extends Data.TaggedError("NetworkError")<{ - * reason: string - * }> {} - * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * class Logger extends Context.Service Effect.Effect - * }>()("Logger") {} - * - * // Primary database layer that might fail - * const primaryDatabaseLayer = Layer.effect(Database)(Effect.gen(function*() { - * return yield* new DatabaseError({ message: "Primary DB unreachable" }) - * return { query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Primary: ${sql}`)) } - * })) + * const primaryDatabaseLayer = Layer.effect(Database, + * Effect.fail(new DatabaseError({ message: "Primary DB unreachable" })) + * ) * - * // Fallback layers for different error causes * const databaseWithFallback = primaryDatabaseLayer.pipe( * Layer.catchCause(() => { - * // For any cause/error, fallback to in-memory database - * return Layer.mergeAll( - * Layer.succeed(Database)({ - * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Memory: ${sql}`)) - * }), - * Layer.succeed(Logger)({ - * log: Effect.fn("Logger.log")((msg: string) => - * Effect.sync(() => console.log(`[FALLBACK] ${msg}`)) - * ) - * }) - * ) + * return Layer.succeed(Database, { + * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Memory: ${sql}`)) + * }) * }) * ) * * const program = Effect.gen(function*() { * const database = yield* Database - * return yield* database.query("SELECT * FROM users") + * const result = yield* database.query("SELECT * FROM users") + * console.log(result) * }).pipe( * Effect.provide(databaseWithFallback) * ) + * + * Effect.runPromise(program) + * // Memory: SELECT * FROM users * ``` * - * @since 2.0.0 + * @see {@link catchTag} for recovering from specific tagged errors + * * @category error handling + * @since 4.0.0 */ (self: Layer, onError: (cause: Cause.Cause) => Layer): Layer; }; /** * Updates a service in the context with a new implementation. * + * **When to use** + * + * Use to adapt or extend a service's behavior during the creation of a + * layer. + * * **Details** * * This function modifies the existing implementation of a service in the @@ -2592,18 +3108,18 @@ export declare const catchCause: { * transformation function `f`, and replaces the old service with the * transformed one. * - * **When to Use** - * - * This is useful for adapting or extending a service's behavior during the - * creation of a layer. - * + * @category providing services * @since 3.13.0 - * @category utils */ export declare const updateService: { /** * Updates a service in the context with a new implementation. * + * **When to use** + * + * Use to adapt or extend a service's behavior during the creation of a + * layer. + * * **Details** * * This function modifies the existing implementation of a service in the @@ -2611,18 +3127,18 @@ export declare const updateService: { * transformation function `f`, and replaces the old service with the * transformed one. * - * **When to Use** - * - * This is useful for adapting or extending a service's behavior during the - * creation of a layer. - * + * @category providing services * @since 3.13.0 - * @category utils */ (service: Context.Key, f: (a: Types.NoInfer) => A): (layer: Layer) => Layer; /** * Updates a service in the context with a new implementation. * + * **When to use** + * + * Use to adapt or extend a service's behavior during the creation of a + * layer. + * * **Details** * * This function modifies the existing implementation of a service in the @@ -2630,75 +3146,111 @@ export declare const updateService: { * transformation function `f`, and replaces the old service with the * transformed one. * - * **When to Use** - * - * This is useful for adapting or extending a service's behavior during the - * creation of a layer. - * + * @category providing services * @since 3.13.0 - * @category utils */ (layer: Layer, service: Context.Key, f: (a: Types.NoInfer) => A): Layer; }; /** * Creates a fresh version of this layer that will not be shared. * - * @example + * **When to use** + * + * Use when you need two parts of an application to receive separate instances + * of a resource, such as two independent client sessions. + * + * **Gotchas** + * + * Do not use it just to work around confusing composition. By default, sharing + * the same layer value is usually the desired behavior. + * + * **Example** (Creating non-shared layer instances) + * * ```ts - * import { Effect, Layer, Ref, Context } from "effect" + * import { Context, Effect, Layer, Ref } from "effect" * * class Counter extends Context.Service Effect.Effect + * readonly id: number * }>()("Counter") {} * - * // Layer that creates a counter with shared state - * const counterLayer = Layer.effect(Counter)(Effect.gen(function*() { - * const ref = yield* Ref.make(0) - * return { - * count: 0, - * increment: Effect.fn("Counter.increment")(() => - * Ref.update(ref, (n) => n + 1).pipe( - * Effect.flatMap(() => Ref.get(ref)) - * ) - * ) - * } + * class Left extends Context.Service()("Left") {} + * + * class Right extends Context.Service()("Right") {} + * + * const leftLayer = Layer.effect(Left, Effect.gen(function*() { + * const counter = yield* Counter + * return { counterId: counter.id } + * })) + * + * const rightLayer = Layer.effect(Right, Effect.gen(function*() { + * const counter = yield* Counter + * return { counterId: counter.id } * })) * - * // By default, layers are shared - same instance used everywhere - * const sharedProgram = Effect.gen(function*() { - * const counter1 = yield* Counter - * const counter2 = yield* Counter + * const showIds = Effect.gen(function*() { + * const left = yield* Left + * const right = yield* Right + * console.log(`same Counter: ${left.counterId === right.counterId}`) + * }) * - * // Both counter1 and counter2 refer to the same instance - * console.log("Shared layer - same instance") - * }).pipe( - * Effect.provide(counterLayer) - * ) + * const program = Effect.gen(function*() { + * const nextId = yield* Ref.make(0) * - * // Fresh layer creates a new instance each time - * const freshProgram = Effect.gen(function*() { - * const counter1 = yield* Counter - * const counter2 = yield* Counter + * const counterLayer = Layer.effect(Counter, Effect.gen(function*() { + * const id = yield* Ref.updateAndGet(nextId, (n) => n + 1) + * console.log("constructed Counter") + * return { id } + * })) * - * // counter1 and counter2 are different instances - * console.log("Fresh layer - different instances") - * }).pipe( - * Effect.provide(Layer.fresh(counterLayer)) - * ) + * const shared = Layer.merge( + * Layer.provide(leftLayer, counterLayer), + * Layer.provide(rightLayer, counterLayer) + * ) + * + * yield* Effect.provide(showIds, shared) + * + * const freshCounterLayer = Layer.fresh(counterLayer) + * const fresh = Layer.merge( + * Layer.provide(leftLayer, freshCounterLayer), + * Layer.provide(rightLayer, freshCounterLayer) + * ) + * + * yield* Effect.provide(showIds, fresh) + * }) + * + * Effect.runPromise(program) + * // constructed Counter + * // same Counter: true + * // constructed Counter + * // constructed Counter + * // same Counter: false * ``` * + * @category layers * @since 2.0.0 - * @category utils */ export declare const fresh: (self: Layer) => Layer; /** - * Builds this layer and uses it until it is interrupted. This is useful when - * your entire application is a layer, such as an HTTP server. + * Builds this layer and keeps it alive until the returned effect is interrupted. + * + * **When to use** + * + * Use when you model your entire application as a layer, such as an HTTP + * server. + * + * **Details** + * + * When the returned effect is interrupted, the layer scope is closed and all + * finalizers registered during layer acquisition are run. + * + * **Example** (Launching an application layer) * - * @example * ```ts - * import { Console, Effect, Layer, Context } from "effect" + * import { Console, Context, Effect, Layer } from "effect" * * class HttpServer extends Context.Service Effect.Effect @@ -2710,7 +3262,7 @@ export declare const fresh: (self: Layer) => Layer; * }>()("Logger") {} * * // Server layer that starts an HTTP server - * const serverLayer = Layer.effect(HttpServer)(Effect.gen(function*() { + * const serverLayer = Layer.effect(HttpServer, Effect.gen(function*() { * yield* Console.log("Starting HTTP server...") * * return { @@ -2725,7 +3277,7 @@ export declare const fresh: (self: Layer) => Layer; * } * })) * - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Console.log(`[LOG] ${msg}`)) * }) * @@ -2743,19 +3295,29 @@ export declare const fresh: (self: Layer) => Layer; * // Effect.runFork(application) * ``` * + * @category converting * @since 2.0.0 - * @category conversions */ export declare const launch: (self: Layer) => Effect; /** * A utility type for creating partial mocks of services in testing. * - * This type makes Effect methods and Effect-returning functions optional, - * while keeping non-Effect properties required. This allows you to provide - * only the methods you need to test while leaving others unimplemented. + * **When to use** * - * @since 4.0.0 - * @category Testing + * Use to type partial test service implementations where only exercised + * effectful members are stubbed. + * + * **Details** + * + * This type makes `Effect`, `Stream`, and `Channel` values and functions + * returning them optional, while keeping non-effectful properties required. + * This allows you to provide only the methods you need to test while leaving + * others unimplemented. + * + * @see {@link mock} for creating a mock layer from a partial service implementation + * + * @category testing + * @since 3.17.0 */ export type PartialEffectful = Types.Simplify<{ [K in keyof A as A[K] extends AnyEffectOrStream ? K : never]?: A[K]; @@ -2765,12 +3327,21 @@ export type PartialEffectful = Types.Simplify<{ type AnyEffectOrStream = Effect | Stream.Stream | Channel.Channel | ((...args: any) => Effect) | ((...args: any) => Stream.Stream) | ((...args: any) => Channel.Channel); /** * Creates a mock layer for testing purposes. You can provide a partial - * implementation of the service, and any methods not provided will - * throw an unimplemented defect when called. + * implementation of the service. Any missing members that are `Effect`s, + * `Stream`s, `Channel`s, or functions returning them will fail with an + * unimplemented defect when used. + * + * **Details** + * + * Missing members are represented by a value that can be used as an `Effect`, + * `Stream`, `Channel`, or as a function returning an `Effect`. This lets the + * mock preserve the shape of common service methods while still failing loudly + * when an unimplemented member is exercised. + * + * **Example** (Mocking services for tests) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class UserService extends Context.Service | Stream.Stream | * ) * ``` * - * @since 4.0.0 - * @category Testing + * @category testing + * @since 3.17.0 */ export declare const mock: { /** * Creates a mock layer for testing purposes. You can provide a partial - * implementation of the service, and any methods not provided will - * throw an unimplemented defect when called. + * implementation of the service. Any missing members that are `Effect`s, + * `Stream`s, `Channel`s, or functions returning them will fail with an + * unimplemented defect when used. + * + * **Details** + * + * Missing members are represented by a value that can be used as an `Effect`, + * `Stream`, `Channel`, or as a function returning an `Effect`. This lets the + * mock preserve the shape of common service methods while still failing loudly + * when an unimplemented member is exercised. + * + * **Example** (Mocking services for tests) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class UserService extends Context.Service(service: Context.Key): (implementation: PartialEffectful) => Layer; /** * Creates a mock layer for testing purposes. You can provide a partial - * implementation of the service, and any methods not provided will - * throw an unimplemented defect when called. + * implementation of the service. Any missing members that are `Effect`s, + * `Stream`s, `Channel`s, or functions returning them will fail with an + * unimplemented defect when used. + * + * **Details** + * + * Missing members are represented by a value that can be used as an `Effect`, + * `Stream`, `Channel`, or as a function returning an `Effect`. This lets the + * mock preserve the shape of common service methods while still failing loudly + * when an unimplemented member is exercised. + * + * **Example** (Mocking services for tests) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class UserService extends Context.Service(service: Context.Key, implementation: Types.NoInfer>): Layer; }; /** - * Ensures that an layer's success type extends a given type `ROut`. + * Ensures that a layer's success type extends a given type `ROut`. + * + * **Details** * * This function provides compile-time type checking to ensure that the success - * value of an layer conforms to a specific type constraint. + * value of a layer conforms to a specific type constraint. + * + * **Example** (Constraining layer success types) * - * @example * ```ts * import { Layer } from "effect" * @@ -2927,20 +3519,23 @@ export declare const mock: { * // This would cause a TypeScript compilation error: * // const invalidLayer = satisfiesNumber(StringLayer) * // ^^^^^^^^^^^ - * // Type 'number' is not assignable to type 'string' + * // Type 'string' is not assignable to type 'number' * ``` * + * @category utility types * @since 4.0.0 - * @category Type constraints */ export declare const satisfiesSuccessType: () => (layer: Layer) => Layer; /** - * Ensures that an layer's error type extends a given type `E`. + * Ensures that a layer's error type extends a given type `E`. + * + * **Details** * * This function provides compile-time type checking to ensure that the error - * type of an layer conforms to a specific type constraint. + * type of a layer conforms to a specific type constraint. + * + * **Example** (Constraining layer error types) * - * @example * ```ts * import { Layer } from "effect" * @@ -2960,24 +3555,27 @@ export declare const satisfiesSuccessType: () => () => (layer: Layer) => Layer; /** - * Ensures that an layer's requirements type extends a given type `R`. + * Ensures that a layer's requirements type extends a given type `R`. + * + * **Details** * * This function provides compile-time type checking to ensure that the - * requirements (context) type of an layer conforms to a specific type constraint. + * requirements type of a layer conforms to a specific type constraint. + * + * **Example** (Constraining layer service requirements) * - * @example * ```ts * import { Layer } from "effect" * * declare const FortyTwoLayer: Layer.Layer * declare const StringLayer: Layer.Layer * - * // Define a constraint that the success type must be a number + * // Define a constraint that the service requirements must be numbers * const satisfiesNumber = Layer.satisfiesServicesType() * * // This works - Layer extends Layer @@ -2989,21 +3587,35 @@ export declare const satisfiesErrorType: () => (laye * // Type 'string' is not assignable to type 'number' * ``` * + * @category utility types * @since 4.0.0 - * @category Type constraints */ export declare const satisfiesServicesType: () => (layer: Layer) => Layer; /** * Represents options that can be used to control the behavior of spans created * for layers. * + * **When to use** + * + * Use to configure tracing metadata, stack trace capture, and `onEnd` + * finalization for spans created by `Layer.span` and `Layer.withSpan` during + * layer construction. + * + * **Details** + * + * Extends `Tracer.SpanOptions` with `onEnd`, which runs when the layer span + * ends as the layer scope closes. + * + * @see {@link span} for creating a layer span + * @see {@link withSpan} for wrapping layer construction in a span + * + * @category options * @since 4.0.0 - * @category Models */ export interface SpanOptions extends Tracer.SpanOptions { /** - * A function that will be called when the span associated with the layer is - * ending (i.e. when the `Scope` that the span is associated with is closed). + * Runs when the span associated with the layer ends, which happens when the + * layer scope is closed. */ readonly onEnd?: ((span: Tracer.Span, exit: Exit.Exit) => Effect) | undefined; } @@ -3011,13 +3623,19 @@ export interface SpanOptions extends Tracer.SpanOptions { * Constructs a new `Layer` which creates a span and registers it as the current * parent span. * + * **Details** + * * This allows you to create a traced scope for layer construction, making all * operations within the layer constructor part of the same trace span. The span - * is automatically closed when the layer's scope is closed. + * is automatically ended when the layer's scope is closed. If `onEnd` is + * provided, it receives the span and the layer scope's exit value when the span + * ends. + * + * **Example** (Tracing layer construction with a span) * - * @example * ```ts - * import { Console, Effect, Layer, Context, type Tracer } from "effect" + * import { Console, Context, Effect, Layer } from "effect" + * import type { Tracer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -3049,21 +3667,23 @@ export interface SpanOptions extends Tracer.SpanOptions { * }) * ``` * - * @since 4.0.0 * @category tracing + * @since 2.0.0 */ export declare const span: (name: string, options?: SpanOptions) => Layer; /** - * Constructs a new `Layer` which takes an existing span and registers it as the - * current parent span. + * Constructs a layer that provides an existing span as the current parent span. * - * This allows you to create a traced scope for layer construction, making all - * operations within the layer constructor part of the same trace span. The span - * is automatically closed when the layer's scope is closed. + * **Details** + * + * The supplied span is made available through `Tracer.ParentSpan` for layers + * that are built with this layer. This API does not create, end, or close the + * span; the caller remains responsible for the span's lifetime. + * + * **Example** (Using an existing parent span) * - * @example * ```ts - * import { Console, Effect, Layer, Context, Tracer } from "effect" + * import { Console, Context, Effect, Layer, Tracer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -3088,21 +3708,24 @@ export declare const span: (name: string, options?: SpanOptions) => Layer Layer; /** - * Wraps a Layer with a new tracing span, making all operations in the layer + * Wraps a `Layer` with a new tracing span, making all operations in the layer * constructor part of the named trace span. * + * **Details** + * * This creates a new span for the layer's construction and execution. The span * is automatically ended when the layer's scope is closed. This is useful for * tracking the lifecycle and performance of layer initialization. * - * @example + * **Example** (Wrapping a layer with a span) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -3143,25 +3766,27 @@ export declare const parentSpan: (span: Tracer.AnySpan) => Layer Effect.Effect @@ -3202,25 +3827,27 @@ export declare const withSpan: { * * yield* logger.log("Application ready") * return yield* database.query("SELECT * FROM users") - * }).pipe(Effect.provide(appLayer) - * ) + * }).pipe(Effect.provide(appLayer)) * ``` * - * @since 4.0.0 * @category tracing + * @since 2.0.0 */ (name: string, options?: SpanOptions): (self: Layer) => Layer>; /** - * Wraps a Layer with a new tracing span, making all operations in the layer + * Wraps a `Layer` with a new tracing span, making all operations in the layer * constructor part of the named trace span. * + * **Details** + * * This creates a new span for the layer's construction and execution. The span * is automatically ended when the layer's scope is closed. This is useful for * tracking the lifecycle and performance of layer initialization. * - * @example + * **Example** (Wrapping a layer with a span) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -3261,25 +3888,32 @@ export declare const withSpan: { * * yield* logger.log("Application ready") * return yield* database.query("SELECT * FROM users") - * }).pipe(Effect.provide(appLayer) - * ) + * }).pipe(Effect.provide(appLayer)) * ``` * - * @since 4.0.0 * @category tracing + * @since 2.0.0 */ (self: Layer, name: string, options?: SpanOptions): Layer>; }; /** - * Wraps a `Layer` with a new tracing span and sets the span as the parent span. + * Wraps a layer so spans created during its construction use the supplied span + * as their parent. + * + * **Details** * - * This attaches a layer to an existing trace span, making all operations within - * the layer children of the provided parent span. This is useful for integrating - * layer construction into an existing trace hierarchy. + * Use this to attach layer construction to an existing trace hierarchy. This API + * does not create or end the supplied parent span. + * + * When the supplied span is a native `Span`, layer construction also receives + * diagnostic information that helps associate failures with the layer call site. + * External spans are only installed as the parent span and do not add this + * diagnostic call-site information. + * + * **Example** (Attaching layers to an existing parent span) * - * @example * ```ts - * import { Effect, Layer, Context, Tracer } from "effect" + * import { Context, Effect, Layer, Tracer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -3326,20 +3960,28 @@ export declare const withSpan: { * ) * ``` * - * @since 4.0.0 * @category tracing + * @since 2.0.0 */ export declare const withParentSpan: { /** - * Wraps a `Layer` with a new tracing span and sets the span as the parent span. + * Wraps a layer so spans created during its construction use the supplied span + * as their parent. + * + * **Details** + * + * Use this to attach layer construction to an existing trace hierarchy. This API + * does not create or end the supplied parent span. + * + * When the supplied span is a native `Span`, layer construction also receives + * diagnostic information that helps associate failures with the layer call site. + * External spans are only installed as the parent span and do not add this + * diagnostic call-site information. * - * This attaches a layer to an existing trace span, making all operations within - * the layer children of the provided parent span. This is useful for integrating - * layer construction into an existing trace hierarchy. + * **Example** (Attaching layers to an existing parent span) * - * @example * ```ts - * import { Effect, Layer, Context, Tracer } from "effect" + * import { Context, Effect, Layer, Tracer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -3386,20 +4028,28 @@ export declare const withParentSpan: { * ) * ``` * - * @since 4.0.0 * @category tracing + * @since 2.0.0 */ (span: Tracer.AnySpan, options?: Tracer.TraceOptions): (self: Layer) => Layer>; /** - * Wraps a `Layer` with a new tracing span and sets the span as the parent span. + * Wraps a layer so spans created during its construction use the supplied span + * as their parent. + * + * **Details** * - * This attaches a layer to an existing trace span, making all operations within - * the layer children of the provided parent span. This is useful for integrating - * layer construction into an existing trace hierarchy. + * Use this to attach layer construction to an existing trace hierarchy. This API + * does not create or end the supplied parent span. + * + * When the supplied span is a native `Span`, layer construction also receives + * diagnostic information that helps associate failures with the layer call site. + * External spans are only installed as the parent span and do not add this + * diagnostic call-site information. + * + * **Example** (Attaching layers to an existing parent span) * - * @example * ```ts - * import { Effect, Layer, Context, Tracer } from "effect" + * import { Context, Effect, Layer, Tracer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -3446,8 +4096,8 @@ export declare const withParentSpan: { * ) * ``` * - * @since 4.0.0 * @category tracing + * @since 2.0.0 */ (self: Layer, span: Tracer.AnySpan, options?: Tracer.TraceOptions): Layer>; }; diff --git a/.opencode/node_modules/effect/dist/Layer.d.ts.map b/.opencode/node_modules/effect/dist/Layer.d.ts.map index ae89fc8d17e596c751f15667878267497dbf60b4..6f07ac91b3793fe6f5f6c7520393d1586d0723c5 100644 --- a/.opencode/node_modules/effect/dist/Layer.d.ts.map +++ b/.opencode/node_modules/effect/dist/Layer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Layer.d.ts","sourceRoot":"","sources":["../src/Layer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAiB,qBAAqB,EAAE,MAAM,YAAY,CAAA;AACtE,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,KAAK,IAAI,MAAM,WAAW,CAAA;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAM5C,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,eAAe,CAAA;AAG5D,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,MAAM,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;;;;;;;;;;;;;;;;;OAkEG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAA;CAe1H,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Layer.js b/.opencode/node_modules/effect/dist/Layer.js index 0a29a1df16f50c49a2e28042bc0f821ac2fe7fe8..b050e7c41cc4ebda72e9767d70b7ae53090a39c8 100644 --- a/.opencode/node_modules/effect/dist/Layer.js +++ b/.opencode/node_modules/effect/dist/Layer.js @@ -11,18 +11,23 @@ import * as Scope from "./Scope.js"; import * as Tracer from "./Tracer.js"; const TypeId = "~effect/Layer"; const MemoMapTypeId = "~effect/Layer/MemoMap"; +const memoMapReuse = (entry, scope) => { + entry.observers++; + return internalEffect.andThen(internalEffect.scopeAddFinalizerExit(scope, exit => entry.finalizer(exit)), entry.effect); +}; /** * Returns `true` if the specified value is a `Layer`, `false` otherwise. * - * @example + * **Example** (Checking whether a value is a layer) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) * const notALayer = { someProperty: "value" } @@ -31,8 +36,8 @@ const MemoMapTypeId = "~effect/Layer/MemoMap"; * console.log(Layer.isLayer(notALayer)) // false * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export const isLayer = u => hasProperty(u, TypeId); const LayerProto = { @@ -51,14 +56,18 @@ const fromBuildUnsafe = build => { return self; }; /** - * Constructs a Layer from a function that uses a `MemoMap` and `Scope` to build the layer. + * Constructs a `Layer` from a function that uses a `MemoMap` and `Scope` to + * build the layer. + * + * **Details** * * The function receives a `MemoMap` for memoization and a `Scope` for resource management. * A child scope is created, and if the build fails, the child scope is closed. * - * @example + * **Example** (Constructing a layer from a build function) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -73,23 +82,26 @@ const fromBuildUnsafe = build => { * ) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export const fromBuild = build => fromBuildUnsafe((memoMap, scope) => { const layerScope = Scope.forkUnsafe(scope); return internalEffect.onExit(build(memoMap, layerScope), exit => exit._tag === "Failure" ? Scope.close(layerScope, exit) : internalEffect.void); }); /** - * Constructs a Layer from a function that uses a `MemoMap` and `Scope` to build the layer, - * with automatic memoization. + * Constructs a `Layer` from a function that uses a `MemoMap` and `Scope` to + * build the layer, with automatic memoization. + * + * **Details** * * This is similar to `fromBuild` but provides automatic memoization of the layer construction. * The layer will be memoized based on the provided `MemoMap`. * - * @example + * **Example** (Memoizing layer construction) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -104,51 +116,65 @@ export const fromBuild = build => fromBuildUnsafe((memoMap, scope) => { * ) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export const fromBuildMemo = build => { const self = fromBuild((memoMap, scope) => memoMap.getOrElseMemoize(self, scope, build)); return self; }; +const memoMapBuild = (memoMap, layer, scope, build) => { + const layerScope = Scope.makeUnsafe(); + const deferred = Deferred.makeUnsafe(); + const entry = { + observers: 1, + effect: Deferred.await(deferred), + finalizer: exit => internalEffect.suspend(() => { + entry.observers--; + if (entry.observers === 0) { + memoMap.map.delete(layer); + return Scope.close(layerScope, exit); + } + return internalEffect.void; + }) + }; + memoMap.map.set(layer, entry); + return internalEffect.scopeAddFinalizerExit(scope, entry.finalizer).pipe(internalEffect.flatMap(() => build(memoMap, layerScope)), internalEffect.onExit(exit => { + entry.effect = exit; + return Deferred.done(deferred, exit); + })); +}; class MemoMapImpl { get [MemoMapTypeId]() { return MemoMapTypeId; } + parent; + constructor(parent) { + this.parent = parent; + } map = /*#__PURE__*/new Map(); + get(layer, scope) { + const local = this.map.get(layer); + if (local) { + return memoMapReuse(local, scope); + } + return this.parent?.get(layer, scope); + } getOrElseMemoize(layer, scope, build) { - if (this.map.has(layer)) { - const entry = this.map.get(layer); - entry.observers++; - return internalEffect.andThen(internalEffect.scopeAddFinalizerExit(scope, exit => entry.finalizer(exit)), entry.effect); + const existing = this.get(layer, scope); + if (existing) { + return existing; } - const layerScope = Scope.makeUnsafe(); - const deferred = Deferred.makeUnsafe(); - const entry = { - observers: 1, - effect: Deferred.await(deferred), - finalizer: exit => internalEffect.suspend(() => { - entry.observers--; - if (entry.observers === 0) { - this.map.delete(layer); - return Scope.close(layerScope, exit); - } - return internalEffect.void; - }) - }; - this.map.set(layer, entry); - return internalEffect.scopeAddFinalizerExit(scope, entry.finalizer).pipe(internalEffect.flatMap(() => build(this, layerScope)), internalEffect.onExit(exit => { - entry.effect = exit; - return Deferred.done(deferred, exit); - })); + return memoMapBuild(this, layer, scope, build); } } /** - * Constructs a `MemoMap` that can be used to build additional layers. + * Constructs a `MemoMap` synchronously so it can be used to build additional layers. + * + * **Example** (Creating a memo map unsafely) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -159,7 +185,7 @@ class MemoMapImpl { * const memoMap = Layer.makeMemoMapUnsafe() * const scope = yield* Effect.scope * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) * const context = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope) @@ -168,16 +194,35 @@ class MemoMapImpl { * }) * ``` * - * @since 4.0.0 * @category memo map + * @since 4.0.0 */ export const makeMemoMapUnsafe = () => new MemoMapImpl(); /** - * Constructs a `MemoMap` that can be used to build additional layers. + * Constructs a child `MemoMap` synchronously, allowing it to reuse layers + * already memoized in the parent while isolating any new layer allocations to + * the child map. + * + * **When to use** + * + * Use to synchronously fork a memo map for manual layer building when child + * builds should see parent memoized layers without writing newly built layers + * back to the parent. + * + * @see {@link forkMemoMap} for allocating the child memo map inside `Effect` + * @see {@link makeMemoMapUnsafe} for creating a root memo map without a parent + * + * @category memo map + * @since 4.0.0 + */ +export const forkMemoMapUnsafe = parent => new MemoMapImpl(parent); +/** + * Constructs a `MemoMap` effectfully so it can be used to build additional layers. + * + * **Example** (Creating a memo map in an effect) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -188,7 +233,7 @@ export const makeMemoMapUnsafe = () => new MemoMapImpl(); * const memoMap = yield* Layer.makeMemoMap * const scope = yield* Effect.scope * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) * const context = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope) @@ -197,18 +242,45 @@ export const makeMemoMapUnsafe = () => new MemoMapImpl(); * }) * ``` * - * @since 2.0.0 * @category memo map + * @since 2.0.0 */ export const makeMemoMap = /*#__PURE__*/internalEffect.sync(makeMemoMapUnsafe); /** - * A service reference for the current `MemoMap` used in layer construction. + * Constructs a child `MemoMap` effectfully, allowing it to reuse layers already + * memoized in the parent while isolating any new layer allocations to the child + * map. * - * This service provides access to the current memoization map during layer building, - * allowing layers to share memoized results. + * **When to use** + * + * Use when a layer build should inherit already memoized layers from an + * existing `MemoMap` while keeping newly memoized layers out of the parent map. + * + * @see {@link makeMemoMap} for creating a root memo map in an `Effect` + * @see {@link forkMemoMapUnsafe} for the synchronous constructor variant + * @see {@link buildWithMemoMap} for building layers with an explicit memo map + * + * @category memo map + * @since 4.0.0 + */ +export const forkMemoMap = parent => internalEffect.sync(() => forkMemoMapUnsafe(parent)); +/** + * Context service for the current `MemoMap` used in layer construction. + * + * **When to use** + * + * Use when building custom layer operations that need to access the current + * memoization map from the fiber context. + * + * **Details** + * + * This service wraps a `MemoMap` as a `Context.Service`, making it available + * for dependency injection during layer construction. + * + * @see {@link MemoMap} the memoization map type wrapped by this service * - * @since 3.13.0 * @category models + * @since 3.13.0 */ export class CurrentMemoMap extends /*#__PURE__*/Context.Service()("effect/Layer/CurrentMemoMap") { static getOrCreate = /*#__PURE__*/Context.getOrElse(this, makeMemoMapUnsafe); @@ -217,9 +289,10 @@ export class CurrentMemoMap extends /*#__PURE__*/Context.Service()("effect/Layer * Builds a layer into an `Effect` value, using the specified `MemoMap` to memoize * the layer construction. * - * @example + * **Example** (Building layers with an explicit memo map) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -235,13 +308,13 @@ export class CurrentMemoMap extends /*#__PURE__*/Context.Service()("effect/Layer * const scope = yield* Effect.scope * * // Build database layer with memoization - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) * const dbContext = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope) * * // Build logger layer with same memoization (reuses memo if same layer) - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg))) * }) * const loggerContext = yield* Layer.buildWithMemoMap( @@ -257,16 +330,17 @@ export class CurrentMemoMap extends /*#__PURE__*/Context.Service()("effect/Layer * }) * ``` * - * @since 2.0.0 * @category memo map + * @since 2.0.0 */ export const buildWithMemoMap = /*#__PURE__*/dual(3, (self, memoMap, scope) => internalEffect.provideService(internalEffect.map(self.build(memoMap, scope), Context.add(CurrentMemoMap, memoMap)), CurrentMemoMap, memoMap)); /** * Builds a layer into a scoped value. * - * @example + * **Example** (Building a layer into a context) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -274,7 +348,7 @@ export const buildWithMemoMap = /*#__PURE__*/dual(3, (self, memoMap, scope) => i * * // Build a layer to get its services * const program = Effect.gen(function*() { - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) * @@ -288,20 +362,27 @@ export const buildWithMemoMap = /*#__PURE__*/dual(3, (self, memoMap, scope) => i * }) * ``` * - * @since 2.0.0 * @category destructors + * @since 2.0.0 */ export const build = self => core.withFiber(fiber => buildWithMemoMap(self, CurrentMemoMap.getOrCreate(fiber.context), Context.getUnsafe(fiber.context, Scope.Scope))); /** - * Builds a layer into an `Effect` value. Any resources associated with this - * layer will be released when the specified scope is closed unless their scope - * has been extended. This allows building layers where the lifetime of some of - * the services output by the layer exceed the lifetime of the effect the - * layer is provided to. + * Builds a layer using an explicit scope. + * + * **When to use** + * + * Use to control the lifetime of layer resources with a scope supplied by the + * caller. + * + * **Details** + * + * Resources created by the layer are released when the supplied scope is + * closed, unless a resource extends its own scope. + * + * **Example** (Building a layer with an explicit scope) * - * @example * ```ts - * import { Effect, Layer, Scope, Context } from "effect" + * import { Context, Effect, Layer, Scope } from "effect" * * class Database extends Context.Service Effect.Effect @@ -311,7 +392,7 @@ export const build = self => core.withFiber(fiber => buildWithMemoMap(self, Curr * const program = Effect.gen(function*() { * const scope = yield* Effect.scope * - * const dbLayer = Layer.effect(Database)(Effect.gen(function*() { + * const dbLayer = Layer.effect(Database, Effect.gen(function*() { * console.log("Initializing database...") * yield* Scope.addFinalizer( * scope, @@ -329,51 +410,37 @@ export const build = self => core.withFiber(fiber => buildWithMemoMap(self, Curr * }) * ``` * - * @since 2.0.0 * @category destructors + * @since 2.0.0 */ export const buildWithScope = /*#__PURE__*/dual(2, (self, scope) => core.withFiber(fiber => buildWithMemoMap(self, CurrentMemoMap.getOrCreate(fiber.context), scope))); /** - * Constructs a layer from the specified value. + * Constructs a layer that provides a single service from an already available + * value. + * + * **When to use** + * + * Use when you need a `Layer` that provides a service from an already + * constructed implementation without effectful acquisition. + * + * **Example** (Creating a layer from a service implementation) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * class Logger extends Context.Service Effect.Effect - * }>()("Logger") {} - * - * // Create layers from concrete service implementations - * const databaseLayer = Layer.succeed(Database)({ + * const DatabaseLive = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Query result: ${sql}`)) * }) - * - * const loggerLayer = Layer.succeed(Logger)({ - * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) - * }) - * - * // Use the layers in a program - * const program = Effect.gen(function*() { - * const database = yield* Database - * const logger = yield* Logger - * - * yield* logger.log("Starting database query") - * const result = yield* database.query("SELECT * FROM users") - * yield* logger.log(`Query completed: ${result}`) - * - * return result - * }).pipe( - * Effect.provide(Layer.mergeAll(databaseLayer, loggerLayer)) - * ) * ``` * - * @since 2.0.0 + * @see {@link sync} for constructing layers from lazy values + * * @category constructors + * @since 2.0.0 */ export const succeed = function () { if (arguments.length === 1) { @@ -382,15 +449,23 @@ export const succeed = function () { return succeedContext(Context.make(arguments[0], arguments[1])); }; /** - * Constructs a layer from the specified value, which must return one or more - * services. + * Constructs a layer that provides all services in an already available + * `Context`. + * + * **When to use** * - * This is a more general version of `succeed` that allows you to provide multiple - * services at once through a `Context`. + * Use when you need a `Layer` built from an existing `Context`, including when + * you need to provide multiple services at once. + * + * **Details** + * + * This is a more general version of `succeed` that allows you to provide + * multiple services at once through a `Context`. + * + * **Example** (Providing multiple services from a context) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -411,48 +486,69 @@ export const succeed = function () { * const layer = Layer.succeedContext(context) * ``` * - * @since 2.0.0 + * @see {@link succeed} for providing a single service from a value + * * @category constructors + * @since 2.0.0 */ export const succeedContext = context => fromBuildUnsafe(constant(internalEffect.succeed(context))); /** - * A Layer that constructs an empty Context. + * An empty layer that provides no services, cannot fail, has no requirements, + * and performs no construction or finalization work. + * + * **When to use** + * + * Use as the no-op branch when conditionally composing layers. * - * This layer provides no services and can be used as a neutral element - * in layer composition or as a starting point for building layers. + * **Example** (Disabling optional lifecycle work) * - * @example * ```ts - * import { Layer } from "effect" + * import { Console, Layer } from "effect" + * + * declare const flag: boolean * - * const emptyLayer = Layer.empty + * const StartupLogLive = flag + * ? Layer.effectDiscard(Console.log("application starting")) + * : Layer.empty * ``` * - * @since 2.0.0 + * @see {@link effectDiscard} for running an effect while providing no services + * * @category constructors + * @since 2.0.0 */ export const empty = /*#__PURE__*/succeedContext(/*#__PURE__*/Context.empty()); /** - * Lazily constructs a layer from the specified value. + * Constructs a layer lazily that provides a single service. + * + * **When to use** + * + * Use when you need a `Layer` that provides one service whose value is created + * synchronously, but creation should be deferred until the layer is built. + * + * **Details** * * This is a lazy version of `succeed` where the service value is computed * synchronously only when the layer is built. * - * @example + * **Example** (Lazily providing a service) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * const layer = Layer.sync(Database)(() => ({ + * const layer = Layer.sync(Database, () => ({ * query: (sql: string) => Effect.succeed(`Query: ${sql}`) * })) * ``` * - * @since 2.0.0 + * @see {@link succeed} for constructing layers from static values + * * @category constructors + * @since 2.0.0 */ export const sync = function () { if (arguments.length === 1) { @@ -461,15 +557,22 @@ export const sync = function () { return syncContext(() => Context.make(arguments[0], arguments[1]())); }; /** - * Lazily constructs a layer from the specified value, which must return one or more - * services. + * Constructs a layer lazily that provides all services in a `Context`. + * + * **When to use** + * + * Use when you need a `Layer` that creates multiple services synchronously but + * defers that work until the layer is built. + * + * **Details** * - * This is a lazy version of `succeedContext` where the Context is computed + * This is a lazy version of `succeedContext` where the `Context` is computed * synchronously only when the layer is built. * - * @example + * **Example** (Lazily providing a context) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -482,40 +585,48 @@ export const sync = function () { * ) * ``` * - * @since 2.0.0 + * @see {@link sync} for lazily providing a single service + * @see {@link succeedContext} for providing an already available context + * * @category constructors + * @since 2.0.0 */ export const syncContext = evaluate => fromBuildMemo(constant(internalEffect.sync(evaluate))); /** - * Constructs a layer from the specified scoped effect. + * Constructs a layer from an effect that produces a single service. * - * This allows you to create a Layer from an Effect that produces a service. - * The Effect is executed in the scope of the layer, allowing for proper - * resource management. + * **When to use** * - * **Previously Known As** + * Use when you need to construct a `Layer`-provided service with an `Effect`, + * dependencies, or scoped resource acquisition. * - * This API replaces the following from Effect 3.x: + * **Details** + * + * This allows you to create a `Layer` from an `Effect` that produces a service. + * The `Effect` is executed in the scope of the layer, allowing for proper + * resource management. * - * - `Layer.scoped` + * **Example** (Creating a layer from an effect) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * const layer = Layer.effect(Database)( + * const layer = Layer.effect(Database, * Effect.sync(() => ({ * query: (sql: string) => Effect.succeed(`Query: ${sql}`) * })) * ) * ``` * - * @since 2.0.0 + * @see {@link effectContext} for effectfully providing multiple services + * @see {@link effectDiscard} for running construction work without providing services + * * @category constructors + * @since 2.0.0 */ export const effect = function () { if (arguments.length === 1) { @@ -525,15 +636,23 @@ export const effect = function () { }; const effectImpl = (service, effect) => effectContext(internalEffect.map(effect, value => Context.make(service, value))); /** - * Constructs a layer from the specified scoped effect, which must return one - * or more services. + * Constructs a layer from an effect that produces all services in a `Context`. + * + * **When to use** + * + * Use when you need a `Layer` that effectfully constructs a `Context` with + * multiple services. + * + * **Details** + * + * This allows you to create a `Layer` from an effectful computation that + * returns multiple services. The `Effect` is executed in the scope of the + * layer. * - * This allows you to create a Layer from an effectful computation that returns - * multiple services. The Effect is executed in the scope of the layer. + * **Example** (Creating a layer from an effectful context) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service< * Database, @@ -547,23 +666,23 @@ const effectImpl = (service, effect) => effectContext(internalEffect.map(effect, * ) * ``` * - * @since 2.0.0 + * @see {@link effect} for effectfully providing a single service + * * @category constructors + * @since 2.0.0 */ export const effectContext = effect => fromBuildMemo((_, scope) => Scope.provide(effect, scope)); /** - * Constructs a layer from the specified scoped effect. - * - * This is useful when you want to run an Effect for its side effects during - * layer construction, but don't need to provide any services. + * Constructs a layer from an effect, discarding its value and providing no + * services. * - * **Previously Known As** + * **When to use** * - * This API replaces the following from Effect 3.x: + * Use when layer construction should run an Effect for its side effects while providing no + * services. * - * - `Layer.scopedDiscard` + * **Example** (Running an effect during layer construction) * - * @example * ```ts * import { Effect, Layer } from "effect" * @@ -574,19 +693,24 @@ export const effectContext = effect => fromBuildMemo((_, scope) => Scope.provide * ) * ``` * - * @since 2.0.0 + * @see {@link empty} for a no-op layer that performs no construction work + * * @category constructors + * @since 2.0.0 */ export const effectDiscard = effect => effectContext(internalEffect.as(effect, Context.empty())); /** - * Lazily constructs a layer using the specified factory. + * Constructs a layer lazily using the specified factory. + * + * **Details** * * The factory is evaluated only when the suspended layer is first built, and * the result is memoized with normal layer sharing semantics. * - * @example + * **Example** (Choosing a layer lazily) + * * ```ts - * import { Layer, Context } from "effect" + * import { Context, Layer } from "effect" * * class Config extends Context.Service()("Config") {} * @@ -594,39 +718,46 @@ export const effectDiscard = effect => effectContext(internalEffect.as(effect, C * * const layer = Layer.suspend(() => * useProd - * ? Layer.succeed(Config)("https://api.example.com") - * : Layer.succeed(Config)("http://localhost:3000") + * ? Layer.succeed(Config, "https://api.example.com") + * : Layer.succeed(Config, "http://localhost:3000") * ) * ``` * - * @since 4.0.0 * @category constructors + * @since 2.0.0 */ export const suspend = evaluate => fromBuildMemo((memoMap, scope) => internalEffect.suspend(() => evaluate().build(memoMap, scope))); /** - * Unwraps a Layer from an Effect, flattening the nested structure. + * Unwraps a `Layer` from an `Effect`, flattening the nested structure. + * + * **When to use** * - * This is useful when you have an Effect that produces a Layer, and you want to - * use that Layer directly. The resulting Layer will have the combined error and - * dependency types from both the outer Effect and the inner Layer. + * Use when you have an `Effect` that produces a `Layer` and you want to + * use that layer directly. + * + * **Details** + * + * The resulting Layer will have the combined error and dependency types from + * both the outer Effect and the inner Layer. + * + * **Example** (Unwrapping an effectful layer) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * * const layerEffect = Effect.succeed( - * Layer.succeed(Database)({ query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) }) + * Layer.succeed(Database, { query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) }) * ) * * const unwrappedLayer = Layer.unwrap(layerEffect) * ``` * + * @category converting * @since 4.0.0 - * @category utils */ export const unwrap = self => { const service = Context.Service("effect/Layer/unwrap"); @@ -639,14 +770,25 @@ const mergeAllEffect = (layers, memoMap, scope) => { }).pipe(internalEffect.map(context => Context.mergeAll(...context))); }; /** - * Combines all the provided layers concurrently, creating a new layer with merged input, error, and output types. + * Combines all the provided layers concurrently, creating a new layer with + * merged input, error, and output types. + * + * **When to use** + * + * Use when you need to combine multiple independent layers. + * + * **Details** * * All layers are built concurrently, and their outputs are merged into a single layer. - * This is useful when you need to combine multiple independent layers. * - * @example + * If multiple merged layers depend on the same layer value, that dependency is + * shared by default. Reuse a named layer value when you want services to share + * the same resource, such as one database pool. + * + * **Example** (Merging independent layers) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -656,29 +798,41 @@ const mergeAllEffect = (layers, memoMap, scope) => { * readonly log: (msg: string) => Effect.Effect * }>()("Logger") {} * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg))) * }) * * const mergedLayer = Layer.mergeAll(dbLayer, loggerLayer) * ``` * - * @since 2.0.0 + * @see {@link merge} for merging one layer with another layer or array + * * @category zipping + * @since 2.0.0 */ export const mergeAll = (...layers) => fromBuild((memoMap, scope) => mergeAllEffect(layers, memoMap, scope)); /** - * Merges this layer with the specified layer concurrently, producing a new layer with combined input and output types. + * Merges this layer with another layer concurrently, producing a new layer with + * combined input, error, and output types. + * + * **When to use** * - * This is a binary version of `mergeAll` that merges exactly two layers or one layer with an array of layers. - * The layers are built concurrently and their outputs are combined. + * Use to combine an existing `Layer` with another `Layer` or an array of + * layers while preserving pipeline style. + * + * **Details** + * + * This is a binary version of `mergeAll` that merges exactly two layers or one + * layer with an array of layers. The layers are built concurrently and their + * outputs are combined. + * + * **Example** (Merging two layers) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -688,29 +842,40 @@ export const mergeAll = (...layers) => fromBuild((memoMap, scope) => mergeAllEff * readonly log: (msg: string) => Effect.Effect * }>()("Logger") {} * - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) * }) - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg))) * }) * * const mergedLayer = Layer.merge(dbLayer, loggerLayer) * ``` * - * @since 2.0.0 + * @see {@link mergeAll} for merging several layers at once + * * @category zipping + * @since 2.0.0 */ export const merge = /*#__PURE__*/dual(2, (self, that) => mergeAll(self, ...(Array.isArray(that) ? that : [that]))); const provideWith = (self, that, f) => fromBuild((memoMap, scope) => internalEffect.flatMap(Array.isArray(that) ? mergeAllEffect(that, memoMap, scope) : that.build(memoMap, scope), context => self.build(memoMap, scope).pipe(internalEffect.provideContext(context), internalEffect.map(merged => f(merged, context))))); /** - * Feeds the output services of this builder into the input of the specified - * builder, resulting in a new builder with the inputs of this builder as - * well as any leftover inputs, and the outputs of the specified builder. + * Feeds the output services of the dependency layer into the requirements of + * this layer, returning a layer that only provides the services from this layer. + * + * **When to use** + * + * Use when you need to hide an implementation dependency layer from callers. + * + * **Details** + * + * In `serviceLayer.pipe(Layer.provide(dependencyLayer))`, the dependency layer is + * built first and is used to satisfy the requirements of `serviceLayer`. + * + * **Example** (Providing layer dependencies) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -728,16 +893,16 @@ const provideWith = (self, that, f) => fromBuild((memoMap, scope) => internalEff * }>()("Logger") {} * * // Create dependency layers - * const databaseLayer = Layer.succeed(Database)({ + * const databaseLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`)) * }) * - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) * }) * * // UserService depends on Database and Logger - * const userServiceLayer = Layer.effect(UserService)(Effect.gen(function*() { + * const userServiceLayer = Layer.effect(UserService, Effect.gen(function*() { * const database = yield* Database * const logger = yield* Logger * @@ -766,18 +931,29 @@ const provideWith = (self, that, f) => fromBuild((memoMap, scope) => internalEff * ) * ``` * + * @see {@link provideMerge} for retaining the dependency services + * + * @category providing services * @since 2.0.0 - * @category utils */ export const provide = /*#__PURE__*/dual(2, (self, that) => provideWith(self, that, identity)); /** - * Feeds the output services of this layer into the input of the specified - * layer, resulting in a new layer with the inputs of this layer, and the - * outputs of both layers. + * Feeds the output services of the dependency layer into the requirements of + * this layer, returning a layer that provides both sets of services. + * + * **When to use** + * + * Use when you need to compose `Layer`s while keeping both the constructed + * service and the dependency used to build it available. + * + * **Details** + * + * Prefer {@link provide} when the dependency should stay private. + * + * **Example** (Providing dependencies while retaining services) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -795,16 +971,16 @@ export const provide = /*#__PURE__*/dual(2, (self, that) => provideWith(self, th * }>()("UserService") {} * * // Create dependency layers - * const databaseLayer = Layer.succeed(Database)({ + * const databaseLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`)) * }) * - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))) * }) * * // UserService depends on Database and Logger - * const userServiceLayer = Layer.effect(UserService)(Effect.gen(function*() { + * const userServiceLayer = Layer.effect(UserService, Effect.gen(function*() { * const database = yield* Database * const logger = yield* Logger * @@ -839,16 +1015,19 @@ export const provide = /*#__PURE__*/dual(2, (self, that) => provideWith(self, th * ) * ``` * + * @see {@link provide} for keeping dependency services private + * + * @category providing services * @since 2.0.0 - * @category utils */ export const provideMerge = /*#__PURE__*/dual(2, (self, that) => provideWith(self, that, (self, that) => Context.merge(that, self))); /** * Constructs a layer dynamically based on the output of this layer. * - * @example + * **Example** (Creating services from layer output) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Config extends Context.Service provideWith(sel * }>()("Logger") {} * * // Base config layer - * const configLayer = Layer.succeed(Config)({ + * const configLayer = Layer.succeed(Config, { * dbUrl: "postgres://localhost:5432/mydb", * logLevel: "debug" * }) @@ -875,7 +1054,7 @@ export const provideMerge = /*#__PURE__*/dual(2, (self, that) => provideWith(sel * const config = Context.get(context, Config) * * // Create database layer based on config - * const dbLayer = Layer.succeed(Database)({ + * const dbLayer = Layer.succeed(Database, { * query: Effect.fn("Database.query")((sql: string) => * Effect.succeed( * `Querying ${config.dbUrl}: ${sql}` @@ -883,7 +1062,7 @@ export const provideMerge = /*#__PURE__*/dual(2, (self, that) => provideWith(sel * }) * * // Create logger layer based on config - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => * config.logLevel === "debug" * ? Effect.sync(() => console.log(`[DEBUG] ${msg}`)) @@ -910,44 +1089,87 @@ export const provideMerge = /*#__PURE__*/dual(2, (self, that) => provideWith(sel * ) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ export const flatMap = /*#__PURE__*/dual(2, (self, f) => fromBuild((memoMap, scope) => internalEffect.flatMap(self.build(memoMap, scope), context => f(context).build(memoMap, scope)))); /** * Performs the specified effect if this layer succeeds. * - * @since 4.0.0 + * **When to use** + * + * Use to run an effectful observation after a layer has been built + * successfully, such as logging or metrics, without changing the services the + * layer provides. + * + * **Details** + * + * The callback receives the services produced by this layer. Its result is + * discarded, and the original layer output is preserved. + * + * @see {@link tapError} for running an effect when layer construction fails with a typed error + * @see {@link tapCause} for running an effect when layer construction fails with any cause + * * @category sequencing + * @since 2.0.0 */ export const tap = /*#__PURE__*/dual(2, (self, f) => fromBuild((memoMap, scope) => internalEffect.flatMap(self.build(memoMap, scope), context => Scope.provide(internalEffect.as(f(context), context), scope)))); /** * Performs the specified effect if this layer fails. * - * @since 4.0.0 + * **When to use** + * + * Use to run logging, metrics, or other effects when layer construction fails + * while preserving the original typed error. + * + * **Details** + * + * The callback receives the typed error. If the callback succeeds, the layer + * still fails with the original error; if the callback fails, that failure is + * added to the layer's error type. + * + * @see {@link tap} for running an effect when layer construction succeeds + * @see {@link tapCause} for inspecting the full failure cause, including defects and interruption + * * @category sequencing + * @since 2.0.0 */ export const tapError = /*#__PURE__*/dual(2, (self, f) => fromBuild((memoMap, scope) => internalEffect.catch_(self.build(memoMap, scope), error => Scope.provide(internalEffect.andThen(f(error), internalEffect.fail(error)), scope)))); /** - * Performs the specified effect if this layer fails. + * Performs the specified effect when this layer fails with any cause. * - * **Previously Known As** + * **When to use** * - * This API replaces the following from Effect 3.x: + * Use to run diagnostics or reporting when layer construction fails and the + * full `Cause` is needed. * - * - `Layer.tapErrorCause` + * **Details** + * + * The callback receives the layer's `Cause`, so it can inspect typed errors, + * defects, and interruption information. If the callback succeeds, the layer + * fails again with the original cause; if the callback fails, that failure is + * added to the layer's error type. + * + * @see {@link tapError} for observing only typed layer construction errors + * @see {@link catchCause} for recovering from a layer construction failure by switching to another layer * - * @since 4.0.0 * @category sequencing + * @since 4.0.0 */ export const tapCause = /*#__PURE__*/dual(2, (self, f) => fromBuild((memoMap, scope) => internalEffect.catchCause(self.build(memoMap, scope), cause => Scope.provide(internalEffect.andThen(f(cause), internalEffect.failCause(cause)), scope)))); /** - * Translates effect failure into death of the fiber, making all failures - * unchecked and not a part of the type of the layer. + * Converts layer construction failures into defects, removing them from the + * layer's error type. + * + * **Details** + * + * Use this only when failures should be treated as unrecoverable defects rather + * than typed errors that callers can handle. + * + * **Example** (Converting layer failures to defects) * - * @example * ```ts - * import { Data, Effect, Layer, Context } from "effect" + * import { Context, Data, Effect, Layer } from "effect" * * class DatabaseError extends Data.TaggedError("DatabaseError")<{ * message: string @@ -958,14 +1180,9 @@ export const tapCause = /*#__PURE__*/dual(2, (self, f) => fromBuild((memoMap, sc * }>()("Database") {} * * // Layer that can fail during construction - * const flakyDatabaseLayer = Layer.effect(Database)(Effect.gen(function*() { - * // Simulate a database connection that might fail - * const shouldFail = Math.random() > 0.5 - * if (shouldFail) { - * return yield* new DatabaseError({ message: "Connection failed" }) - * } - * - * return { query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Result: ${sql}`)) } + * const flakyDatabaseLayer = Layer.effect(Database, Effect.gen(function*() { + * console.log("connecting") + * return yield* new DatabaseError({ message: "Connection failed" }) * })) * * // Convert failures to fiber death - removes error from type @@ -979,29 +1196,42 @@ export const tapCause = /*#__PURE__*/dual(2, (self, f) => fromBuild((memoMap, sc * Effect.provide(reliableDatabaseLayer) * ) * - * // If the database layer fails, the entire fiber will die - * // instead of the effect failing with DatabaseError + * // Running the program prints "connecting", then the DatabaseError is + * // converted into a fiber defect instead of remaining a typed error. * ``` * - * @since 2.0.0 * @category error handling + * @since 2.0.0 */ export const orDie = self => fromBuildUnsafe((memoMap, scope) => internalEffect.orDie(self.build(memoMap, scope))); const catch_ = /*#__PURE__*/dual(2, (self, onError) => fromBuildUnsafe((memoMap, scope) => internalEffect.catch_(self.build(memoMap, scope), e => onError(e).build(memoMap, scope)))); export { /** - * Recovers from all errors. + * Recovers from all typed errors by switching to another layer. + * + * **When to use** + * + * Use when every typed `Layer` construction error should use the same + * recovery path. + * + * @see {@link catchTag} for recovering from specific tagged errors + * @see {@link catchCause} for recovering with access to the full cause * - * @since 4.0.0 * @category error handling + * @since 4.0.0 */ catch_ as catch }; /** * Recovers from specific tagged errors. * - * @example + * **When to use** + * + * Use when only some tagged `Layer` construction errors should be recovered. + * + * **Example** (Recovering from tagged layer errors) + * * ```ts - * import { Data, Effect, Layer, Context } from "effect" + * import { Context, Data, Effect, Layer } from "effect" * * class ConfigError extends Data.TaggedError("ConfigError") {} * @@ -1009,80 +1239,87 @@ catch_ as catch }; * readonly apiUrl: string * }>()("Config") {} * - * const configLayer = Layer.effect(Config)(Effect.fail(new ConfigError())) + * const configLayer = Layer.effect(Config, Effect.fail(new ConfigError())) * - * const fallbackLayer = Layer.succeed(Config)({ apiUrl: "http://localhost" }) + * const fallbackLayer = Layer.succeed(Config, { apiUrl: "http://localhost" }) * * const recovered = configLayer.pipe( * Layer.catchTag("ConfigError", () => fallbackLayer) * ) * ``` * - * @since 4.0.0 + * @see {@link catchCause} for recovering with access to the full cause + * * @category error handling + * @since 4.0.0 */ export const catchTag = /*#__PURE__*/dual(3, (self, k, f) => fromBuildUnsafe((memoMap, scope) => internalEffect.catchTag(self.build(memoMap, scope), k, error => f(error).build(memoMap, scope)))); /** - * Recovers from all errors. + * Recovers from any failure cause by switching to another layer. + * + * **When to use** + * + * Use when you need `Layer` recovery to inspect more than the typed error, + * such as defects or interruption information. + * + * **Details** + * + * The handler receives the full `Cause` of the failed layer, including typed + * errors, unexpected defects, and interruption information, and returns the + * fallback layer to build instead. Finalizers for resources acquired by the + * failed layer are still run before the fallback layer is acquired. + * + * **Example** (Recovering from layer failures by cause) * - * @example * ```ts - * import { Data, Effect, Layer, Context } from "effect" + * import { Context, Data, Effect, Layer } from "effect" * * class DatabaseError extends Data.TaggedError("DatabaseError")<{ * message: string * }> {} * - * class NetworkError extends Data.TaggedError("NetworkError")<{ - * reason: string - * }> {} - * * class Database extends Context.Service Effect.Effect * }>()("Database") {} * - * class Logger extends Context.Service Effect.Effect - * }>()("Logger") {} - * - * // Primary database layer that might fail - * const primaryDatabaseLayer = Layer.effect(Database)(Effect.gen(function*() { - * return yield* new DatabaseError({ message: "Primary DB unreachable" }) - * return { query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Primary: ${sql}`)) } - * })) + * const primaryDatabaseLayer = Layer.effect(Database, + * Effect.fail(new DatabaseError({ message: "Primary DB unreachable" })) + * ) * - * // Fallback layers for different error causes * const databaseWithFallback = primaryDatabaseLayer.pipe( * Layer.catchCause(() => { - * // For any cause/error, fallback to in-memory database - * return Layer.mergeAll( - * Layer.succeed(Database)({ - * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Memory: ${sql}`)) - * }), - * Layer.succeed(Logger)({ - * log: Effect.fn("Logger.log")((msg: string) => - * Effect.sync(() => console.log(`[FALLBACK] ${msg}`)) - * ) - * }) - * ) + * return Layer.succeed(Database, { + * query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Memory: ${sql}`)) + * }) * }) * ) * * const program = Effect.gen(function*() { * const database = yield* Database - * return yield* database.query("SELECT * FROM users") + * const result = yield* database.query("SELECT * FROM users") + * console.log(result) * }).pipe( * Effect.provide(databaseWithFallback) * ) + * + * Effect.runPromise(program) + * // Memory: SELECT * FROM users * ``` * - * @since 2.0.0 + * @see {@link catchTag} for recovering from specific tagged errors + * * @category error handling + * @since 4.0.0 */ export const catchCause = /*#__PURE__*/dual(2, (self, onError) => fromBuildUnsafe((memoMap, scope) => internalEffect.catchCause(self.build(memoMap, scope), cause => onError(cause).build(memoMap, scope)))); /** * Updates a service in the context with a new implementation. * + * **When to use** + * + * Use to adapt or extend a service's behavior during the creation of a + * layer. + * * **Details** * * This function modifies the existing implementation of a service in the @@ -1090,74 +1327,110 @@ export const catchCause = /*#__PURE__*/dual(2, (self, onError) => fromBuildUnsaf * transformation function `f`, and replaces the old service with the * transformed one. * - * **When to Use** - * - * This is useful for adapting or extending a service's behavior during the - * creation of a layer. - * + * @category providing services * @since 3.13.0 - * @category utils */ -export const updateService = /*#__PURE__*/dual(3, (layer, service, f) => provide(layer, effect(service, internalEffect.map(service.asEffect(), f)))); +export const updateService = /*#__PURE__*/dual(3, (layer, service, f) => provide(layer, effect(service, internalEffect.map(service, f)))); /** * Creates a fresh version of this layer that will not be shared. * - * @example + * **When to use** + * + * Use when you need two parts of an application to receive separate instances + * of a resource, such as two independent client sessions. + * + * **Gotchas** + * + * Do not use it just to work around confusing composition. By default, sharing + * the same layer value is usually the desired behavior. + * + * **Example** (Creating non-shared layer instances) + * * ```ts - * import { Effect, Layer, Ref, Context } from "effect" + * import { Context, Effect, Layer, Ref } from "effect" * * class Counter extends Context.Service Effect.Effect + * readonly id: number * }>()("Counter") {} * - * // Layer that creates a counter with shared state - * const counterLayer = Layer.effect(Counter)(Effect.gen(function*() { - * const ref = yield* Ref.make(0) - * return { - * count: 0, - * increment: Effect.fn("Counter.increment")(() => - * Ref.update(ref, (n) => n + 1).pipe( - * Effect.flatMap(() => Ref.get(ref)) - * ) - * ) - * } + * class Left extends Context.Service()("Left") {} + * + * class Right extends Context.Service()("Right") {} + * + * const leftLayer = Layer.effect(Left, Effect.gen(function*() { + * const counter = yield* Counter + * return { counterId: counter.id } + * })) + * + * const rightLayer = Layer.effect(Right, Effect.gen(function*() { + * const counter = yield* Counter + * return { counterId: counter.id } * })) * - * // By default, layers are shared - same instance used everywhere - * const sharedProgram = Effect.gen(function*() { - * const counter1 = yield* Counter - * const counter2 = yield* Counter + * const showIds = Effect.gen(function*() { + * const left = yield* Left + * const right = yield* Right + * console.log(`same Counter: ${left.counterId === right.counterId}`) + * }) * - * // Both counter1 and counter2 refer to the same instance - * console.log("Shared layer - same instance") - * }).pipe( - * Effect.provide(counterLayer) - * ) + * const program = Effect.gen(function*() { + * const nextId = yield* Ref.make(0) * - * // Fresh layer creates a new instance each time - * const freshProgram = Effect.gen(function*() { - * const counter1 = yield* Counter - * const counter2 = yield* Counter + * const counterLayer = Layer.effect(Counter, Effect.gen(function*() { + * const id = yield* Ref.updateAndGet(nextId, (n) => n + 1) + * console.log("constructed Counter") + * return { id } + * })) * - * // counter1 and counter2 are different instances - * console.log("Fresh layer - different instances") - * }).pipe( - * Effect.provide(Layer.fresh(counterLayer)) - * ) + * const shared = Layer.merge( + * Layer.provide(leftLayer, counterLayer), + * Layer.provide(rightLayer, counterLayer) + * ) + * + * yield* Effect.provide(showIds, shared) + * + * const freshCounterLayer = Layer.fresh(counterLayer) + * const fresh = Layer.merge( + * Layer.provide(leftLayer, freshCounterLayer), + * Layer.provide(rightLayer, freshCounterLayer) + * ) + * + * yield* Effect.provide(showIds, fresh) + * }) + * + * Effect.runPromise(program) + * // constructed Counter + * // same Counter: true + * // constructed Counter + * // constructed Counter + * // same Counter: false * ``` * + * @category layers * @since 2.0.0 - * @category utils */ export const fresh = self => fromBuildUnsafe((_, scope) => self.build(makeMemoMapUnsafe(), scope)); /** - * Builds this layer and uses it until it is interrupted. This is useful when - * your entire application is a layer, such as an HTTP server. + * Builds this layer and keeps it alive until the returned effect is interrupted. + * + * **When to use** + * + * Use when you model your entire application as a layer, such as an HTTP + * server. + * + * **Details** + * + * When the returned effect is interrupted, the layer scope is closed and all + * finalizers registered during layer acquisition are run. + * + * **Example** (Launching an application layer) * - * @example * ```ts - * import { Console, Effect, Layer, Context } from "effect" + * import { Console, Context, Effect, Layer } from "effect" * * class HttpServer extends Context.Service Effect.Effect @@ -1169,7 +1442,7 @@ export const fresh = self => fromBuildUnsafe((_, scope) => self.build(makeMemoMa * }>()("Logger") {} * * // Server layer that starts an HTTP server - * const serverLayer = Layer.effect(HttpServer)(Effect.gen(function*() { + * const serverLayer = Layer.effect(HttpServer, Effect.gen(function*() { * yield* Console.log("Starting HTTP server...") * * return { @@ -1184,7 +1457,7 @@ export const fresh = self => fromBuildUnsafe((_, scope) => self.build(makeMemoMa * } * })) * - * const loggerLayer = Layer.succeed(Logger)({ + * const loggerLayer = Layer.succeed(Logger, { * log: Effect.fn("Logger.log")((msg: string) => Console.log(`[LOG] ${msg}`)) * }) * @@ -1202,18 +1475,27 @@ export const fresh = self => fromBuildUnsafe((_, scope) => self.build(makeMemoMa * // Effect.runFork(application) * ``` * + * @category converting * @since 2.0.0 - * @category conversions */ export const launch = self => internalEffect.scoped(internalEffect.andThen(build(self), internalEffect.never)); /** * Creates a mock layer for testing purposes. You can provide a partial - * implementation of the service, and any methods not provided will - * throw an unimplemented defect when called. + * implementation of the service. Any missing members that are `Effect`s, + * `Stream`s, `Channel`s, or functions returning them will fail with an + * unimplemented defect when used. + * + * **Details** + * + * Missing members are represented by a value that can be used as an `Effect`, + * `Stream`, `Channel`, or as a function returning an `Effect`. This lets the + * mock preserve the shape of common service methods while still failing loudly + * when an unimplemented member is exercised. + * + * **Example** (Mocking services for tests) * - * @example * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class UserService extends Context.Service internalEffect.scoped(internalEffect.andThen(build * ) * ``` * - * @since 4.0.0 - * @category Testing + * @category testing + * @since 3.17.0 */ export const mock = function () { if (arguments.length === 1) { @@ -1301,12 +1583,15 @@ const ChannelTypeId = "~effect/Channel"; // Type constraints // ----------------------------------------------------------------------------- /** - * Ensures that an layer's success type extends a given type `ROut`. + * Ensures that a layer's success type extends a given type `ROut`. + * + * **Details** * * This function provides compile-time type checking to ensure that the success - * value of an layer conforms to a specific type constraint. + * value of a layer conforms to a specific type constraint. + * + * **Example** (Constraining layer success types) * - * @example * ```ts * import { Layer } from "effect" * @@ -1322,20 +1607,23 @@ const ChannelTypeId = "~effect/Channel"; * // This would cause a TypeScript compilation error: * // const invalidLayer = satisfiesNumber(StringLayer) * // ^^^^^^^^^^^ - * // Type 'number' is not assignable to type 'string' + * // Type 'string' is not assignable to type 'number' * ``` * + * @category utility types * @since 4.0.0 - * @category Type constraints */ export const satisfiesSuccessType = () => layer => layer; /** - * Ensures that an layer's error type extends a given type `E`. + * Ensures that a layer's error type extends a given type `E`. + * + * **Details** * * This function provides compile-time type checking to ensure that the error - * type of an layer conforms to a specific type constraint. + * type of a layer conforms to a specific type constraint. + * + * **Example** (Constraining layer error types) * - * @example * ```ts * import { Layer } from "effect" * @@ -1355,24 +1643,27 @@ export const satisfiesSuccessType = () => layer => layer; * // Type 'string' is not assignable to type 'Error' * ``` * + * @category utility types * @since 4.0.0 - * @category Type constraints */ export const satisfiesErrorType = () => layer => layer; /** - * Ensures that an layer's requirements type extends a given type `R`. + * Ensures that a layer's requirements type extends a given type `R`. + * + * **Details** * * This function provides compile-time type checking to ensure that the - * requirements (context) type of an layer conforms to a specific type constraint. + * requirements type of a layer conforms to a specific type constraint. + * + * **Example** (Constraining layer service requirements) * - * @example * ```ts * import { Layer } from "effect" * * declare const FortyTwoLayer: Layer.Layer * declare const StringLayer: Layer.Layer * - * // Define a constraint that the success type must be a number + * // Define a constraint that the service requirements must be numbers * const satisfiesNumber = Layer.satisfiesServicesType() * * // This works - Layer extends Layer @@ -1384,21 +1675,27 @@ export const satisfiesErrorType = () => layer => layer; * // Type 'string' is not assignable to type 'number' * ``` * + * @category utility types * @since 4.0.0 - * @category Type constraints */ export const satisfiesServicesType = () => layer => layer; /** * Constructs a new `Layer` which creates a span and registers it as the current * parent span. * + * **Details** + * * This allows you to create a traced scope for layer construction, making all * operations within the layer constructor part of the same trace span. The span - * is automatically closed when the layer's scope is closed. + * is automatically ended when the layer's scope is closed. If `onEnd` is + * provided, it receives the span and the layer scope's exit value when the span + * ends. + * + * **Example** (Tracing layer construction with a span) * - * @example * ```ts - * import { Console, Effect, Layer, Context, type Tracer } from "effect" + * import { Console, Context, Effect, Layer } from "effect" + * import type { Tracer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1430,24 +1727,26 @@ export const satisfiesServicesType = () => layer => layer; * }) * ``` * - * @since 4.0.0 * @category tracing + * @since 2.0.0 */ export const span = (name, options) => { options = internalTracer.addSpanStackTrace(options); return effect(Tracer.ParentSpan, options?.onEnd ? internalEffect.tap(internalEffect.makeSpanScoped(name, options), span => internalEffect.addFinalizer(exit => options.onEnd(span, exit))) : internalEffect.makeSpanScoped(name, options)); }; /** - * Constructs a new `Layer` which takes an existing span and registers it as the - * current parent span. + * Constructs a layer that provides an existing span as the current parent span. * - * This allows you to create a traced scope for layer construction, making all - * operations within the layer constructor part of the same trace span. The span - * is automatically closed when the layer's scope is closed. + * **Details** + * + * The supplied span is made available through `Tracer.ParentSpan` for layers + * that are built with this layer. This API does not create, end, or close the + * span; the caller remains responsible for the span's lifetime. + * + * **Example** (Using an existing parent span) * - * @example * ```ts - * import { Console, Effect, Layer, Context, Tracer } from "effect" + * import { Console, Context, Effect, Layer, Tracer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1472,21 +1771,24 @@ export const span = (name, options) => { * })))) * ``` * - * @since 4.0.0 * @category tracing + * @since 2.0.0 */ export const parentSpan = span => succeedContext(Tracer.ParentSpan.context(span)); /** - * Wraps a Layer with a new tracing span, making all operations in the layer + * Wraps a `Layer` with a new tracing span, making all operations in the layer * constructor part of the named trace span. * + * **Details** + * * This creates a new span for the layer's construction and execution. The span * is automatically ended when the layer's scope is closed. This is useful for * tracking the lifecycle and performance of layer initialization. * - * @example + * **Example** (Wrapping a layer with a span) + * * ```ts - * import { Effect, Layer, Context } from "effect" + * import { Context, Effect, Layer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1527,12 +1829,11 @@ export const parentSpan = span => succeedContext(Tracer.ParentSpan.context(span) * * yield* logger.log("Application ready") * return yield* database.query("SELECT * FROM users") - * }).pipe(Effect.provide(appLayer) - * ) + * }).pipe(Effect.provide(appLayer)) * ``` * - * @since 4.0.0 * @category tracing + * @since 2.0.0 */ export const withSpan = function () { const dataFirst = typeof arguments[0] !== "string"; @@ -1545,15 +1846,23 @@ export const withSpan = function () { return self => unwrap(internalEffect.map(options?.onEnd !== undefined ? internalEffect.tap(internalEffect.makeSpanScoped(name, options), span => internalEffect.addFinalizer(exit => options.onEnd(span, exit))) : internalEffect.makeSpanScoped(name, options), span => withParentSpan(self, span))); }; /** - * Wraps a `Layer` with a new tracing span and sets the span as the parent span. + * Wraps a layer so spans created during its construction use the supplied span + * as their parent. + * + * **Details** + * + * Use this to attach layer construction to an existing trace hierarchy. This API + * does not create or end the supplied parent span. + * + * When the supplied span is a native `Span`, layer construction also receives + * diagnostic information that helps associate failures with the layer call site. + * External spans are only installed as the parent span and do not add this + * diagnostic call-site information. * - * This attaches a layer to an existing trace span, making all operations within - * the layer children of the provided parent span. This is useful for integrating - * layer construction into an existing trace hierarchy. + * **Example** (Attaching layers to an existing parent span) * - * @example * ```ts - * import { Effect, Layer, Context, Tracer } from "effect" + * import { Context, Effect, Layer, Tracer } from "effect" * * class Database extends Context.Service Effect.Effect @@ -1600,8 +1909,8 @@ export const withSpan = function () { * ) * ``` * - * @since 4.0.0 * @category tracing + * @since 2.0.0 */ export const withParentSpan = function () { const dataFirst = isLayer(arguments[0]); diff --git a/.opencode/node_modules/effect/dist/Layer.js.map b/.opencode/node_modules/effect/dist/Layer.js.map index 23c942f60a83fb428d93e95c941a4e50f48ce8d9..fb1f9d0582a5262e276e0fe73bc5b17ace069363 100644 --- a/.opencode/node_modules/effect/dist/Layer.js.map +++ b/.opencode/node_modules/effect/dist/Layer.js.map @@ -1 +1 @@ -{"version":3,"file":"Layer.js","names":["Context","Deferred","constant","constTrue","constUndefined","dual","identity","core","internalEffect","internalTracer","pipeArguments","hasProperty","CurrentStackFrame","Scope","Tracer","TypeId","MemoMapTypeId","isLayer","u","LayerProto","_ROut","_E","_RIn","pipe","arguments","fromBuildUnsafe","build","self","Object","create","fromBuild","memoMap","scope","layerScope","forkUnsafe","onExit","exit","_tag","close","void","fromBuildMemo","getOrElseMemoize","MemoMapImpl","map","Map","layer","has","entry","get","observers","andThen","scopeAddFinalizerExit","finalizer","effect","makeUnsafe","deferred","await","suspend","delete","set","flatMap","done","makeMemoMapUnsafe","makeMemoMap","sync","CurrentMemoMap","Service","getOrCreate","getOrElse","buildWithMemoMap","provideService","add","withFiber","fiber","context","getUnsafe","buildWithScope","succeed","length","resource","succeedContext","make","empty","evaluate","syncContext","effectImpl","service","effectContext","value","_","provide","effectDiscard","as","unwrap","mergeAllEffect","layers","parentScope","forEach","concurrency","mergeAll","merge","that","Array","isArray","provideWith","f","provideContext","merged","provideMerge","tap","tapError","catch_","error","fail","tapCause","catchCause","cause","failCause","orDie","onError","e","catch","catchTag","k","updateService","asEffect","fresh","launch","scoped","never","mock","implementation","mockImpl","Proxy","target","prop","_receiver","prevLimit","Error","stackTraceLimit","key","toString","name","makeUnimplemented","dead","assign","die","StreamTypeId","channel","ChannelTypeId","transform","unimplemented","setPrototypeOf","getPrototypeOf","satisfiesSuccessType","satisfiesErrorType","satisfiesServicesType","span","options","addSpanStackTrace","ParentSpan","onEnd","makeSpanScoped","addFinalizer","parentSpan","withSpan","dataFirst","undefined","withParentSpan","provideStackFrame","provideSpanStackFrame","captureStackTrace","parentSpanLayer","stack","parent"],"sources":["../src/Layer.ts"],"sourcesContent":[null],"mappings":"AA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jJ,SAAS,CAAC,CAAC,CAAC,CAAC,EAAEoJ,eAAe,CAAC;EAClE;EACA,OAAQjJ,IAA0B,IAAK+D,OAAO,CAAC+E,iBAAiB,CAAC9I,IAAI,CAAC,EAAEiJ,eAAe,CAAC;AAC1F,CAAQ;AAER,MAAMF,qBAAqB,GAAGA,CAAC5B,IAAY,EAAE+B,KAA6C,KAAI;EAC5FA,KAAK,GAAG,OAAOA,KAAK,KAAK,UAAU,GAAGA,KAAK,GAAGzK,cAAc;EAC5D,OAAOwH,aAAa,CAAChH,iBAAiB,EAAGkK,MAAM,KAAM;IACnDhC,IAAI;IACJ+B,KAAK;IACLC;GACD,CAAC,CAAC;AACL,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Layer.js","names":["Context","Deferred","constant","constTrue","constUndefined","dual","identity","core","internalEffect","internalTracer","pipeArguments","hasProperty","CurrentStackFrame","Scope","Tracer","TypeId","MemoMapTypeId","memoMapReuse","entry","scope","observers","andThen","scopeAddFinalizerExit","exit","finalizer","effect","isLayer","u","LayerProto","_ROut","_E","_RIn","pipe","arguments","fromBuildUnsafe","build","self","Object","create","fromBuild","memoMap","layerScope","forkUnsafe","onExit","_tag","close","void","fromBuildMemo","getOrElseMemoize","memoMapBuild","layer","makeUnsafe","deferred","await","suspend","map","delete","set","flatMap","done","MemoMapImpl","parent","constructor","Map","get","local","existing","makeMemoMapUnsafe","forkMemoMapUnsafe","makeMemoMap","sync","forkMemoMap","CurrentMemoMap","Service","getOrCreate","getOrElse","buildWithMemoMap","provideService","add","withFiber","fiber","context","getUnsafe","buildWithScope","succeed","length","resource","succeedContext","make","empty","evaluate","syncContext","effectImpl","service","effectContext","value","_","provide","effectDiscard","as","unwrap","mergeAllEffect","layers","parentScope","forEach","concurrency","mergeAll","merge","that","Array","isArray","provideWith","f","provideContext","merged","provideMerge","tap","tapError","catch_","error","fail","tapCause","catchCause","cause","failCause","orDie","onError","e","catch","catchTag","k","updateService","fresh","launch","scoped","never","mock","implementation","mockImpl","Proxy","target","prop","_receiver","prevLimit","Error","stackTraceLimit","key","toString","name","makeUnimplemented","has","dead","assign","die","StreamTypeId","channel","ChannelTypeId","transform","unimplemented","setPrototypeOf","getPrototypeOf","satisfiesSuccessType","satisfiesErrorType","satisfiesServicesType","span","options","addSpanStackTrace","ParentSpan","onEnd","makeSpanScoped","addFinalizer","parentSpan","withSpan","dataFirst","undefined","withParentSpan","provideStackFrame","provideSpanStackFrame","captureStackTrace","parentSpanLayer","stack"],"sources":["../src/Layer.ts"],"sourcesContent":[null],"mappings":"AAcA,OAAO,KAAKA,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAIzC,SAASC,QAAQ,EAAEC,SAAS,EAAEC,cAAc,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AACnF,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AAEtD,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AACtD,SAAwBC,aAAa,QAAQ,eAAe;AAC5D,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,iBAAiB,QAAQ,iBAAiB;AACnD,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,OAAO,KAAKC,MAAM,MAAM,aAAa;AAIrC,MAAMC,MAAM,GAAG,eAAe;AAoJ9B,MAAMC,aAAa,GAAG,uBAAuB;AAwD7C,MAAMC,YAAY,GAAGA,CACnBC,KAAmB,EACnBC,KAAkB,KACuB;EACzCD,KAAK,CAACE,SAAS,EAAE;EACjB,OAAOZ,cAAc,CAACa,OAAO,CAC3Bb,cAAc,CAACc,qBAAqB,CAACH,KAAK,EAAGI,IAAI,IAAKL,KAAK,CAACM,SAAS,CAACD,IAAI,CAAC,CAAC,EAC5EL,KAAK,CAACO,MAAM,CACb;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMC,OAAO,GAAIC,CAAU,IAA4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IACxByH,OAAO,GAAG5J,cAAc,CAAC6J,iBAAiB,CAACD,OAAO,CAAC;IACnDW,iBAAiB,GAAGC,qBAAqB,CAACb,IAAI,CAAChB,IAAI,EAAEiB,OAAO,EAAEa,iBAAiB,CAAC;EAClF;EACA,MAAMC,eAAe,GAAGR,UAAU,CAACP,IAAI,CAAC;EACxC,IAAIS,SAAS,EAAE;IACb,OAAO5E,OAAO,CAAC+E,iBAAiB,CAAC/I,SAAS,CAAC,CAAC,CAAC,CAAC,EAAEkJ,eAAe,CAAC;EAClE;EACA,OAAQ/I,IAA0B,IAAK6D,OAAO,CAAC+E,iBAAiB,CAAC5I,IAAI,CAAC,EAAE+I,eAAe,CAAC;AAC1F,CAAQ;AAER,MAAMF,qBAAqB,GAAGA,CAAC7B,IAAY,EAAEgC,KAA6C,KAAI;EAC5FA,KAAK,GAAG,OAAOA,KAAK,KAAK,UAAU,GAAGA,KAAK,GAAGhL,cAAc;EAC5D,OAAO+H,aAAa,CAACvH,iBAAiB,EAAGiD,MAAM,KAAM;IACnDuF,IAAI;IACJgC,KAAK;IACLvH;GACD,CAAC,CAAC;AACL,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/LayerMap.d.ts b/.opencode/node_modules/effect/dist/LayerMap.d.ts index aad40007e5218e3004b7c2999a0eaa2aa8307355..ef3dfc11d60e989c4777afa19b3f16b9573968d4 100644 --- a/.opencode/node_modules/effect/dist/LayerMap.d.ts +++ b/.opencode/node_modules/effect/dist/LayerMap.d.ts @@ -1,4 +1,12 @@ /** + * Caches scoped services selected by key and built from layers. + * + * A `LayerMap` turns a key into a cached service `Context` and + * exposes that context as either a `Layer` or a scoped effect. Entries can be + * invalidated explicitly or released after they sit unused. This is useful for + * keyed resource families such as tenant clients, regional connections, or + * environment-specific services. + * * @since 3.14.0 */ import * as Context from "./Context.ts"; @@ -11,11 +19,17 @@ import type { NoExcessProperties } from "./Types.ts"; declare const TypeId = "~effect/LayerMap"; type IdleTimeToLiveInput = Duration.Input | ((key: K) => Duration.Input); /** - * @since 3.14.0 - * @category Models - * @example + * A scoped, keyed map of layer-built service contexts. + * + * **Details** + * + * A `LayerMap` builds resources for a key on demand, exposes them as a `Layer` + * or scoped `Context`, and can invalidate cached resources for a key. + * + * **Example** (Managing keyed layers) + * * ```ts - * import { Effect, Layer, LayerMap, Context } from "effect" + * import { Context, Effect, Layer, LayerMap } from "effect" * * // Define a service key * const DatabaseService = Context.Service<{ @@ -43,6 +57,9 @@ type IdleTimeToLiveInput = Duration.Input | ((key: K) => Duration.Input); * yield* layerMap.invalidate("development") * }) * ``` + * + * @category models + * @since 3.14.0 */ export interface LayerMap { readonly [TypeId]: typeof TypeId; @@ -64,15 +81,12 @@ export interface LayerMap { invalidate(key: K): Effect.Effect; } /** - * @since 3.14.0 - * @category Constructors + * Creates a `LayerMap` that dynamically provides resources based on a key. * - * A `LayerMap` allows you to create a map of Layer's that can be used to - * dynamically access resources based on a key. + * **Example** (Creating a layer map) * - * @example * ```ts - * import { Effect, Layer, LayerMap, Context } from "effect" + * import { Context, Effect, Layer, LayerMap } from "effect" * * // Define a service key * const DatabaseService = Context.Service<{ @@ -104,17 +118,26 @@ export interface LayerMap { * console.log(result) // "development: SELECT * FROM users" * }) * ``` + * + * @category constructors + * @since 3.14.0 */ export declare const make: , PreloadKeys extends Iterable | undefined = undefined>(lookup: (key: K) => L, options?: { readonly idleTimeToLive?: IdleTimeToLiveInput | undefined; readonly preloadKeys?: PreloadKeys; } | undefined) => Effect.Effect, Layer.Error>, PreloadKeys extends undefined ? never : Layer.Error, Scope.Scope | Layer.Services>; /** - * @since 3.14.0 - * @category Constructors - * @example + * Creates a `LayerMap` from a record of predefined layers. + * + * **Details** + * + * The record keys become the keys accepted by the returned `LayerMap`, and the + * record values are the layers built for those keys. + * + * **Example** (Creating a layer map from a record) + * * ```ts - * import { Effect, Layer, LayerMap, Context } from "effect" + * import { Context, Effect, Layer, LayerMap } from "effect" * * // Define service keys * const DevDatabase = Context.Service<{ @@ -148,14 +171,32 @@ export declare const make: , PreloadKeys * console.log("LayerMap created from record") * }) * ``` + * + * @category constructors + * @since 3.14.0 */ export declare const fromRecord: >, const Preload extends boolean = false>(layers: Layers, options?: { readonly idleTimeToLive?: IdleTimeToLiveInput | undefined; readonly preload?: Preload | undefined; } | undefined) => Effect.Effect, Layer.Error>, Preload extends true ? Layer.Error : never, Scope.Scope | (Layers[keyof Layers] extends Layer.Layer ? _R : never)>; /** + * Service class shape produced by `LayerMap.Service`. + * + * **When to use** + * + * Use as the public type for classes returned by `LayerMap.Service` when an API + * needs to accept, return, or alias the generated service class and its static + * helpers. + * + * **Details** + * + * It combines a `Context.Service` tag for the `LayerMap` with default layers + * and helper accessors for retrieving, using, and invalidating keyed resources. + * + * @see {@link Service} for creating concrete `LayerMap` service classes + * + * @category services * @since 3.14.0 - * @category Service */ export interface TagClass> extends Context.ServiceClass> { /** @@ -180,15 +221,13 @@ export interface TagClass Effect.Effect; } /** - * @since 3.14.0 - * @category Service - * * Create a `LayerMap` service that provides a dynamic set of resources based on * a key. * - * @example + * **Example** (Defining a layer map service) + * * ```ts - * import { Console, Effect, Layer, LayerMap, Context } from "effect" + * import { Console, Context, Effect, Layer, LayerMap } from "effect" * * // Define a service key * const Greeter = Context.Service<{ @@ -220,6 +259,9 @@ export interface TagClass() => Layer.Layer; @@ -247,13 +289,16 @@ export declare const Service: () => >; } ? Options["dependencies"][number] : never>; /** + * Type helpers for values created with `LayerMap.Service`. + * * @since 3.14.0 - * @category Service */ export declare namespace Service { /** + * Extracts the key type accepted by a `LayerMap.Service` definition. + * + * @category services * @since 3.14.0 - * @category Service */ type Key = Options extends { readonly lookup: (key: infer K) => any; @@ -261,8 +306,10 @@ export declare namespace Service { readonly layers: infer Layers; } ? keyof Layers : never; /** + * Extracts the layer type produced by a `LayerMap.Service` definition. + * + * @category services * @since 3.14.0 - * @category Service */ type Layers = Options extends { readonly lookup: (key: infer _K) => infer Layers; @@ -270,18 +317,26 @@ export declare namespace Service { readonly layers: infer Layers; } ? Layers[keyof Layers] : never; /** + * Extracts the services provided by the layers in a `LayerMap.Service` + * definition. + * + * @category services * @since 3.14.0 - * @category Service */ type Success = Layers extends Layer.Layer ? _A : never; /** + * Extracts the error type of the layers in a `LayerMap.Service` definition. + * + * @category services * @since 3.14.0 - * @category Service */ type Error = Layers extends Layer.Layer ? _E : never; /** - * @since 3.14.0 - * @category Service + * Extracts the service requirements of the layers in a `LayerMap.Service` + * definition. + * + * @category services + * @since 4.0.0 */ type Services = Layers extends Layer.Layer ? _R : never; } diff --git a/.opencode/node_modules/effect/dist/LayerMap.d.ts.map b/.opencode/node_modules/effect/dist/LayerMap.d.ts.map index 651da2637e6fde9a395740048e87fc68874e0c9c..23b65aec645e601a86e24aa29356e7a6c187f68e 100644 --- a/.opencode/node_modules/effect/dist/LayerMap.d.ts.map +++ b/.opencode/node_modules/effect/dist/LayerMap.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"LayerMap.d.ts","sourceRoot":"","sources":["../src/LayerMap.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAW,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAE7D,QAAA,MAAM,MAAM,qBAAqB,CAAA;AAEjC,KAAK,mBAAmB,CAAC,CAAC,IAAI,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAA;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,QAA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AAS;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,MAAM,CAAC,GACxE,KAAK,CAAA;IAET;;;;;;OAMG;IACH,KAAY,OAAO,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,CAAA;IAE7G;;;;;OAKG;IACH,KAAY,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,CAAA;IAE3G;;;;;;OAMG;IACH,KAAY,QAAQ,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,CAAA;CAC/G"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/LayerMap.js b/.opencode/node_modules/effect/dist/LayerMap.js index 6c167c8b1bd628925c5c297239e51579af0f3cb7..b0333ad2a6d64c7dec90d1a8f980de47d91f721e 100644 --- a/.opencode/node_modules/effect/dist/LayerMap.js +++ b/.opencode/node_modules/effect/dist/LayerMap.js @@ -1,4 +1,12 @@ /** + * Caches scoped services selected by key and built from layers. + * + * A `LayerMap` turns a key into a cached service `Context` and + * exposes that context as either a `Layer` or a scoped effect. Entries can be + * invalidated explicitly or released after they sit unused. This is useful for + * keyed resource families such as tenant clients, regional connections, or + * environment-specific services. + * * @since 3.14.0 */ import * as Context from "./Context.js"; @@ -9,15 +17,12 @@ import * as RcMap from "./RcMap.js"; import * as Scope from "./Scope.js"; const TypeId = "~effect/LayerMap"; /** - * @since 3.14.0 - * @category Constructors + * Creates a `LayerMap` that dynamically provides resources based on a key. * - * A `LayerMap` allows you to create a map of Layer's that can be used to - * dynamically access resources based on a key. + * **Example** (Creating a layer map) * - * @example * ```ts - * import { Effect, Layer, LayerMap, Context } from "effect" + * import { Context, Effect, Layer, LayerMap } from "effect" * * // Define a service key * const DatabaseService = Context.Service<{ @@ -49,6 +54,9 @@ const TypeId = "~effect/LayerMap"; * console.log(result) // "development: SELECT * FROM users" * }) * ``` + * + * @category constructors + * @since 3.14.0 */ export const make = /*#__PURE__*/Effect.fnUntraced(function* (lookup, options) { const context = yield* Effect.context(); @@ -66,11 +74,17 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (lookup, options) { }); }); /** - * @since 3.14.0 - * @category Constructors - * @example + * Creates a `LayerMap` from a record of predefined layers. + * + * **Details** + * + * The record keys become the keys accepted by the returned `LayerMap`, and the + * record values are the layers built for those keys. + * + * **Example** (Creating a layer map from a record) + * * ```ts - * import { Effect, Layer, LayerMap, Context } from "effect" + * import { Context, Effect, Layer, LayerMap } from "effect" * * // Define service keys * const DevDatabase = Context.Service<{ @@ -104,21 +118,22 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (lookup, options) { * console.log("LayerMap created from record") * }) * ``` + * + * @category constructors + * @since 3.14.0 */ export const fromRecord = (layers, options) => make(key => layers[key], { ...options, preloadKeys: options?.preload ? Object.keys(layers) : undefined }); /** - * @since 3.14.0 - * @category Service - * * Create a `LayerMap` service that provides a dynamic set of resources based on * a key. * - * @example + * **Example** (Defining a layer map service) + * * ```ts - * import { Console, Effect, Layer, LayerMap, Context } from "effect" + * import { Console, Context, Effect, Layer, LayerMap } from "effect" * * // Define a service key * const Greeter = Context.Service<{ @@ -150,6 +165,9 @@ export const fromRecord = (layers, options) => make(key => layers[key], { * Effect.provide(GreeterMap.layer) * ) * ``` + * + * @category services + * @since 3.14.0 */ export const Service = () => (id, options) => { const Err = globalThis.Error; @@ -168,9 +186,9 @@ export const Service = () => (id, options) => { }); TagClass_.layerNoDeps = Layer.effect(TagClass_)("lookup" in options ? make(options.lookup, options) : fromRecord(options.layers, options)); TagClass_.layer = options.dependencies && options.dependencies.length > 0 ? Layer.provide(TagClass_.layerNoDeps, options.dependencies) : TagClass_.layerNoDeps; - TagClass_.get = key => Layer.unwrap(Effect.map(TagClass_.asEffect(), layerMap => layerMap.get(key))); - TagClass_.contextEffect = key => Effect.flatMap(TagClass_.asEffect(), layerMap => layerMap.contextEffect(key)); - TagClass_.invalidate = key => Effect.flatMap(TagClass_.asEffect(), layerMap => layerMap.invalidate(key)); + TagClass_.get = key => Layer.unwrap(Effect.map(TagClass_, layerMap => layerMap.get(key))); + TagClass_.contextEffect = key => Effect.flatMap(TagClass_, layerMap => layerMap.contextEffect(key)); + TagClass_.invalidate = key => Effect.flatMap(TagClass_, layerMap => layerMap.invalidate(key)); return TagClass; }; //# sourceMappingURL=LayerMap.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/LayerMap.js.map b/.opencode/node_modules/effect/dist/LayerMap.js.map index 2ba9e08e3d542dc6ee97807d0d661a18ba17bc45..b128f75897269146e12263545394a28b3399adac 100644 --- a/.opencode/node_modules/effect/dist/LayerMap.js.map +++ b/.opencode/node_modules/effect/dist/LayerMap.js.map @@ -1 +1 @@ -{"version":3,"file":"LayerMap.js","names":["Context","Effect","identity","Layer","RcMap","Scope","TypeId","make","fnUntraced","lookup","options","context","memoMap","CurrentMemoMap","getOrCreate","rcMap","key","contextWith","_","buildWithMemoMap","get","idleTimeToLive","effectContext","contextEffect","invalidate","fromRecord","layers","preloadKeys","preload","Object","keys","undefined","Service","id","Err","globalThis","Error","limit","stackTraceLimit","creationError","TagClass","TagClass_","setPrototypeOf","getPrototypeOf","defineProperty","stack","layerNoDeps","effect","layer","dependencies","length","provide","unwrap","map","asEffect","layerMap","flatMap"],"sources":["../src/LayerMap.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,OAAO,MAAM,cAAc;AAEvC,OAAO,KAAK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,OAAO,CAACuC,YAAY,IAAIvC,OAAO,CAACuC,YAAY,CAACC,MAAM,GAAG,CAAC,GACvE/C,KAAK,CAACgD,OAAO,CAACV,SAAS,CAACK,WAAW,EAAEpC,OAAO,CAACuC,YAAmB,CAAC,GACjER,SAAS,CAACK,WAAW;EAEvBL,SAAS,CAACrB,GAAG,GAAIJ,GAAW,IAAKb,KAAK,CAACiD,MAAM,CAACnD,MAAM,CAACoD,GAAG,CAACZ,SAAS,CAACa,QAAQ,EAAE,EAAGC,QAAQ,IAAKA,QAAQ,CAACnC,GAAG,CAACJ,GAAG,CAAC,CAAC,CAAC;EAChHyB,SAAS,CAAClB,aAAa,GAAIP,GAAW,IACpCf,MAAM,CAACuD,OAAO,CAACf,SAAS,CAACa,QAAQ,EAAE,EAAGC,QAAQ,IAAKA,QAAQ,CAAChC,aAAa,CAACP,GAAG,CAAC,CAAC;EACjFyB,SAAS,CAACjB,UAAU,GAAIR,GAAW,IAAKf,MAAM,CAACuD,OAAO,CAACf,SAAS,CAACa,QAAQ,EAAE,EAAGC,QAAQ,IAAKA,QAAQ,CAAC/B,UAAU,CAACR,GAAG,CAAC,CAAC;EAEpH,OAAOwB,QAAe;AACxB,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"LayerMap.js","names":["Context","Effect","identity","Layer","RcMap","Scope","TypeId","make","fnUntraced","lookup","options","context","memoMap","CurrentMemoMap","getOrCreate","rcMap","key","contextWith","_","buildWithMemoMap","get","idleTimeToLive","effectContext","contextEffect","invalidate","fromRecord","layers","preloadKeys","preload","Object","keys","undefined","Service","id","Err","globalThis","Error","limit","stackTraceLimit","creationError","TagClass","TagClass_","setPrototypeOf","getPrototypeOf","defineProperty","stack","layerNoDeps","effect","layer","dependencies","length","provide","unwrap","map","layerMap","flatMap"],"sources":["../src/LayerMap.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAWA,OAAO,KAAKA,OAAO,MAAM,cAAc;AAEvC,OAAO,KAAKC,MAAM,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GtC,OAAO,CAACuC,YAAY,IAAIvC,OAAO,CAACuC,YAAY,CAACC,MAAM,GAAG,CAAC,GACvE/C,KAAK,CAACgD,OAAO,CAACV,SAAS,CAACK,WAAW,EAAEpC,OAAO,CAACuC,YAAmB,CAAC,GACjER,SAAS,CAACK,WAAW;EAEvBL,SAAS,CAACrB,GAAG,GAAIJ,GAAW,IAAKb,KAAK,CAACiD,MAAM,CAACnD,MAAM,CAACoD,GAAG,CAACZ,SAAS,EAAGa,QAAQ,IAAKA,QAAQ,CAAClC,GAAG,CAACJ,GAAG,CAAC,CAAC,CAAC;EACrGyB,SAAS,CAAClB,aAAa,GAAIP,GAAW,IAAKf,MAAM,CAACsD,OAAO,CAACd,SAAS,EAAGa,QAAQ,IAAKA,QAAQ,CAAC/B,aAAa,CAACP,GAAG,CAAC,CAAC;EAC/GyB,SAAS,CAACjB,UAAU,GAAIR,GAAW,IAAKf,MAAM,CAACsD,OAAO,CAACd,SAAS,EAAGa,QAAQ,IAAKA,QAAQ,CAAC9B,UAAU,CAACR,GAAG,CAAC,CAAC;EAEzG,OAAOwB,QAAe;AACxB,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/LogLevel.d.ts b/.opencode/node_modules/effect/dist/LogLevel.d.ts index aa45d0d7239d6371c6f01dfc76e48cdb9d23bdc9..d60836d0a40f13871e54479eb41664630f81bfa5 100644 --- a/.opencode/node_modules/effect/dist/LogLevel.d.ts +++ b/.opencode/node_modules/effect/dist/LogLevel.d.ts @@ -1,108 +1,24 @@ /** - * @since 2.0.0 - * - * The `LogLevel` module provides utilities for managing log levels in Effect applications. - * It defines a hierarchy of log levels and provides functions for comparing and filtering logs - * based on their severity. - * - * ## Log Level Hierarchy - * - * The log levels are ordered from most severe to least severe: - * - * 1. **All** - Special level that allows all messages - * 2. **Fatal** - System is unusable, immediate attention required - * 3. **Error** - Error conditions that should be investigated - * 4. **Warn** - Warning conditions that may indicate problems - * 5. **Info** - Informational messages about normal operation - * 6. **Debug** - Debug information useful during development - * 7. **Trace** - Very detailed trace information - * 8. **None** - Special level that suppresses all messages - * - * ## Basic Usage - * - * ```ts - * import { Effect } from "effect" - * - * // Basic log level usage - * const program = Effect.gen(function*() { - * yield* Effect.logFatal("System is shutting down") - * yield* Effect.logError("Database connection failed") - * yield* Effect.logWarning("Memory usage is high") - * yield* Effect.logInfo("User logged in") - * yield* Effect.logDebug("Processing request") - * yield* Effect.logTrace("Variable value: xyz") - * }) - * ``` - * - * ## Level Comparison - * - * ```ts - * import { LogLevel } from "effect" - * - * // Check if one level is more severe than another - * console.log(LogLevel.isGreaterThan("Error", "Info")) // true - * console.log(LogLevel.isGreaterThan("Debug", "Error")) // false - * - * // Check if level meets minimum threshold - * console.log(LogLevel.isGreaterThanOrEqualTo("Info", "Debug")) // true - * console.log(LogLevel.isLessThan("Trace", "Info")) // true - * ``` - * - * ## Filtering by Level - * - * ```ts - * import { Logger, LogLevel } from "effect" - * - * // Create a logger that only logs Error and above - * const errorLogger = Logger.make((options) => { - * if (LogLevel.isGreaterThanOrEqualTo(options.logLevel, "Error")) { - * console.log(`[${options.logLevel}] ${options.message}`) - * } - * }) - * - * // Production logger - Info and above - * const productionLogger = Logger.make((options) => { - * if (LogLevel.isGreaterThanOrEqualTo(options.logLevel, "Info")) { - * console.log( - * `${options.date.toISOString()} [${options.logLevel}] ${options.message}` - * ) - * } - * }) + * Log-level types and helpers used by Effect logging. The module defines all + * accepted log levels, the concrete emitted severities, the ordered level list, + * equality and ordering instances, threshold comparison helpers, and an effect + * for checking whether a level is enabled by the current logging settings. * - * // Development logger - Debug and above - * const devLogger = Logger.make((options) => { - * if (LogLevel.isGreaterThanOrEqualTo(options.logLevel, "Debug")) { - * console.log(`[${options.logLevel}] ${options.message}`) - * } - * }) - * ``` - * - * ## Runtime Configuration - * - * ```ts - * import { Config, Effect, Logger, LogLevel } from "effect" - * - * // Configure log level from environment - * const logLevelConfig = Config.string("LOG_LEVEL").pipe( - * Config.withDefault("Info") - * ) - * - * const configurableLogger = Effect.gen(function*() { - * const minLevel = yield* logLevelConfig - * - * return Logger.make((options) => { - * if (LogLevel.isGreaterThanOrEqualTo(options.logLevel, minLevel)) { - * console.log(`[${options.logLevel}] ${options.message}`) - * } - * }) - * }) - * ``` + * @since 2.0.0 */ import type * as Effect from "./Effect.ts"; import * as Equ from "./Equivalence.ts"; import * as Ord from "./Order.ts"; /** - * Represents the severity level of a log message. + * Represents every level used by Effect logging, including concrete message + * severities and the `All` and `None` sentinel levels. + * + * **When to use** + * + * Use to type values that may be either concrete log message severities or + * logging configuration sentinels. + * + * **Details** * * The levels are ordered from most severe to least severe: * - `All` - Special level that allows all messages @@ -114,7 +30,8 @@ import * as Ord from "./Order.ts"; * - `Trace` - Very detailed trace information * - `None` - Special level that suppresses all messages * - * @example + * **Example** (Using log levels) + * * ```ts * import { Effect } from "effect" * @@ -133,27 +50,69 @@ import * as Ord from "./Order.ts"; * const debugLevel = "Debug" // LogLevel * ``` * - * @since 4.0.0 * @category models + * @since 2.0.0 */ export type LogLevel = "All" | "Fatal" | "Error" | "Warn" | "Info" | "Debug" | "Trace" | "None"; /** - * @since 4.0.0 + * Log levels that represent actual message severities, excluding the `All` and + * `None` sentinel levels. + * + * **When to use** + * + * Use when typing emitted log message severities, such as explicit log calls, + * current log level references, or error-report severity annotations, where + * `All` and `None` are not valid values. + * + * @see {@link LogLevel} for the wider log-level type that also accepts the + * `All` and `None` sentinel levels + * @see {@link values} for the runtime list of all accepted `LogLevel` values, + * including sentinels + * * @category models + * @since 4.0.0 */ export type Severity = "Fatal" | "Error" | "Warn" | "Info" | "Debug" | "Trace"; /** - * @since 4.0.0 + * Returns all `LogLevel` values in order from `All` through the concrete severities to + * `None`. + * + * **When to use** + * + * Use to enumerate or validate all accepted `LogLevel` string values, including + * the `All` and `None` sentinel levels. + * + * **Details** + * + * The array order matches the module severity order: `All`, concrete + * severities from `Fatal` to `Trace`, then `None`. + * + * **Gotchas** + * + * This list includes `All` and `None`, so it is not limited to concrete emitted + * severities. + * + * @see {@link Severity} for the concrete message severity type that excludes `All` and `None` + * @see {@link Order} for comparing these levels by severity order + * * @category models + * @since 4.0.0 */ export declare const values: ReadonlyArray; /** - * An `Order` instance for `LogLevel` that defines the severity ordering. + * Order instance for `LogLevel` that defines the severity ordering. + * + * **When to use** + * + * Use to sort or compare log levels according to Effect's severity order. + * + * **Details** * * This order treats "All" as the least restrictive level and "None" as the most restrictive, * with Fatal being the most severe actual log level. * - * @example + * **Example** (Ordering log levels) + * * ```ts * import { LogLevel } from "effect" * @@ -163,14 +122,24 @@ export declare const values: ReadonlyArray; * console.log(LogLevel.Order("Info", "Info")) // 0 (Info == Info) * ``` * - * @since 2.0.0 * @category ordering + * @since 2.0.0 */ export declare const Order: Ord.Order; /** - * An `Equivalence` instance for log levels using strict equality (`===`). + * Equivalence instance for log levels using strict equality (`===`). + * + * **When to use** + * + * Use to compare two `LogLevel` values when only the exact same level should + * match. + * + * **Details** + * + * Each log level string, including `All` and `None`, only matches itself. + * + * **Example** (Comparing log levels) * - * @example * ```ts * import { LogLevel } from "effect" * @@ -178,6 +147,9 @@ export declare const Order: Ord.Order; * console.log(LogLevel.Equivalence("Error", "Info")) // false * ``` * + * @see {@link Order} for severity ordering rather than exact level equality + * @see {@link isGreaterThanOrEqualTo} for minimum-threshold checks + * * @category instances * @since 4.0.0 */ @@ -185,17 +157,43 @@ export declare const Equivalence: Equ.Equivalence; /** * Returns the ordinal value of the log level. * - * @since 4.0.0 + * **When to use** + * + * Use to project a `LogLevel` into the numeric sort key used by + * `LogLevel.Order` when custom ordering code or an integration needs a number + * instead of an `Order` comparison. + * + * **Details** + * + * The mapping is `All` to `Number.MIN_SAFE_INTEGER`, `Trace` to `0`, `Debug` to + * `10000`, `Info` to `20000`, `Warn` to `30000`, `Error` to `40000`, `Fatal` to + * `50000`, and `None` to `Number.MAX_SAFE_INTEGER`. + * + * **Gotchas** + * + * These ordinals are internal sort keys; do not treat them as external severity + * numbers. + * + * @see {@link Order} for comparing log levels without exposing numeric keys + * @see {@link isGreaterThanOrEqualTo} for minimum-threshold filtering + * * @category ordering + * @since 4.0.0 */ export declare const getOrdinal: (self: LogLevel) => number; /** * Determines if the first log level is more severe than the second. * + * **When to use** + * + * Use to check whether one log level is strictly more severe than another. + * + * **Details** + * * Returns `true` if `self` represents a more severe level than `that`. - * This is useful for filtering logs based on minimum severity requirements. * - * @example + * **Example** (Checking higher severity) + * * ```ts * import { LogLevel } from "effect" * @@ -217,17 +215,23 @@ export declare const getOrdinal: (self: LogLevel) => number; * console.log(isMoreSevereThanInfo("Debug")) // false * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ export declare const isGreaterThan: { /** * Determines if the first log level is more severe than the second. * + * **When to use** + * + * Use to check whether one log level is strictly more severe than another. + * + * **Details** + * * Returns `true` if `self` represents a more severe level than `that`. - * This is useful for filtering logs based on minimum severity requirements. * - * @example + * **Example** (Checking higher severity) + * * ```ts * import { LogLevel } from "effect" * @@ -249,17 +253,23 @@ export declare const isGreaterThan: { * console.log(isMoreSevereThanInfo("Debug")) // false * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ (that: LogLevel): (self: LogLevel) => boolean; /** * Determines if the first log level is more severe than the second. * + * **When to use** + * + * Use to check whether one log level is strictly more severe than another. + * + * **Details** + * * Returns `true` if `self` represents a more severe level than `that`. - * This is useful for filtering logs based on minimum severity requirements. * - * @example + * **Example** (Checking higher severity) + * * ```ts * import { LogLevel } from "effect" * @@ -281,18 +291,25 @@ export declare const isGreaterThan: { * console.log(isMoreSevereThanInfo("Debug")) // false * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ (self: LogLevel, that: LogLevel): boolean; }; /** * Determines if the first log level is more severe than or equal to the second. * + * **When to use** + * + * Use to implement minimum log-level filtering by checking whether a message + * level meets a threshold. + * + * **Details** + * * Returns `true` if `self` represents a level that is more severe than or equal to `that`. - * This is the most common function for implementing minimum log level filtering. * - * @example + * **Example** (Filtering by minimum log level) + * * ```ts * import { Logger, LogLevel } from "effect" * @@ -322,17 +339,24 @@ export declare const isGreaterThan: { * const shouldLog = isInfoOrAbove("Error") // true * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ export declare const isGreaterThanOrEqualTo: { /** * Determines if the first log level is more severe than or equal to the second. * + * **When to use** + * + * Use to implement minimum log-level filtering by checking whether a message + * level meets a threshold. + * + * **Details** + * * Returns `true` if `self` represents a level that is more severe than or equal to `that`. - * This is the most common function for implementing minimum log level filtering. * - * @example + * **Example** (Filtering by minimum log level) + * * ```ts * import { Logger, LogLevel } from "effect" * @@ -362,17 +386,24 @@ export declare const isGreaterThanOrEqualTo: { * const shouldLog = isInfoOrAbove("Error") // true * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ (that: LogLevel): (self: LogLevel) => boolean; /** * Determines if the first log level is more severe than or equal to the second. * + * **When to use** + * + * Use to implement minimum log-level filtering by checking whether a message + * level meets a threshold. + * + * **Details** + * * Returns `true` if `self` represents a level that is more severe than or equal to `that`. - * This is the most common function for implementing minimum log level filtering. * - * @example + * **Example** (Filtering by minimum log level) + * * ```ts * import { Logger, LogLevel } from "effect" * @@ -402,18 +433,24 @@ export declare const isGreaterThanOrEqualTo: { * const shouldLog = isInfoOrAbove("Error") // true * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ (self: LogLevel, that: LogLevel): boolean; }; /** * Determines if the first log level is less severe than the second. * + * **When to use** + * + * Use to check whether one log level is strictly less severe than another. + * + * **Details** + * * Returns `true` if `self` represents a less severe level than `that`. - * This is useful for filtering out logs that are too verbose. * - * @example + * **Example** (Checking lower severity) + * * ```ts * import { LogLevel } from "effect" * @@ -435,17 +472,23 @@ export declare const isGreaterThanOrEqualTo: { * console.log(isLessSevereThanError("Fatal")) // false * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ export declare const isLessThan: { /** * Determines if the first log level is less severe than the second. * + * **When to use** + * + * Use to check whether one log level is strictly less severe than another. + * + * **Details** + * * Returns `true` if `self` represents a less severe level than `that`. - * This is useful for filtering out logs that are too verbose. * - * @example + * **Example** (Checking lower severity) + * * ```ts * import { LogLevel } from "effect" * @@ -467,17 +510,23 @@ export declare const isLessThan: { * console.log(isLessSevereThanError("Fatal")) // false * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ (that: LogLevel): (self: LogLevel) => boolean; /** * Determines if the first log level is less severe than the second. * + * **When to use** + * + * Use to check whether one log level is strictly less severe than another. + * + * **Details** + * * Returns `true` if `self` represents a less severe level than `that`. - * This is useful for filtering out logs that are too verbose. * - * @example + * **Example** (Checking lower severity) + * * ```ts * import { LogLevel } from "effect" * @@ -499,18 +548,25 @@ export declare const isLessThan: { * console.log(isLessSevereThanError("Fatal")) // false * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ (self: LogLevel, that: LogLevel): boolean; }; /** * Determines if the first log level is less severe than or equal to the second. * + * **When to use** + * + * Use to implement maximum log-level filtering by checking whether a level is + * at or below a threshold. + * + * **Details** + * * Returns `true` if `self` represents a level that is less severe than or equal to `that`. - * This is useful for implementing maximum log level filtering. * - * @example + * **Example** (Filtering by maximum log level) + * * ```ts * import { Logger, LogLevel } from "effect" * @@ -538,17 +594,24 @@ export declare const isLessThan: { * const shouldLog = isInfoOrBelow("Debug") // true * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ export declare const isLessThanOrEqualTo: { /** * Determines if the first log level is less severe than or equal to the second. * + * **When to use** + * + * Use to implement maximum log-level filtering by checking whether a level is + * at or below a threshold. + * + * **Details** + * * Returns `true` if `self` represents a level that is less severe than or equal to `that`. - * This is useful for implementing maximum log level filtering. * - * @example + * **Example** (Filtering by maximum log level) + * * ```ts * import { Logger, LogLevel } from "effect" * @@ -576,17 +639,24 @@ export declare const isLessThanOrEqualTo: { * const shouldLog = isInfoOrBelow("Debug") // true * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ (that: LogLevel): (self: LogLevel) => boolean; /** * Determines if the first log level is less severe than or equal to the second. * + * **When to use** + * + * Use to implement maximum log-level filtering by checking whether a level is + * at or below a threshold. + * + * **Details** + * * Returns `true` if `self` represents a level that is less severe than or equal to `that`. - * This is useful for implementing maximum log level filtering. * - * @example + * **Example** (Filtering by maximum log level) + * * ```ts * import { Logger, LogLevel } from "effect" * @@ -614,18 +684,26 @@ export declare const isLessThanOrEqualTo: { * const shouldLog = isInfoOrBelow("Debug") // true * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ (self: LogLevel, that: LogLevel): boolean; }; /** * Checks whether a given log level is enabled for the current fiber. * + * **When to use** + * + * Use to check whether a log level would be emitted under the current fiber's + * minimum log level. + * + * **Details** + * * A log level is enabled when it is greater than or equal to * `References.MinimumLogLevel`. * - * @example + * **Example** (Checking current fiber log level) + * * ```ts * import { Effect, LogLevel, References } from "effect" * @@ -641,8 +719,8 @@ export declare const isLessThanOrEqualTo: { * ) * ``` * - * @since 4.0.0 * @category filtering + * @since 4.0.0 */ export declare const isEnabled: (self: LogLevel) => Effect.Effect; //# sourceMappingURL=LogLevel.d.ts.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/LogLevel.d.ts.map b/.opencode/node_modules/effect/dist/LogLevel.d.ts.map index 406b5e240141d1971ddea3547a8972a1e66d19bd..4a2a95066b3c203cb375d30780e5e0c342da8db6 100644 --- a/.opencode/node_modules/effect/dist/LogLevel.d.ts.map +++ b/.opencode/node_modules/effect/dist/LogLevel.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"LogLevel.d.ts","sourceRoot":"","sources":["../src/LogLevel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmGG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAA;AAGvC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modules/effect/dist/LogLevel.js b/.opencode/node_modules/effect/dist/LogLevel.js index 724e25836b7893a62f5dfc684b0fccba71357c68..d5897195424208cfb11b9185f709d4c8bd264737 100644 --- a/.opencode/node_modules/effect/dist/LogLevel.js +++ b/.opencode/node_modules/effect/dist/LogLevel.js @@ -4,17 +4,45 @@ import * as effect from "./internal/effect.js"; import * as Ord from "./Order.js"; import * as References from "./References.js"; /** - * @since 4.0.0 + * Returns all `LogLevel` values in order from `All` through the concrete severities to + * `None`. + * + * **When to use** + * + * Use to enumerate or validate all accepted `LogLevel` string values, including + * the `All` and `None` sentinel levels. + * + * **Details** + * + * The array order matches the module severity order: `All`, concrete + * severities from `Fatal` to `Trace`, then `None`. + * + * **Gotchas** + * + * This list includes `All` and `None`, so it is not limited to concrete emitted + * severities. + * + * @see {@link Severity} for the concrete message severity type that excludes `All` and `None` + * @see {@link Order} for comparing these levels by severity order + * * @category models + * @since 4.0.0 */ export const values = ["All", "Fatal", "Error", "Warn", "Info", "Debug", "Trace", "None"]; /** - * An `Order` instance for `LogLevel` that defines the severity ordering. + * Order instance for `LogLevel` that defines the severity ordering. + * + * **When to use** + * + * Use to sort or compare log levels according to Effect's severity order. + * + * **Details** * * This order treats "All" as the least restrictive level and "None" as the most restrictive, * with Fatal being the most severe actual log level. * - * @example + * **Example** (Ordering log levels) + * * ```ts * import { LogLevel } from "effect" * @@ -24,14 +52,24 @@ export const values = ["All", "Fatal", "Error", "Warn", "Info", "Debug", "Trace" * console.log(LogLevel.Order("Info", "Info")) // 0 (Info == Info) * ``` * - * @since 2.0.0 * @category ordering + * @since 2.0.0 */ export const Order = effect.LogLevelOrder; /** - * An `Equivalence` instance for log levels using strict equality (`===`). + * Equivalence instance for log levels using strict equality (`===`). + * + * **When to use** + * + * Use to compare two `LogLevel` values when only the exact same level should + * match. + * + * **Details** + * + * Each log level string, including `All` and `None`, only matches itself. + * + * **Example** (Comparing log levels) * - * @example * ```ts * import { LogLevel } from "effect" * @@ -39,6 +77,9 @@ export const Order = effect.LogLevelOrder; * console.log(LogLevel.Equivalence("Error", "Info")) // false * ``` * + * @see {@link Order} for severity ordering rather than exact level equality + * @see {@link isGreaterThanOrEqualTo} for minimum-threshold checks + * * @category instances * @since 4.0.0 */ @@ -46,17 +87,43 @@ export const Equivalence = /*#__PURE__*/Equ.strictEqual(); /** * Returns the ordinal value of the log level. * - * @since 4.0.0 + * **When to use** + * + * Use to project a `LogLevel` into the numeric sort key used by + * `LogLevel.Order` when custom ordering code or an integration needs a number + * instead of an `Order` comparison. + * + * **Details** + * + * The mapping is `All` to `Number.MIN_SAFE_INTEGER`, `Trace` to `0`, `Debug` to + * `10000`, `Info` to `20000`, `Warn` to `30000`, `Error` to `40000`, `Fatal` to + * `50000`, and `None` to `Number.MAX_SAFE_INTEGER`. + * + * **Gotchas** + * + * These ordinals are internal sort keys; do not treat them as external severity + * numbers. + * + * @see {@link Order} for comparing log levels without exposing numeric keys + * @see {@link isGreaterThanOrEqualTo} for minimum-threshold filtering + * * @category ordering + * @since 4.0.0 */ export const getOrdinal = self => effect.logLevelToOrder(self); /** * Determines if the first log level is more severe than the second. * + * **When to use** + * + * Use to check whether one log level is strictly more severe than another. + * + * **Details** + * * Returns `true` if `self` represents a more severe level than `that`. - * This is useful for filtering logs based on minimum severity requirements. * - * @example + * **Example** (Checking higher severity) + * * ```ts * import { LogLevel } from "effect" * @@ -78,17 +145,24 @@ export const getOrdinal = self => effect.logLevelToOrder(self); * console.log(isMoreSevereThanInfo("Debug")) // false * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ export const isGreaterThan = effect.isLogLevelGreaterThan; /** * Determines if the first log level is more severe than or equal to the second. * + * **When to use** + * + * Use to implement minimum log-level filtering by checking whether a message + * level meets a threshold. + * + * **Details** + * * Returns `true` if `self` represents a level that is more severe than or equal to `that`. - * This is the most common function for implementing minimum log level filtering. * - * @example + * **Example** (Filtering by minimum log level) + * * ```ts * import { Logger, LogLevel } from "effect" * @@ -118,17 +192,23 @@ export const isGreaterThan = effect.isLogLevelGreaterThan; * const shouldLog = isInfoOrAbove("Error") // true * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ export const isGreaterThanOrEqualTo = /*#__PURE__*/Ord.isGreaterThanOrEqualTo(Order); /** * Determines if the first log level is less severe than the second. * + * **When to use** + * + * Use to check whether one log level is strictly less severe than another. + * + * **Details** + * * Returns `true` if `self` represents a less severe level than `that`. - * This is useful for filtering out logs that are too verbose. * - * @example + * **Example** (Checking lower severity) + * * ```ts * import { LogLevel } from "effect" * @@ -150,17 +230,24 @@ export const isGreaterThanOrEqualTo = /*#__PURE__*/Ord.isGreaterThanOrEqualTo(Or * console.log(isLessSevereThanError("Fatal")) // false * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ export const isLessThan = /*#__PURE__*/Ord.isLessThan(Order); /** * Determines if the first log level is less severe than or equal to the second. * + * **When to use** + * + * Use to implement maximum log-level filtering by checking whether a level is + * at or below a threshold. + * + * **Details** + * * Returns `true` if `self` represents a level that is less severe than or equal to `that`. - * This is useful for implementing maximum log level filtering. * - * @example + * **Example** (Filtering by maximum log level) + * * ```ts * import { Logger, LogLevel } from "effect" * @@ -188,17 +275,25 @@ export const isLessThan = /*#__PURE__*/Ord.isLessThan(Order); * const shouldLog = isInfoOrBelow("Debug") // true * ``` * - * @since 2.0.0 * @category ordering + * @since 4.0.0 */ export const isLessThanOrEqualTo = /*#__PURE__*/Ord.isLessThanOrEqualTo(Order); /** * Checks whether a given log level is enabled for the current fiber. * + * **When to use** + * + * Use to check whether a log level would be emitted under the current fiber's + * minimum log level. + * + * **Details** + * * A log level is enabled when it is greater than or equal to * `References.MinimumLogLevel`. * - * @example + * **Example** (Checking current fiber log level) + * * ```ts * import { Effect, LogLevel, References } from "effect" * @@ -214,8 +309,8 @@ export const isLessThanOrEqualTo = /*#__PURE__*/Ord.isLessThanOrEqualTo(Order); * ) * ``` * - * @since 4.0.0 * @category filtering + * @since 4.0.0 */ export const isEnabled = self => core.withFiber(fiber => effect.succeed(!isGreaterThan(fiber.getRef(References.MinimumLogLevel), self))); //# sourceMappingURL=LogLevel.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/LogLevel.js.map b/.opencode/node_modules/effect/dist/LogLevel.js.map index eea070b29345a74c11b3bc480e1740d78bbc65ec..246824b48d07abe92e2d0bc1e9eb8f792bbe01b6 100644 --- a/.opencode/node_modules/effect/dist/LogLevel.js.map +++ b/.opencode/node_modules/effect/dist/LogLevel.js.map @@ -1 +1 @@ -{"version":3,"file":"LogLevel.js","names":["Equ","core","effect","Ord","References","values","Order","LogLevelOrder","Equivalence","strictEqual","getOrdinal","self","logLevelToOrder","isGreaterThan","isLogLevelGreaterThan","isGreaterThanOrEqualTo","isLessThan","isLessThanOrEqualTo","isEnabled","withFiber","fiber","succeed","getRef","MinimumLogLevel"],"sources":["../src/LogLevel.ts"],"sourcesContent":[null],"mappings":"AAqGA,OAAO,KAAKA,GAAG,MAAM,kBAAkB;AACvC,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAC9C,OAAO,KAAKC,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AA6C7C;;;;AAIA,OAAO,MAAMC,MAAM,GAA4B,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC;AAElH;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,KAAK,GAAwBJ,MAAM,CAACK,aAAa;AAE9D;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,WAAW,gBAA8BR,GAAG,CAACS,WAAW,EAAY;AAEjF;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAIC,IAAc,IAAaT,MAAM,CAACU,eAAe,CAACD,IAAI,CAAC;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,MAAME,aAAa,GAiEtBX,MAAM,CAACY,qBAAqB;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,OAAO,MAAMC,sBAAsB,gBAiF/BZ,GAAG,CAACY,sBAAsB,CAACT,KAAK,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,MAAMU,UAAU,gBAiEnBb,GAAG,CAACa,UAAU,CAACV,KAAK,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,OAAO,MAAMW,mBAAmB,gBA6E5Bd,GAAG,CAACc,mBAAmB,CAACX,KAAK,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMY,SAAS,GAAIP,IAAc,IACtCV,IAAI,CAACkB,SAAS,CAAEC,KAAK,IAAKlB,MAAM,CAACmB,OAAO,CAAC,CAACR,aAAa,CAACO,KAAK,CAACE,MAAM,CAAClB,UAAU,CAACmB,eAAe,CAAC,EAAEZ,IAAI,CAAC,CAAC,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"LogLevel.js","names":["Equ","core","effect","Ord","References","values","Order","LogLevelOrder","Equivalence","strictEqual","getOrdinal","self","logLevelToOrder","isGreaterThan","isLogLevelGreaterThan","isGreaterThanOrEqualTo","isLessThan","isLessThanOrEqualTo","isEnabled","withFiber","fiber","succeed","getRef","MinimumLogLevel"],"sources":["../src/LogLevel.ts"],"sourcesContent":[null],"mappings":"AASA,OAAO,KAAKA,GAAG,MAAM,kBAAkB;AACvC,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAC9C,OAAO,KAAKC,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAoE7C;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMC,MAAM,GAA4B,CAAC,KAAK,EAAE,OAAO,EAAE,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.ts index ee445f47d8fb725cce492dec461b2871397d3672..949e02371dbcd4e3b7fa874eff61616258600b38 100644 --- a/.opencode/node_modules/effect/dist/Logger.d.ts +++ b/.opencode/node_modules/effect/dist/Logger.d.ts @@ -11,7 +11,16 @@ import type { PlatformError } from "./PlatformError.ts"; import type * as Scope from "./Scope.ts"; declare const TypeId = "~effect/Logger"; /** - * @example + * A logger that transforms a runtime log event into an output value. + * + * **Details** + * + * The runtime calls `log` with the message, level, cause, fiber, and timestamp + * for each log event. Use `Logger.layer` to install one or more loggers for an + * effect. + * + * **Example** (Creating custom loggers) + * * ```ts * import { Effect, Logger } from "effect" * @@ -31,15 +40,22 @@ declare const TypeId = "~effect/Logger"; * ) * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface Logger extends Pipeable { readonly [TypeId]: typeof TypeId; log(options: Options): Output; } /** - * @example + * Information supplied to a `Logger` for a single log event. + * + * **Details** + * + * Includes the logged message, log level, cause, current fiber, and timestamp. + * + * **Example** (Accessing logger options) + * * ```ts * import { Effect, Logger } from "effect" * @@ -60,8 +76,8 @@ export interface Logger extends Pipeable { * ) * ``` * + * @category options * @since 2.0.0 - * @category models */ export interface Options { readonly message: Message; @@ -73,7 +89,8 @@ export interface Options { /** * Returns `true` if the specified value is a `Logger`, otherwise returns `false`. * - * @example + * **Example** (Checking logger values) + * * ```ts * import { Logger } from "effect" * @@ -86,12 +103,21 @@ export interface Options { * console.log(Logger.isLogger({ log: () => {} })) // false * ``` * - * @since 2.0.0 * @category guards + * @since 4.0.0 */ export declare const isLogger: (u: unknown) => u is Logger; /** - * @example + * Context reference containing the active loggers for the current fiber. + * + * **Details** + * + * By default this set includes the default logger and the tracer logger. + * Providing `Logger.layer` replaces or merges with this set depending on its + * options. + * + * **Example** (Accessing current loggers) + * * ```ts * import { Effect, Logger } from "effect" * @@ -111,22 +137,42 @@ export declare const isLogger: (u: unknown) => u is Logger; * }) * ``` * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export declare const CurrentLoggers: Context.Reference>>; /** - * @since 4.0.0 + * Context reference that routes the built-in default logger and TTY pretty + * console logger to stderr. + * + * **When to use** + * + * Use to route built-in logger output to stderr while keeping stdout reserved + * for protocol messages or data output. + * + * **Details** + * + * The reference defaults to `false`. Providing `true` makes the affected + * loggers call `console.error` instead of `console.log`. + * + * @see {@link defaultLogger} for the runtime logger affected by this reference + * @see {@link consolePretty} for the TTY-mode pretty console logger affected by this reference + * @see {@link withConsoleError} for routing a specific formatter logger to `console.error` + * * @category references + * @since 4.0.0 */ export declare const LogToStderr: Context.Reference; /** * Transforms the output of a `Logger` using the provided function. * - * This allows you to modify, enhance, or completely change the output format - * of an existing logger without recreating the entire logging logic. + * **When to use** + * + * Use when an existing logger's output should be transformed without recreating the + * logging logic. + * + * **Example** (Transforming logger output) * - * @example * ```ts * import { Logger } from "effect" * @@ -150,18 +196,21 @@ export declare const LogToStderr: Context.Reference; * ) * ``` * + * @category mapping * @since 2.0.0 - * @category utils */ export declare const map: ((f: (output: Output) => Output2) => (self: Logger) => Logger) & ((self: Logger, f: (output: Output) => Output2) => Logger); /** * Returns a new `Logger` that writes all output of the specified `Logger` to * the console using `console.log`. * - * This is useful for taking any logger that produces string or object output - * and routing it to the console for development or debugging purposes. + * **When to use** + * + * Use when a logger's string or object output should be routed to `console.log` for + * development or debugging. + * + * **Example** (Writing logger output with console.log) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -178,18 +227,21 @@ export declare const map: ((f: (output: Output) => Output2) => * ) * ``` * + * @category logging * @since 2.0.0 - * @category utils */ export declare const withConsoleLog: (self: Logger) => Logger; /** * Returns a new `Logger` that writes all output of the specified `Logger` to * the console using `console.error`. * - * This is particularly useful for error logging where you want to ensure - * log messages appear in the error stream (stderr) rather than standard output. + * **When to use** + * + * Use when logger output should be routed to `console.error`, such as error logs that + * should appear on stderr instead of stdout. + * + * **Example** (Writing logger output with console.error) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -206,25 +258,25 @@ export declare const withConsoleLog: (self: Logger(self: Logger) => Logger; /** * Returns a new `Logger` that writes all output of the specified `Logger` to * the console. * + * **Details** + * * Will use the appropriate console method (i.e. `console.log`, `console.error`, * etc.) based upon the current `LogLevel`. * - * - `Debug` -> `console.debug` - * - `Info` -> `console.info` - * - `Trace` -> `console.trace` - * - `Warn` -> `console.warn` - * - `Error` and `Fatal` -> `console.error` - * - Others -> `console.log` + * `Debug` uses `console.debug`, `Info` uses `console.info`, `Trace` uses + * `console.trace`, `Warn` uses `console.warn`, `Error` and `Fatal` use + * `console.error`, and all other levels use `console.log`. + * + * **Example** (Writing logs with level-based console methods) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -244,20 +296,22 @@ export declare const withConsoleError: (self: Logger(self: Logger) => Logger; /** * Creates a new `Logger` from a log function. * + * **Details** + * * The log function receives an options object containing the message, log level, * cause, fiber information, and timestamp, and should return the desired output. * - * @example + * **Example** (Creating loggers from functions) + * * ```ts - * import { Effect, Logger } from "effect" - * import { CurrentLogAnnotations } from "effect/References" + * import { Effect, Logger, References } from "effect" * * // Simple text logger * const textLogger = Logger.make((options) => @@ -270,7 +324,7 @@ export declare const withLeveledConsole: (self: Logger(self: Logger(log: (options: Options) => Output) => Logger; /** * The default logging implementation used by the Effect runtime. * - * @example + * **Example** (Using the default logger) + * * ```ts * import { Effect, Logger } from "effect" * @@ -315,19 +370,20 @@ export declare const make: (log: (options: Options) => * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 2.0.0 */ export declare const defaultLogger: Logger; /** * A `Logger` which outputs logs as a string. * - * For example: - * ``` - * timestamp=2025-01-03T14:22:47.570Z level=INFO fiber=#1 message=hello - * ``` + * **Details** + * + * For example, a simple log entry is rendered as + * `timestamp=2025-01-03T14:22:47.570Z level=INFO fiber=#1 message=hello`. + * + * **Example** (Formatting logs as simple strings) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -348,20 +404,21 @@ export declare const defaultLogger: Logger; * ) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export declare const formatSimple: Logger; /** * A `Logger` which outputs logs using the [logfmt](https://brandur.org/logfmt) * style. * - * For example: - * ``` - * timestamp=2025-01-03T14:22:47.570Z level=INFO fiber=#1 message=hello - * ``` + * **Details** + * + * For example, a logfmt entry is rendered as + * `timestamp=2025-01-03T14:22:47.570Z level=INFO fiber=#1 message=hello`. + * + * **Example** (Formatting logs as logfmt) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -385,26 +442,22 @@ export declare const formatSimple: Logger; * const productionLogger = Logger.formatLogFmt * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export declare const formatLogFmt: Logger; /** * A `Logger` which outputs logs using a structured format. * - * For example: - * ``` - * { - * message: [ 'hello' ], - * level: 'INFO', - * timestamp: '2025-01-03T14:25:39.666Z', - * annotations: { key: 'value' }, - * spans: { label: 0 }, - * fiberId: '#1' - * } - * ``` + * **Details** + * + * For example, a structured entry can contain `message: [ "hello" ]`, + * `level: "INFO"`, `timestamp: "2025-01-03T14:25:39.666Z"`, + * `annotations: { key: "value" }`, `spans: { label: 0 }`, and + * `fiberId: "#1"`. + * + * **Example** (Formatting logs as structured objects) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -431,8 +484,8 @@ export declare const formatLogFmt: Logger; * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export declare const formatStructured: Logger { - * // Send to Elasticsearch, CloudWatch, etc. - * console.log("Sending to external service:", jsonString) - * return jsonString - * }) + * // Adapt the JSON string before giving it to an output sink + * const envelopedJsonLogger = Logger.map( + * Logger.formatJson, + * (jsonString) => `{"service":"api-server","entry":${jsonString}}` + * ) + * + * const envelopedConsoleLogger = Logger.withConsoleLog(envelopedJsonLogger) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export declare const formatJson: Logger; /** - * Returns a new `Logger` which will aggregate logs output by the specified - * `Logger` over the provided `window`. After the `window` has elapsed, the - * provided `flush` function will be called with the logs aggregated during - * the last `window`. + * Creates a scoped logger that batches the output of another logger. + * + * **Details** * - * This is useful for implementing efficient batch processing of logs, such as - * writing multiple log entries to a database or file in a single operation. + * The returned effect starts a scoped background process that periodically + * passes buffered outputs to `flush`. When the scope closes, the background + * process is interrupted and any remaining buffered entries are flushed. + * + * **Example** (Batching logger output) * - * @example * ```ts * import { Duration, Effect, Logger } from "effect" * @@ -536,8 +593,8 @@ export declare const formatJson: Logger; * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 2.0.0 */ export declare const batched: ((options: { readonly window: Duration.Input; @@ -550,13 +607,14 @@ export declare const batched: ((options: { * A `Logger` which outputs logs in a "pretty" format and writes them to the * console. * - * For example: - * ``` - * [09:37:17.579] INFO (#1) label=0ms: hello - * key: value - * ``` + * **Details** + * + * For example, pretty output can render as + * `[09:37:17.579] INFO (#1) label=0ms: hello` followed by an annotation line + * such as `key: value`. + * + * **Example** (Logging with pretty console output) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -588,8 +646,8 @@ export declare const batched: ((options: { * const ciLogger = Logger.consolePretty({ colors: false }) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export declare const consolePretty: (options?: { readonly colors?: "auto" | boolean | undefined; @@ -601,12 +659,13 @@ export declare const consolePretty: (options?: { * A `Logger` which outputs logs using the [logfmt](https://brandur.org/logfmt) * style and writes them to the console. * - * For example: - * ``` - * timestamp=2025-01-03T14:22:47.570Z level=INFO fiber=#1 message=info - * ``` + * **Details** + * + * For example, a console logfmt entry is rendered as + * `timestamp=2025-01-03T14:22:47.570Z level=INFO fiber=#1 message=info`. + * + * **Example** (Logging logfmt output to the console) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -636,27 +695,24 @@ export declare const consolePretty: (options?: { * ]) * ``` * - * @since 2.0.0 * @category constructors + * @since 4.0.0 */ export declare const consoleLogFmt: Logger; /** - * A `Logger` which outputs logs using a strctured format and writes them to + * A `Logger` which outputs logs using a structured format and writes them to * the console. * - * For example: - * ``` - * { - * message: [ 'info', 'message' ], - * level: 'INFO', - * timestamp: '2025-01-03T14:25:39.666Z', - * annotations: { key: 'value' }, - * spans: { label: 0 }, - * fiberId: '#1' - * } - * ``` + * **Details** + * + * For example, console structured output can contain + * `message: [ "info", "message" ]`, `level: "INFO"`, + * `timestamp: "2025-01-03T14:25:39.666Z"`, + * `annotations: { key: "value" }`, `spans: { label: 0 }`, and + * `fiberId: "#1"`. + * + * **Example** (Logging structured output to the console) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -694,20 +750,22 @@ export declare const consoleLogFmt: Logger; * ) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export declare const consoleStructured: Logger; /** * A `Logger` which outputs logs using a structured format serialized as JSON * on a single line and writes them to the console. * - * For example: - * ``` - * {"message":["hello"],"level":"INFO","timestamp":"2025-01-03T14:28:57.508Z","annotations":{"key":"value"},"spans":{"label":0},"fiberId":"#1"} - * ``` + * **Details** + * + * For example, console JSON output can render as + * `{"message":["hello"],"level":"INFO","timestamp":"2025-01-03T14:28:57.508Z", + * "annotations":{"key":"value"},"spans":{"label":0},"fiberId":"#1"}`. + * + * **Example** (Logging JSON output to the console) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -750,22 +808,25 @@ export declare const consoleStructured: Logger; * ) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export declare const consoleJson: Logger; /** * A `Logger` which includes log messages as tracer span events. * + * **Details** + * * This logger integrates logging with distributed tracing by recording * all log messages as events on the current trace span, making them visible * in tracing tools like OpenTelemetry, Jaeger, or Zipkin. * - * **Note**: This logger is included in the default set of loggers for all - * Effect programs, so log messages automatically appear as span events unless - * you override the default loggers. + * This logger is included in the default set of loggers for all Effect programs, + * so log messages automatically appear as span events unless you override the + * default loggers. + * + * **Example** (Recording logs as trace span events) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -802,18 +863,21 @@ export declare const consoleJson: Logger; * ) * ``` * - * @since 4.0.0 * @category constructors + * @since 2.0.0 */ export declare const tracerLogger: Logger; /** * Creates a `Layer` which will overwrite the current set of loggers with the * specified array of `loggers`. * + * **Details** + * * If the specified array of `loggers` should be _merged_ with the current set * of loggers (instead of overwriting them), set `mergeWithExisting` to `true`. * - * @example + * **Example** (Providing logger layers) + * * ```ts * import { Effect, Logger } from "effect" * @@ -844,20 +908,26 @@ export declare const tracerLogger: Logger; * ) * ``` * - * @since 4.0.0 * @category context + * @since 4.0.0 */ export declare const layer: | Effect.Effect, any, any>>>(loggers: Loggers, options?: { readonly mergeWithExisting?: boolean | undefined; } | undefined) => Layer.Layer, Exclude, Scope.Scope>>; /** - * Create a Logger from another string Logger that writes to the specified file. + * Creates a scoped logger that writes string logger output to a file. + * + * **Details** * - * **Example** + * The returned effect requires `FileSystem` and `Scope`. The file logger batches + * string output, writes each batch to the specified path, and flushes remaining + * entries when the scope closes. + * + * **Example** (Writing JSON logs to a file) * * ```ts - * import { NodeFileSystem, NodeRuntime } from "@effect/platform-node" * import { Effect, Layer, Logger } from "effect" + * import { NodeFileSystem, NodeRuntime } from "@effect/platform-node" * * const fileLogger = Logger.formatJson.pipe( * Logger.toFile("/tmp/log.txt") @@ -874,65 +944,73 @@ export declare const layer: { - * console.log(`[${options.logLevel}] ${options.message}`) - * }) - * - * // Use JSON format for production - * const jsonLogger = Logger.consoleJson - * - * // Pretty format for development - * const prettyLogger = Logger.consolePretty() - * - * const program = Effect.log("Hello World").pipe( - * Effect.provide(Logger.layer([jsonLogger])) - * ) - * ``` - * - * ## Multiple Loggers - * - * ```ts - * import { Effect, Logger } from "effect" - * - * // Combine multiple loggers - * const CombinedLoggerLive = Logger.layer([ - * Logger.consoleJson, - * Logger.consolePretty() - * ]) - * - * const program = Effect.log("Application event").pipe( - * Effect.provide(CombinedLoggerLive) - * ) - * ``` - * - * ## Batched Logging + * Defines loggers and log-event data for Effect programs. * - * ```ts - * import { Duration, Effect, Logger } from "effect" + * A `Logger` receives each log event as `Options` and turns it + * into output such as a formatted string, structured object, console write, + * file write, JSON line, or trace span event. This module also includes active + * logger references, console routing helpers, built-in formatters, batching, + * file logging, and layers for installing loggers. * - * const batchedLogger = Logger.batched(Logger.formatJson, { - * window: Duration.seconds(5), - * flush: (messages) => - * Effect.sync(() => { - * // Process batch of log messages - * console.log("Flushing", messages.length, "log entries") - * }) - * }) - * - * const program = Effect.gen(function*() { - * const logger = yield* batchedLogger - * yield* Effect.provide( - * Effect.all([ - * Effect.log("Event 1"), - * Effect.log("Event 2"), - * Effect.log("Event 3") - * ]), - * Logger.layer([logger]) - * ) - * }) - * ``` + * @since 2.0.0 */ import * as Array from "./Array.js"; import * as FileSystem from "./FileSystem.js"; @@ -111,7 +22,8 @@ const TypeId = "~effect/Logger"; /** * Returns `true` if the specified value is a `Logger`, otherwise returns `false`. * - * @example + * **Example** (Checking logger values) + * * ```ts * import { Logger } from "effect" * @@ -124,12 +36,21 @@ const TypeId = "~effect/Logger"; * console.log(Logger.isLogger({ log: () => {} })) // false * ``` * - * @since 2.0.0 * @category guards + * @since 4.0.0 */ export const isLogger = u => Predicate.hasProperty(u, TypeId); /** - * @example + * Context reference containing the active loggers for the current fiber. + * + * **Details** + * + * By default this set includes the default logger and the tracer logger. + * Providing `Logger.layer` replaces or merges with this set depending on its + * options. + * + * **Example** (Accessing current loggers) + * * ```ts * import { Effect, Logger } from "effect" * @@ -149,22 +70,42 @@ export const isLogger = u => Predicate.hasProperty(u, TypeId); * }) * ``` * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export const CurrentLoggers = effect.CurrentLoggers; /** - * @since 4.0.0 + * Context reference that routes the built-in default logger and TTY pretty + * console logger to stderr. + * + * **When to use** + * + * Use to route built-in logger output to stderr while keeping stdout reserved + * for protocol messages or data output. + * + * **Details** + * + * The reference defaults to `false`. Providing `true` makes the affected + * loggers call `console.error` instead of `console.log`. + * + * @see {@link defaultLogger} for the runtime logger affected by this reference + * @see {@link consolePretty} for the TTY-mode pretty console logger affected by this reference + * @see {@link withConsoleError} for routing a specific formatter logger to `console.error` + * * @category references + * @since 4.0.0 */ export const LogToStderr = effect.LogToStderr; /** * Transforms the output of a `Logger` using the provided function. * - * This allows you to modify, enhance, or completely change the output format - * of an existing logger without recreating the entire logging logic. + * **When to use** + * + * Use when an existing logger's output should be transformed without recreating the + * logging logic. + * + * **Example** (Transforming logger output) * - * @example * ```ts * import { Logger } from "effect" * @@ -188,18 +129,21 @@ export const LogToStderr = effect.LogToStderr; * ) * ``` * + * @category mapping * @since 2.0.0 - * @category utils */ export const map = /*#__PURE__*/dual(2, (self, f) => effect.loggerMake(options => f(self.log(options)))); /** * Returns a new `Logger` that writes all output of the specified `Logger` to * the console using `console.log`. * - * This is useful for taking any logger that produces string or object output - * and routing it to the console for development or debugging purposes. + * **When to use** + * + * Use when a logger's string or object output should be routed to `console.log` for + * development or debugging. + * + * **Example** (Writing logger output with console.log) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -216,8 +160,8 @@ export const map = /*#__PURE__*/dual(2, (self, f) => effect.loggerMake(options = * ) * ``` * + * @category logging * @since 2.0.0 - * @category utils */ export const withConsoleLog = self => effect.loggerMake(options => { const console = options.fiber.getRef(effect.ConsoleRef); @@ -227,10 +171,13 @@ export const withConsoleLog = self => effect.loggerMake(options => { * Returns a new `Logger` that writes all output of the specified `Logger` to * the console using `console.error`. * - * This is particularly useful for error logging where you want to ensure - * log messages appear in the error stream (stderr) rather than standard output. + * **When to use** + * + * Use when logger output should be routed to `console.error`, such as error logs that + * should appear on stderr instead of stdout. + * + * **Example** (Writing logger output with console.error) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -247,8 +194,8 @@ export const withConsoleLog = self => effect.loggerMake(options => { * ) * ``` * + * @category logging * @since 2.0.0 - * @category utils */ export const withConsoleError = self => effect.loggerMake(options => { const console = options.fiber.getRef(effect.ConsoleRef); @@ -258,17 +205,17 @@ export const withConsoleError = self => effect.loggerMake(options => { * Returns a new `Logger` that writes all output of the specified `Logger` to * the console. * + * **Details** + * * Will use the appropriate console method (i.e. `console.log`, `console.error`, * etc.) based upon the current `LogLevel`. * - * - `Debug` -> `console.debug` - * - `Info` -> `console.info` - * - `Trace` -> `console.trace` - * - `Warn` -> `console.warn` - * - `Error` and `Fatal` -> `console.error` - * - Others -> `console.log` + * `Debug` uses `console.debug`, `Info` uses `console.info`, `Trace` uses + * `console.trace`, `Warn` uses `console.warn`, `Error` and `Fatal` use + * `console.error`, and all other levels use `console.log`. + * + * **Example** (Writing logs with level-based console methods) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -288,8 +235,8 @@ export const withConsoleError = self => effect.loggerMake(options => { * ) * ``` * - * @since 2.0.0 - * @category utils + * @category logging + * @since 3.8.0 */ export const withLeveledConsole = self => effect.loggerMake(options => { const console = options.fiber.getRef(effect.ConsoleRef); @@ -336,6 +283,9 @@ const format = (quoteValue, space) => ({ logLevel, message }) => { + const formatUnknown = value => typeof value === "string" ? value : Formatter.format(value, { + space + }); const formatValue = value => value.match(textOnly) ? value : quoteValue(value); const format = (label, value) => `${effect.formatLabel(label)}=${formatValue(value)}`; const append = (label, value) => " " + format(label, value); @@ -344,9 +294,7 @@ const format = (quoteValue, space) => ({ out += append("fiber", formatFiberId(fiber.id)); const messages = Array.ensure(message); for (let i = 0; i < messages.length; i++) { - out += append("message", Formatter.format(messages[i], { - space - })); + out += append("message", formatUnknown(messages[i])); } if (cause.reasons.length > 0) { out += append("cause", effect.causePretty(cause)); @@ -358,22 +306,22 @@ const format = (quoteValue, space) => ({ } const annotations = fiber.getRef(CurrentLogAnnotations); for (const [label, value] of Object.entries(annotations)) { - out += append(label, Formatter.format(value, { - space - })); + out += append(label, formatUnknown(value)); } return out; }; /** * Creates a new `Logger` from a log function. * + * **Details** + * * The log function receives an options object containing the message, log level, * cause, fiber information, and timestamp, and should return the desired output. * - * @example + * **Example** (Creating loggers from functions) + * * ```ts - * import { Effect, Logger } from "effect" - * import { CurrentLogAnnotations } from "effect/References" + * import { Effect, Logger, References } from "effect" * * // Simple text logger * const textLogger = Logger.make((options) => @@ -386,7 +334,7 @@ const format = (quoteValue, space) => ({ * level: options.logLevel, * message: options.message, * fiberId: options.fiber.id, - * annotations: options.fiber.getRef(CurrentLogAnnotations) + * annotations: options.fiber.getRef(References.CurrentLogAnnotations) * })) * * // Custom filtering logger @@ -402,14 +350,15 @@ const format = (quoteValue, space) => ({ * ) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const make = effect.loggerMake; /** * The default logging implementation used by the Effect runtime. * - * @example + * **Example** (Using the default logger) + * * ```ts * import { Effect, Logger } from "effect" * @@ -431,19 +380,20 @@ export const make = effect.loggerMake; * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 2.0.0 */ export const defaultLogger = effect.defaultLogger; /** * A `Logger` which outputs logs as a string. * - * For example: - * ``` - * timestamp=2025-01-03T14:22:47.570Z level=INFO fiber=#1 message=hello - * ``` + * **Details** + * + * For example, a simple log entry is rendered as + * `timestamp=2025-01-03T14:22:47.570Z level=INFO fiber=#1 message=hello`. + * + * **Example** (Formatting logs as simple strings) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -464,20 +414,21 @@ export const defaultLogger = effect.defaultLogger; * ) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export const formatSimple = /*#__PURE__*/effect.loggerMake(/*#__PURE__*/format(escapeDoubleQuotes)); /** * A `Logger` which outputs logs using the [logfmt](https://brandur.org/logfmt) * style. * - * For example: - * ``` - * timestamp=2025-01-03T14:22:47.570Z level=INFO fiber=#1 message=hello - * ``` + * **Details** + * + * For example, a logfmt entry is rendered as + * `timestamp=2025-01-03T14:22:47.570Z level=INFO fiber=#1 message=hello`. + * + * **Example** (Formatting logs as logfmt) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -501,26 +452,22 @@ export const formatSimple = /*#__PURE__*/effect.loggerMake(/*#__PURE__*/format(e * const productionLogger = Logger.formatLogFmt * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export const formatLogFmt = /*#__PURE__*/effect.loggerMake(/*#__PURE__*/format(JSON.stringify, 0)); /** * A `Logger` which outputs logs using a structured format. * - * For example: - * ``` - * { - * message: [ 'hello' ], - * level: 'INFO', - * timestamp: '2025-01-03T14:25:39.666Z', - * annotations: { key: 'value' }, - * spans: { label: 0 }, - * fiberId: '#1' - * } - * ``` + * **Details** + * + * For example, a structured entry can contain `message: [ "hello" ]`, + * `level: "INFO"`, `timestamp: "2025-01-03T14:25:39.666Z"`, + * `annotations: { key: "value" }`, `spans: { label: 0 }`, and + * `fiberId: "#1"`. + * + * **Example** (Formatting logs as structured objects) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -547,8 +494,8 @@ export const formatLogFmt = /*#__PURE__*/effect.loggerMake(/*#__PURE__*/format(J * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export const formatStructured = /*#__PURE__*/effect.loggerMake(({ cause, @@ -583,12 +530,14 @@ export const formatStructured = /*#__PURE__*/effect.loggerMake(({ * A `Logger` which outputs logs using a structured format serialized as JSON * on a single line. * - * For example: - * ``` - * {"message":["hello"],"level":"INFO","timestamp":"2025-01-03T14:28:57.508Z","annotations":{"key":"value"},"spans":{"label":0},"fiberId":"#1"} - * ``` + * **Details** + * + * For example, a JSON entry can render as `{"message":["hello"],"level":"INFO", + * "timestamp":"2025-01-03T14:28:57.508Z","annotations":{"key":"value"}, + * "spans":{"label":0},"fiberId":"#1"}`. + * + * **Example** (Formatting logs as JSON) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -611,28 +560,30 @@ export const formatStructured = /*#__PURE__*/effect.loggerMake(({ * Effect.provide(Logger.layer([Logger.formatJson])) * ) * - * // Send to external logging service - * const externalLogger = Logger.map(Logger.formatJson, (jsonString) => { - * // Send to Elasticsearch, CloudWatch, etc. - * console.log("Sending to external service:", jsonString) - * return jsonString - * }) + * // Adapt the JSON string before giving it to an output sink + * const envelopedJsonLogger = Logger.map( + * Logger.formatJson, + * (jsonString) => `{"service":"api-server","entry":${jsonString}}` + * ) + * + * const envelopedConsoleLogger = Logger.withConsoleLog(envelopedJsonLogger) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export const formatJson = /*#__PURE__*/map(formatStructured, Formatter.formatJson); /** - * Returns a new `Logger` which will aggregate logs output by the specified - * `Logger` over the provided `window`. After the `window` has elapsed, the - * provided `flush` function will be called with the logs aggregated during - * the last `window`. + * Creates a scoped logger that batches the output of another logger. * - * This is useful for implementing efficient batch processing of logs, such as - * writing multiple log entries to a database or file in a single operation. + * **Details** + * + * The returned effect starts a scoped background process that periodically + * passes buffered outputs to `flush`. When the scope closes, the background + * process is interrupted and any remaining buffered entries are flushed. + * + * **Example** (Batching logger output) * - * @example * ```ts * import { Duration, Effect, Logger } from "effect" * @@ -672,8 +623,8 @@ export const formatJson = /*#__PURE__*/map(formatStructured, Formatter.formatJso * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 2.0.0 */ export const batched = /*#__PURE__*/dual(2, (self, options) => effect.flatMap(effect.scope, scope => { let buffer = []; @@ -693,13 +644,14 @@ export const batched = /*#__PURE__*/dual(2, (self, options) => effect.flatMap(ef * A `Logger` which outputs logs in a "pretty" format and writes them to the * console. * - * For example: - * ``` - * [09:37:17.579] INFO (#1) label=0ms: hello - * key: value - * ``` + * **Details** + * + * For example, pretty output can render as + * `[09:37:17.579] INFO (#1) label=0ms: hello` followed by an annotation line + * such as `key: value`. + * + * **Example** (Logging with pretty console output) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -731,20 +683,21 @@ export const batched = /*#__PURE__*/dual(2, (self, options) => effect.flatMap(ef * const ciLogger = Logger.consolePretty({ colors: false }) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export const consolePretty = effect.consolePretty; /** * A `Logger` which outputs logs using the [logfmt](https://brandur.org/logfmt) * style and writes them to the console. * - * For example: - * ``` - * timestamp=2025-01-03T14:22:47.570Z level=INFO fiber=#1 message=info - * ``` + * **Details** + * + * For example, a console logfmt entry is rendered as + * `timestamp=2025-01-03T14:22:47.570Z level=INFO fiber=#1 message=info`. + * + * **Example** (Logging logfmt output to the console) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -774,27 +727,24 @@ export const consolePretty = effect.consolePretty; * ]) * ``` * - * @since 2.0.0 * @category constructors + * @since 4.0.0 */ export const consoleLogFmt = /*#__PURE__*/withConsoleLog(formatLogFmt); /** - * A `Logger` which outputs logs using a strctured format and writes them to + * A `Logger` which outputs logs using a structured format and writes them to * the console. * - * For example: - * ``` - * { - * message: [ 'info', 'message' ], - * level: 'INFO', - * timestamp: '2025-01-03T14:25:39.666Z', - * annotations: { key: 'value' }, - * spans: { label: 0 }, - * fiberId: '#1' - * } - * ``` + * **Details** + * + * For example, console structured output can contain + * `message: [ "info", "message" ]`, `level: "INFO"`, + * `timestamp: "2025-01-03T14:25:39.666Z"`, + * `annotations: { key: "value" }`, `spans: { label: 0 }`, and + * `fiberId: "#1"`. + * + * **Example** (Logging structured output to the console) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -832,20 +782,22 @@ export const consoleLogFmt = /*#__PURE__*/withConsoleLog(formatLogFmt); * ) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export const consoleStructured = /*#__PURE__*/withConsoleLog(formatStructured); /** * A `Logger` which outputs logs using a structured format serialized as JSON * on a single line and writes them to the console. * - * For example: - * ``` - * {"message":["hello"],"level":"INFO","timestamp":"2025-01-03T14:28:57.508Z","annotations":{"key":"value"},"spans":{"label":0},"fiberId":"#1"} - * ``` + * **Details** + * + * For example, console JSON output can render as + * `{"message":["hello"],"level":"INFO","timestamp":"2025-01-03T14:28:57.508Z", + * "annotations":{"key":"value"},"spans":{"label":0},"fiberId":"#1"}`. + * + * **Example** (Logging JSON output to the console) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -888,22 +840,25 @@ export const consoleStructured = /*#__PURE__*/withConsoleLog(formatStructured); * ) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export const consoleJson = /*#__PURE__*/withConsoleLog(formatJson); /** * A `Logger` which includes log messages as tracer span events. * + * **Details** + * * This logger integrates logging with distributed tracing by recording * all log messages as events on the current trace span, making them visible * in tracing tools like OpenTelemetry, Jaeger, or Zipkin. * - * **Note**: This logger is included in the default set of loggers for all - * Effect programs, so log messages automatically appear as span events unless - * you override the default loggers. + * This logger is included in the default set of loggers for all Effect programs, + * so log messages automatically appear as span events unless you override the + * default loggers. + * + * **Example** (Recording logs as trace span events) * - * @example * ```ts * import { Effect, Logger } from "effect" * @@ -940,18 +895,21 @@ export const consoleJson = /*#__PURE__*/withConsoleLog(formatJson); * ) * ``` * - * @since 4.0.0 * @category constructors + * @since 2.0.0 */ export const tracerLogger = effect.tracerLogger; /** * Creates a `Layer` which will overwrite the current set of loggers with the * specified array of `loggers`. * + * **Details** + * * If the specified array of `loggers` should be _merged_ with the current set * of loggers (instead of overwriting them), set `mergeWithExisting` to `true`. * - * @example + * **Example** (Providing logger layers) + * * ```ts * import { Effect, Logger } from "effect" * @@ -982,8 +940,8 @@ export const tracerLogger = effect.tracerLogger; * ) * ``` * - * @since 4.0.0 * @category context + * @since 4.0.0 */ export const layer = (loggers, options) => Layer.effect(CurrentLoggers, withFiber(effect.fnUntraced(function* (fiber) { const currentLoggers = new Set(options?.mergeWithExisting === true ? fiber.getRef(effect.CurrentLoggers) : []); @@ -993,13 +951,19 @@ export const layer = (loggers, options) => Layer.effect(CurrentLoggers, withFibe return currentLoggers; }))); /** - * Create a Logger from another string Logger that writes to the specified file. + * Creates a scoped logger that writes string logger output to a file. * - * **Example** + * **Details** + * + * The returned effect requires `FileSystem` and `Scope`. The file logger batches + * string output, writes each batch to the specified path, and flushes remaining + * entries when the scope closes. + * + * **Example** (Writing JSON logs to a file) * * ```ts - * import { NodeFileSystem, NodeRuntime } from "@effect/platform-node" * import { Effect, Layer, Logger } from "effect" + * import { NodeFileSystem, NodeRuntime } from "@effect/platform-node" * * const fileLogger = Logger.formatJson.pipe( * Logger.toFile("/tmp/log.txt") @@ -1016,65 +980,73 @@ export const layer = (loggers, options) => Layer.effect(CurrentLoggers, withFibe * ) * ``` * - * @example + * **Example** (Writing logs to files) + * * ```ts - * import { NodeFileSystem } from "@effect/platform-node" * import { Duration, Effect, Logger } from "effect" + * import { NodeFileSystem } from "@effect/platform-node" * - * // Basic file logging - * const basicFileLogger = Effect.gen(function*() { - * const fileLogger = yield* Logger.formatJson.pipe( - * Logger.toFile("/tmp/app.log") - * ) - * - * yield* Effect.log("Application started").pipe( - * Effect.provide(Logger.layer([fileLogger])) - * ) - * }).pipe( + * // Basic file logging. The scope keeps the file open while logs are emitted + * // and flushes pending entries when it closes. + * const basicFileLogger = Effect.scoped( + * Effect.gen(function*() { + * const fileLogger = yield* Logger.formatJson.pipe( + * Logger.toFile("/tmp/app.log") + * ) + * + * yield* Effect.log("Application started").pipe( + * Effect.provide(Logger.layer([fileLogger])) + * ) + * }) + * ).pipe( * Effect.provide(NodeFileSystem.layer) * ) * * // File logger with custom batch window - * const batchedFileLogger = Effect.gen(function*() { - * const fileLogger = yield* Logger.formatLogFmt.pipe( - * Logger.toFile("/var/log/myapp.log", { - * flag: "a", - * batchWindow: Duration.seconds(5) - * }) - * ) - * - * yield* Effect.all([ - * Effect.log("Event 1"), - * Effect.log("Event 2"), - * Effect.log("Event 3") - * ]).pipe( - * Effect.provide(Logger.layer([fileLogger])) - * ) - * }).pipe( + * const batchedFileLogger = Effect.scoped( + * Effect.gen(function*() { + * const fileLogger = yield* Logger.formatLogFmt.pipe( + * Logger.toFile("/var/log/myapp.log", { + * flag: "a", + * batchWindow: Duration.seconds(5) + * }) + * ) + * + * yield* Effect.all([ + * Effect.log("Event 1"), + * Effect.log("Event 2"), + * Effect.log("Event 3") + * ]).pipe( + * Effect.provide(Logger.layer([fileLogger])) + * ) + * }) + * ).pipe( * Effect.provide(NodeFileSystem.layer) * ) * * // Multiple loggers: console + file - * const multiLogger = Effect.gen(function*() { - * const fileLogger = yield* Logger.formatJson.pipe( - * Logger.toFile("/tmp/production.log") - * ) - * - * const loggerLive = Logger.layer([ - * Logger.consolePretty(), - * fileLogger - * ]) - * - * yield* Effect.log("Production event").pipe( - * Effect.provide(loggerLive) - * ) - * }).pipe( + * const multiLogger = Effect.scoped( + * Effect.gen(function*() { + * const fileLogger = yield* Logger.formatJson.pipe( + * Logger.toFile("/tmp/production.log") + * ) + * + * const loggerLive = Logger.layer([ + * Logger.consolePretty(), + * fileLogger + * ]) + * + * yield* Effect.log("Production event").pipe( + * Effect.provide(loggerLive) + * ) + * }) + * ).pipe( * Effect.provide(NodeFileSystem.layer) * ) * ``` * - * @since 4.0.0 * @category file + * @since 4.0.0 */ export const toFile = /*#__PURE__*/dual(args => isLogger(args[0]), (self, path, options) => effect.gen(function* () { const fs = yield* FileSystem.FileSystem; diff --git a/.opencode/node_modules/effect/dist/Logger.js.map b/.opencode/node_modules/effect/dist/Logger.js.map index 4eddc4f5d0da6b4a4ce7043387efd80c00f4e87e..da0a387b5129e365f07d8e6f3b28afee32dbd5ae 100644 --- a/.opencode/node_modules/effect/dist/Logger.js.map +++ b/.opencode/node_modules/effect/dist/Logger.js.map @@ -1 +1 @@ -{"version":3,"file":"Logger.js","names":["Array","FileSystem","Formatter","dual","isEffect","withFiber","effect","Layer","Predicate","CurrentLogAnnotations","CurrentLogSpans","TypeId","isLogger","u","hasProperty","CurrentLoggers","LogToStderr","map","self","f","loggerMake","options","log","withConsoleLog","console","fiber","getRef","ConsoleRef","withConsoleError","error","withLeveledConsole","output","logLevel","debug","info","trace","warn","textOnly","escapeDoubleQuotes","s","replace","formatFiberId","fiberId","format","quoteValue","space","cause","date","message","formatValue","value","match","label","formatLabel","append","out","toISOString","id","messages","ensure","i","length","reasons","causePretty","now","getTime","spans","span","formatLogSpan","annotations","Object","entries","make","defaultLogger","formatSimple","formatLogFmt","JSON","stringify","formatStructured","annotationsObj","spansObj","key","structuredMessage","timestamp","messageArr","level","toUpperCase","undefined","formatJson","batched","flatMap","scope","buffer","flush","suspend","void","arr","uninterruptibleMask","restore","sleep","window","pipe","andThen","forever","forkDetach","scopeAddFinalizerExit","fiberInterrupt","addFinalizer","as","push","consolePretty","consoleLogFmt","consoleStructured","consoleJson","tracerLogger","layer","loggers","fnUntraced","currentLoggers","Set","mergeWithExisting","logger","add","toFile","args","path","gen","fs","logFile","open","flag","encoder","TextEncoder","batchWindow","ignore","write","encode","join"],"sources":["../src/Logger.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoGA,OAAO,KAAKA,KAAK,MAAM,YAAY;AAMnC,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAC7C,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AACxD,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAC9C,OAAO,KAAKC,KAAK,MAAM,YAAY;AAInC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,SAASC,qBAAqB,EAAEC,eAAe,QAAQ,iBAAiB;AAGxE,MAAMC,MAAM,GAAG,gBAAgB;AAgE/B;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,QAAQ,GAAIC,CAAU,IAAoCL,SAAS,CAACM,WAAW,CAACD,CAAC,EAAEF,MAAM,CAAC;AAEvG;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMI,cAAc,GAAyDT,MAAM,CAACS,cAAc;AAEzG;;;;AAIA,OAAO,MAAMC,WAAW,GAA+BV,MAAM,CAACU,WAAW;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,OAAO,MAAMC,GAAG,gBAAGd,IAAI,CAuErB,CAAC,EAAE,CAACe,IAAI,EAAEC,CAAC,KAAKb,MAAM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E,IAAI,EAAE;IAC1BkF,MAAM,EAAE/E,OAAO,EAAEgH,WAAW,IAAI,IAAI;IACpCxC,KAAK,EAAG9D,MAAM,IAAKzB,MAAM,CAACgI,MAAM,CAACN,OAAO,CAACO,KAAK,CAACJ,OAAO,CAACK,MAAM,CAACzG,MAAM,CAAC0G,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;GACzF,CAAC;AACJ,CAAC,CAAC,CACL","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Logger.js","names":["Array","FileSystem","Formatter","dual","isEffect","withFiber","effect","Layer","Predicate","CurrentLogAnnotations","CurrentLogSpans","TypeId","isLogger","u","hasProperty","CurrentLoggers","LogToStderr","map","self","f","loggerMake","options","log","withConsoleLog","console","fiber","getRef","ConsoleRef","withConsoleError","error","withLeveledConsole","output","logLevel","debug","info","trace","warn","textOnly","escapeDoubleQuotes","s","replace","formatFiberId","fiberId","format","quoteValue","space","cause","date","message","formatUnknown","value","formatValue","match","label","formatLabel","append","out","toISOString","id","messages","ensure","i","length","reasons","causePretty","now","getTime","spans","span","formatLogSpan","annotations","Object","entries","make","defaultLogger","formatSimple","formatLogFmt","JSON","stringify","formatStructured","annotationsObj","spansObj","key","structuredMessage","timestamp","messageArr","level","toUpperCase","undefined","formatJson","batched","flatMap","scope","buffer","flush","suspend","void","arr","uninterruptibleMask","restore","sleep","window","pipe","andThen","forever","forkDetach","scopeAddFinalizerExit","fiberInterrupt","addFinalizer","as","push","consolePretty","consoleLogFmt","consoleStructured","consoleJson","tracerLogger","layer","loggers","fnUntraced","currentLoggers","Set","mergeWithExisting","logger","add","toFile","args","path","gen","fs","logFile","open","flag","encoder","TextEncoder","batchWindow","ignore","write","encode","join"],"sources":["../src/Logger.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAWA,OAAO,KAAKA,KAAK,MAAM,YAAY;AAMnC,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAC7C,OAAO,KAAKC,SAAS,MA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ect/dist/ManagedRuntime.d.ts index 88944daf4cf5171db052de8d090be2bb6c1deaa0..6b03f7cdd24c9a3f276eec77f8bdba48897054df 100644 --- a/.opencode/node_modules/effect/dist/ManagedRuntime.d.ts +++ b/.opencode/node_modules/effect/dist/ManagedRuntime.d.ts @@ -1,4 +1,12 @@ /** + * Runs many effects against services built once from a `Layer`. + * + * A `ManagedRuntime` builds the services from a layer, keeps those services + * available for repeated effect runs, and releases acquired resources when it + * is disposed. This module includes the runtime type, a constructor, a guard, + * and runners for connecting Effect programs to JavaScript entry points such as + * promises, callbacks, and synchronous code. + * * @since 2.0.0 */ import type * as Context from "./Context.ts"; @@ -9,30 +17,89 @@ import * as Layer from "./Layer.ts"; import * as Scope from "./Scope.ts"; declare const TypeId = "~effect/ManagedRuntime"; /** - * Checks if the provided argument is a `ManagedRuntime`. + * Checks whether the provided argument is a `ManagedRuntime`. + * + * **When to use** + * + * Use to narrow an unknown value before treating it as a `ManagedRuntime`. + * + * **Details** + * + * The guard checks the internal `ManagedRuntime` marker property. It does not + * build the layer or inspect the runtime's services. + * + * **Gotchas** + * + * Disposed runtimes still carry the marker, so this guard does not prove the + * runtime is still usable. + * + * @see {@link make} for creating managed runtimes this guard recognizes * - * @since 3.9.0 * @category guards + * @since 3.9.0 */ export declare const isManagedRuntime: (input: unknown) => input is ManagedRuntime; /** + * Type helpers associated with `ManagedRuntime`. + * + * **When to use** + * + * Use to reference type-level helpers for extracting managed runtime services + * and layer errors. + * * @since 3.4.0 */ export declare namespace ManagedRuntime { /** - * @category type-level - * @since 4.0.0 + * Extracts the services available from a `ManagedRuntime`. + * + * **When to use** + * + * Use to derive the service requirements provided by an existing + * `ManagedRuntime` type. + * + * @category utility types + * @since 3.4.0 */ type Services> = [T] extends [ManagedRuntime] ? R : never; /** - * @category type-level + * Extracts the layer construction error type of a `ManagedRuntime`. + * + * **When to use** + * + * Use to derive the layer construction error type from an existing + * `ManagedRuntime` type. + * + * @category utility types * @since 3.4.0 */ type Error> = [T] extends [ManagedRuntime] ? E : never; } /** - * @since 2.0.0 + * A runtime built from a layer that can execute effects requiring that layer's + * services. + * + * **When to use** + * + * Use as the reusable runtime value returned by `make` when application entry + * points or integration code need to run many effects against the same + * layer-built services. + * + * **Details** + * + * The runtime builds and caches its service context and owns the scope for + * resources acquired by the layer. + * + * **Gotchas** + * + * Dispose the runtime with `dispose` or `disposeEffect` when it is no longer + * needed. + * + * @see {@link make} for constructing a managed runtime from a layer + * @see {@link Layer.build} for lower-level scoped layer construction + * * @category models + * @since 2.0.0 */ export interface ManagedRuntime { readonly [TypeId]: typeof TypeId; @@ -44,19 +111,28 @@ export interface ManagedRuntime { /** * Executes the effect using the provided Scheduler or using the global * Scheduler if not provided + * + * **When to use** + * + * Use to fork an effect against this runtime's services and get the running + * fiber. */ readonly runFork: (self: Effect.Effect, options?: Effect.RunOptions) => Fiber.Fiber; /** * Executes the effect synchronously returning the exit. * - * This method is effectful and should only be invoked at the edges of your + * **When to use** + * + * Use when invoking this effectful method at the edges of your * program. */ readonly runSyncExit: (effect: Effect.Effect) => Exit.Exit; /** * Executes the effect synchronously throwing in case of errors or async boundaries. * - * This method is effectful and should only be invoked at the edges of your + * **When to use** + * + * Use when invoking this effectful method at the edges of your * program. */ readonly runSync: (effect: Effect.Effect) => A; @@ -64,7 +140,9 @@ export interface ManagedRuntime { * Executes the effect asynchronously, eventually passing the exit value to * the specified callback. * - * This method is effectful and should only be invoked at the edges of your + * **When to use** + * + * Use when invoking this effectful method at the edges of your * program. */ readonly runCallback: (effect: Effect.Effect, options?: (Effect.RunOptions & { @@ -75,7 +153,9 @@ export interface ManagedRuntime { * with the value of the effect once the effect has been executed, or will be * rejected with the first error or exception throw by the effect. * - * This method is effectful and should only be used at the edges of your + * **When to use** + * + * Use when invoking this effectful method at the edges of your * program. */ readonly runPromise: (effect: Effect.Effect, options?: Effect.RunOptions) => Promise; @@ -83,48 +163,81 @@ export interface ManagedRuntime { * Runs the `Effect`, returning a JavaScript `Promise` that will be resolved * with the `Exit` state of the effect once the effect has been executed. * - * This method is effectful and should only be used at the edges of your + * **When to use** + * + * Use when invoking this effectful method at the edges of your * program. */ readonly runPromiseExit: (effect: Effect.Effect, options?: Effect.RunOptions) => Promise>; /** * Dispose of the resources associated with the runtime. + * + * **When to use** + * + * Use to release this runtime's layer resources from Promise-based code. */ readonly dispose: () => Promise; /** * Dispose of the resources associated with the runtime. + * + * **When to use** + * + * Use to release this runtime's layer resources from an `Effect` workflow. */ readonly disposeEffect: Effect.Effect; } /** - * Convert a Layer into an ManagedRuntime, that can be used to run Effect's using - * your services. + * Creates a `ManagedRuntime` from a layer. + * + * **When to use** + * + * Use to create a reusable runtime from a `Layer` for application entry points + * or integration code that runs many effects without rebuilding services. + * + * **Details** + * + * The layer is built lazily on first use and its context is cached for + * subsequent runs. Resources acquired by the layer are owned by the runtime and + * are released when `dispose` or `disposeEffect` is run. `options.memoMap` can + * be used to share layer memoization with other layer builds. + * + * **Gotchas** + * + * Dispose the runtime when it is no longer needed. A runtime cannot be reused + * after disposal. + * + * **Example** (Creating a managed runtime) * - * @since 2.0.0 - * @category runtime class - * @example * ```ts - * import { Console, Effect, Layer, ManagedRuntime, Context } from "effect" + * import { Context, Effect, Layer, ManagedRuntime } from "effect" * * class Notifications extends Context.Service Effect.Effect * }>()("Notifications") { * static readonly layer = Layer.succeed(this)({ - * notify: Effect.fn("Notifications.notify")((message) => Console.log(message)) + * notify: Effect.fn("Notifications.notify")((message) => + * Effect.sync(() => console.log(message)) + * ) * }) * } * - * async function main() { - * const runtime = ManagedRuntime.make(Notifications.layer) - * await runtime.runPromise(Effect.flatMap( - * Notifications.asEffect(), - * (_) => _.notify("Hello, world!") - * )) - * await runtime.dispose() - * } + * const runtime = ManagedRuntime.make(Notifications.layer) * - * main() + * const program = Effect.flatMap( + * Notifications, + * (_) => _.notify("Hello, world!") + * ).pipe(Effect.ensuring(runtime.disposeEffect)) + * + * runtime.runPromise(program) + * // Hello, world! * ``` + * + * @see {@link ManagedRuntime} for the returned runtime interface + * @see {@link Layer.MemoMap} for shared layer memoization + * @see {@link Layer.build} for lower-level scoped layer construction + * + * @category runtime class + * @since 2.0.0 */ export declare const make: (layer: Layer.Layer, options?: { readonly memoMap?: Layer.MemoMap | undefined; diff --git a/.opencode/node_modules/effect/dist/ManagedRuntime.d.ts.map b/.opencode/node_modules/effect/dist/ManagedRuntime.d.ts.map index 25e68b098df19c1be2efd9b3955e4a7482caa890..eae7c17f6a60c169c8321e8a146356233d20ea6c 100644 --- a/.opencode/node_modules/effect/dist/ManagedRuntime.d.ts.map +++ b/.opencode/node_modules/effect/dist/ManagedRuntime.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ManagedRuntime.d.ts","sourceRoot":"","sources":["../src/ManagedRuntime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAEnC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAGnC,QAAA,MAAM,MAAM,2BAA2B,CAAA;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,cAAc,CAAC,OAAO,EAAE,OAAO,CAC9D,CAAA;AAE5B;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC;;;OAGG;IACH,KAAY,QAAQ,CAAC,CAAC,SAAS,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,GAC5G,KAAK,CAAA;IACT;;;OAGG;IACH,KAAY,KAAK,CAAC,CAAC,SAAS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CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;CAC1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,EAAE,EAAE,EACxB,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,EAChC,UAAU;IACR,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,SAAS,CAAA;CAC7C,GAAG,SAAS,KACZ,cAAc,CAAC,CAAC,EAAE,EAAE,CA6FtB,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/ManagedRuntime.js b/.opencode/node_modules/effect/dist/ManagedRuntime.js index c9cb1c6a7bb12384caa6ba8331b7e7c5a9673ea2..6e035bd00f16e07d4339554859cd74b64c26d333 100644 --- a/.opencode/node_modules/effect/dist/ManagedRuntime.js +++ b/.opencode/node_modules/effect/dist/ManagedRuntime.js @@ -6,41 +6,80 @@ import { hasProperty } from "./Predicate.js"; import * as Scope from "./Scope.js"; const TypeId = "~effect/ManagedRuntime"; /** - * Checks if the provided argument is a `ManagedRuntime`. + * Checks whether the provided argument is a `ManagedRuntime`. + * + * **When to use** + * + * Use to narrow an unknown value before treating it as a `ManagedRuntime`. + * + * **Details** + * + * The guard checks the internal `ManagedRuntime` marker property. It does not + * build the layer or inspect the runtime's services. + * + * **Gotchas** + * + * Disposed runtimes still carry the marker, so this guard does not prove the + * runtime is still usable. + * + * @see {@link make} for creating managed runtimes this guard recognizes * - * @since 3.9.0 * @category guards + * @since 3.9.0 */ export const isManagedRuntime = input => hasProperty(input, TypeId); /** - * Convert a Layer into an ManagedRuntime, that can be used to run Effect's using - * your services. + * Creates a `ManagedRuntime` from a layer. + * + * **When to use** + * + * Use to create a reusable runtime from a `Layer` for application entry points + * or integration code that runs many effects without rebuilding services. + * + * **Details** + * + * The layer is built lazily on first use and its context is cached for + * subsequent runs. Resources acquired by the layer are owned by the runtime and + * are released when `dispose` or `disposeEffect` is run. `options.memoMap` can + * be used to share layer memoization with other layer builds. + * + * **Gotchas** + * + * Dispose the runtime when it is no longer needed. A runtime cannot be reused + * after disposal. + * + * **Example** (Creating a managed runtime) * - * @since 2.0.0 - * @category runtime class - * @example * ```ts - * import { Console, Effect, Layer, ManagedRuntime, Context } from "effect" + * import { Context, Effect, Layer, ManagedRuntime } from "effect" * * class Notifications extends Context.Service Effect.Effect * }>()("Notifications") { * static readonly layer = Layer.succeed(this)({ - * notify: Effect.fn("Notifications.notify")((message) => Console.log(message)) + * notify: Effect.fn("Notifications.notify")((message) => + * Effect.sync(() => console.log(message)) + * ) * }) * } * - * async function main() { - * const runtime = ManagedRuntime.make(Notifications.layer) - * await runtime.runPromise(Effect.flatMap( - * Notifications.asEffect(), - * (_) => _.notify("Hello, world!") - * )) - * await runtime.dispose() - * } + * const runtime = ManagedRuntime.make(Notifications.layer) + * + * const program = Effect.flatMap( + * Notifications, + * (_) => _.notify("Hello, world!") + * ).pipe(Effect.ensuring(runtime.disposeEffect)) * - * main() + * runtime.runPromise(program) + * // Hello, world! * ``` + * + * @see {@link ManagedRuntime} for the returned runtime interface + * @see {@link Layer.MemoMap} for shared layer memoization + * @see {@link Layer.build} for lower-level scoped layer construction + * + * @category runtime class + * @since 2.0.0 */ export const make = (layer, options) => { const memoMap = options?.memoMap ?? Layer.makeMemoMapUnsafe(); diff --git a/.opencode/node_modules/effect/dist/ManagedRuntime.js.map b/.opencode/node_modules/effect/dist/ManagedRuntime.js.map index 4f190cf41a57bd4c55011640714b514d68e5183f..9e30e85e1acf2b85bf8910ec41960142dfaa8eb8 100644 --- a/.opencode/node_modules/effect/dist/ManagedRuntime.js.map +++ b/.opencode/node_modules/effect/dist/ManagedRuntime.js.map @@ -1 +1 @@ -{"version":3,"file":"ManagedRuntime.js","names":["Effect","Exit","Fiber","Layer","hasProperty","Scope","TypeId","isManagedRuntime","input","make","layer","options","memoMap","makeMemoMapUnsafe","scope","makeUnsafe","layerScope","forkUnsafe","defaultRunOptions","onFiberStart","runIn","mergeRunOptions","fiber","buildFiber","contextEffect","withFiber","runFork","tap","buildWithMemoMap","context","sync","self","cachedContext","scheduler","currentScheduler","flatten","await","undefined","runPromise","Promise","resolve","dispose","disposeEffect","suspend","die","close","void","effect","provide","runForkWith","runCallback","runCallbackWith","runSyncExit","runSyncExitWith","runSync","runSyncWith","runPromiseExit","runPromiseExitWith","runPromiseWith","managed","flatMap","provideContext"],"sources":["../src/ManagedRuntime.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,OAAO,KAAKC,KAAK,MAAM,YAAY;AAGnC,MAAMC,MAAM,GAAG,wBAAwB;AAEvC;;;;;;AAMA,OAAO,MAAMC,gBAAgB,GAAIC,KAAc,IAC7CJ,WAAW,CAACI,KAAK,EAAEF,MAAM,CAAC;AA4G5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,MAAMG,IAAI,GAAGA,CAClBC,KAAgC,EAChCC,OAEa,KACY;EACzB,MAAMC,OAAO,GAAGD,OAAO,EAAEC,OAAO,IAAIT,KAAK,CAACU,iBAAiB,EAAE;EAC7D,MAAMC,KAAK,GAAGT,KAAK,CAACU,UAAU,CAAC,UAAU,CAAC;EAC1C,MAAMC,UAAU,GAAGX,KAAK,CAACY,UAAU,CAACH,KAAK,EAAE,YAAY,CAAC;EACxD,MAAMI,iBAAiB,GAAsB;IAC3CC,YAAY,EAAEjB,KAAK,CAACkB,KAAK,CAACN,KAAK;GAChC;EACD,MAAMO,eAAe,GAAiCV,OAAW,IAC/DA,OAAO,GACH;IAC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,GACrCrC,MAAM,CAACsD,OAAO,CAACN,OAAO,CAACjB,IAAI,EAAEgB,MAAM,CAAC,CAAC,GACrC/C,MAAM,CAACuD,WAAW,CAACxB,IAAI,CAACC,aAAa,CAAC,CAACe,MAAM,CAAC;IAClD,CAAC;IACDS,cAAcA,CAAOT,MAA8B,EAAEpC,OAA2B;MAC9E,OAAOoB,IAAI,CAACC,aAAa,KAAKK,SAAS,GACrCrC,MAAM,CAACwD,cAAc,CAACR,OAAO,CAACjB,IAAI,EAAEgB,MAAM,CAAC,EAAE1B,eAAe,CAACV,OAAO,CAAC,CAAC,GACtEX,MAAM,CAACyD,kBAAkB,CAAC1B,IAAI,CAACC,aAAa,CAAC,CAACe,MAAM,EAAE1B,eAAe,CAACV,OAAO,CAAC,CAAC;IACnF,CAAC;IACD2B,UAAUA,CAAOS,MAA8B,EAAEpC,OAEhD;MACC,OAAOoB,IAAI,CAACC,aAAa,KAAKK,SAAS,GACrCrC,MAAM,CAACsC,UAAU,CAACU,OAAO,CAACjB,IAAI,EAAEgB,MAAM,CAAC,EAAE1B,eAAe,CAACV,OAAO,CAAC,CAAC,GAClEX,MAAM,CAAC0D,cAAc,CAAC3B,IAAI,CAACC,aAAa,CAAC,CAACe,MAAM,EAAE1B,eAAe,CAACV,OAAO,CAAC,CAAC;IAC/E;GACD;EACD,OAAOoB,IAAI;AACb,CAAC;AAED,SAASiB,OAAOA,CACdW,OAA8B,EAC9BZ,MAA8B;EAE9B,OAAO/C,MAAM,CAAC4D,OAAO,CACnBD,OAAO,CAACnC,aAAa,EACpBK,OAAO,IAAK7B,MAAM,CAAC6D,cAAc,CAACd,MAAM,EAAElB,OAAO,CAAC,CACpD;AACH","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"ManagedRuntime.js","names":["Effect","Exit","Fiber","Layer","hasProperty","Scope","TypeId","isManagedRuntime","input","make","layer","options","memoMap","makeMemoMapUnsafe","scope","makeUnsafe","layerScope","forkUnsafe","defaultRunOptions","onFiberStart","runIn","mergeRunOptions","fiber","buildFiber","contextEffect","withFiber","runFork","tap","buildWithMemoMap","context","sync","self","cachedContext","scheduler","currentScheduler","flatten","await","undefined","runPromise","Promise","resolve","dispose","disposeEffect","suspend","die","close","void","effect","provide","runForkWith","runCallback","runCallbackWith","runSyncExit","runSyncExitWith","runSync","runSyncWith","runPromiseExit","runPromiseExitWith","runPromiseWith","managed","flatMap","provideContext"],"sources":["../src/ManagedRuntime.ts"],"sourcesContent":[null],"mappings":"AAYA,OAAO,KAAKA,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,OAAO,KAAKC,KAAK,MAAM,YAAY;AAGnC,MAAMC,MAAM,GAAG,wBAAwB;AAEvC;;;;;;;;;;;;;;;;;;;;;;AAsBA,OAAO,MAAMC,gBAAgB,GAAIC,KAAc,IAC7CJ,WAAW,CAACI,KAAK,EAAEF,MAAM,CAAC;AA8K5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,OAAO,MAAMG,IAAI,GAAGA,CAClBC,KAAgC,EAChCC,OAEa,KACY;EACzB,MAAMC,OAAO,GAAGD,OAAO,EAAEC,OAAO,IAAIT,KAAK,CAACU,iBAAiB,EAAE;EAC7D,MAAMC,KAAK,GAAGT,KAAK,CAACU,UAAU,CAAC,UAAU,CAAC;EAC1C,MAAMC,UAAU,GAAGX,KAAK,CAACY,UAAU,CAACH,KAAK,EAAE,YAAY,CAAC;EACxD,MAAMI,iBAAiB,GAAsB;IAC3CC,YAAY,EAAEjB,KAAK,CAACkB,KAAK,CAACN,KAAK;GAChC;EACD,MAAMO,eAAe,GAAiCV,OAAW,IAC/DA,OAAO,GACH;IACA,GAAGA,OAAO;IACVQ,YAAY,EAAER,OAAO,CAACQ,YAAY,GAC/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gB,MAAM,CAAC,CAAC,GACrC/C,MAAM,CAACuD,WAAW,CAACxB,IAAI,CAACC,aAAa,CAAC,CAACe,MAAM,CAAC;IAClD,CAAC;IACDS,cAAcA,CAAOT,MAA8B,EAAEpC,OAA2B;MAC9E,OAAOoB,IAAI,CAACC,aAAa,KAAKK,SAAS,GACrCrC,MAAM,CAACwD,cAAc,CAACR,OAAO,CAACjB,IAAI,EAAEgB,MAAM,CAAC,EAAE1B,eAAe,CAACV,OAAO,CAAC,CAAC,GACtEX,MAAM,CAACyD,kBAAkB,CAAC1B,IAAI,CAACC,aAAa,CAAC,CAACe,MAAM,EAAE1B,eAAe,CAACV,OAAO,CAAC,CAAC;IACnF,CAAC;IACD2B,UAAUA,CAAOS,MAA8B,EAAEpC,OAEhD;MACC,OAAOoB,IAAI,CAACC,aAAa,KAAKK,SAAS,GACrCrC,MAAM,CAACsC,UAAU,CAACU,OAAO,CAACjB,IAAI,EAAEgB,MAAM,CAAC,EAAE1B,eAAe,CAACV,OAAO,CAAC,CAAC,GAClEX,MAAM,CAAC0D,cAAc,CAAC3B,IAAI,CAACC,aAAa,CAAC,CAACe,MAAM,EAAE1B,eAAe,CAACV,OAAO,CAAC,CAAC;IAC/E;GACD;EACD,OAAOoB,IAAI;AACb,CAAC;AAED,SAASiB,OAAOA,CACdW,OAA8B,EAC9BZ,MAA8B;EAE9B,OAAO/C,MAAM,CAAC4D,OAAO,CACnBD,OAAO,CAACnC,aAAa,EACpBK,OAAO,IAAK7B,MAAM,CAAC6D,cAAc,CAACd,MAAM,EAAElB,OAAO,CAAC,CACpD;AACH","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Match.d.ts b/.opencode/node_modules/effect/dist/Match.d.ts index f989f5e0b024a7e76d0da4e659fb661ce95d6408..077d0f9ff04b14ec6919e4316a0484530a6e6713 100644 --- a/.opencode/node_modules/effect/dist/Match.d.ts +++ b/.opencode/node_modules/effect/dist/Match.d.ts @@ -6,19 +6,15 @@ import type * as T from "./Types.ts"; import type { Unify } from "./Unify.ts"; declare const TypeId = "~effect/match/Match/Matcher"; /** - * Pattern matching follows a structured process: + * Union type for matchers created by `Match.type` and `Match.value`. * - * - **Creating a matcher**: Define a `Matcher` that operates on either a - * specific `Match.type` or `Match.value`. + * **Details** * - * - **Defining patterns**: Use combinators such as `Match.when`, `Match.not`, - * and `Match.tag` to specify matching conditions. + * A `Matcher` carries the input type, accumulated filters, remaining cases, + * result type, and, for value matchers, the provided value being matched. * - * - **Completing the match**: Apply a finalizer such as `Match.exhaustive`, - * `Match.orElse`, or `Match.option` to determine how unmatched cases should - * be handled. + * **Example** (Matching string and number values) * - * @example * ```ts * import { Match } from "effect" * @@ -40,19 +36,22 @@ declare const TypeId = "~effect/match/Match/Matcher"; * // Output: "string: some input" * ``` * - * @category Model + * @category models * @since 4.0.0 */ export type Matcher = TypeMatcher | ValueMatcher; /** * Represents a pattern matcher that operates on types rather than specific values. * + * **Details** + * * A `TypeMatcher` is created when using `Match.type()` and allows you to define * patterns that will be applied to values of the specified type. It maintains * type-level information about the input type, applied filters, remaining cases, * and expected results. * - * @example + * **Example** (Creating a type matcher) + * * ```ts * import { Match } from "effect" * @@ -85,11 +84,14 @@ export interface TypeMatcher() => Matcher, I, never, never>; /** * Creates a matcher from a specific value. * + * **When to use** + * + * Use to match one concrete input immediately. + * * **Details** * * This function allows you to define a `Matcher` directly from a given value, @@ -260,7 +271,7 @@ export declare const type: () => Matcher, I, never, n * Once the matcher is created, you can use pattern-matching functions like * {@link when} to define how different cases should be handled. * - * @example (Matching an Object by Property) + * **Example** (Matching an Object by Property) * * ```ts * import { Match } from "effect" @@ -284,18 +295,21 @@ export declare const type: () => Matcher, I, never, n * * @see {@link type} for creating a matcher from a specific type. * - * @category Creating a matcher + * @category constructors * @since 4.0.0 */ export declare const value: (i: I) => Matcher, I, never, I>; /** * Creates a match function for a specific value with discriminated union handling. * + * **Details** + * * This function provides a convenient way to pattern match on discriminated unions * by providing an object that maps each `_tag` value to its corresponding handler. * It's similar to a switch statement but with better type safety and exhaustiveness checking. * - * @example + * **Example** (Matching value tags) + * * ```ts * import { Match } from "effect" * @@ -311,18 +325,21 @@ export declare const value: (i: I) => Matcher, * console.log(message) // "Success: Hello" * ``` * - * @category Creating a matcher + * @category constructors * @since 4.0.0 */ export declare const valueTags: { /** * Creates a match function for a specific value with discriminated union handling. * + * **Details** + * * This function provides a convenient way to pattern match on discriminated unions * by providing an object that maps each `_tag` value to its corresponding handler. * It's similar to a switch statement but with better type safety and exhaustiveness checking. * - * @example + * **Example** (Matching value tags) + * * ```ts * import { Match } from "effect" * @@ -338,7 +355,7 @@ export declare const valueTags: { * console.log(message) // "Success: Hello" * ``` * - * @category Creating a matcher + * @category constructors * @since 4.0.0 */ ():

():

* ``` * - * See also: {@link Predicate.Any}, {@link Refinement.In} - * + * @see {@link Predicate.Any} + * @see {@link Refinement.In} + * @category utility types * @since 3.6.0 - * @category type-level */ type In = [T] extends [Predicate] ? _A : never; /** * A utility type representing any predicate type. * - * When to use: - * - You need a constraint for "any predicate" in generic code. + * **When to use** + * + * Use when you need a constraint for "any predicate" in generic code. + * + * **Details** * - * Behavior: - * - Type-only; no runtime value is created. + * This is type-only and creates no runtime value. * * **Example** (Generic constraint) * @@ -162,23 +172,24 @@ export declare namespace Predicate { * type AnyPredicate = Predicate.Predicate.Any * ``` * - * See also: {@link Predicate.In} - * + * @see {@link Predicate.In} + * @category utility types * @since 3.6.0 - * @category type-level */ type Any = Predicate; } /** * Type-level utilities for working with {@link Refinement} types. * - * When to use: - * - You need to extract input/output types from refinement signatures. - * - You want to write generic helpers over refinements. + * **When to use** + * + * Use when you need to extract input and output types from refinement + * signatures while writing generic helpers over refinements. + * + * **Details** * - * Behavior: - * - Type-only; no runtime value is created. - * - The namespace is erased at runtime. + * These utilities are type-only, create no runtime values, and the namespace is + * erased at runtime. * * **Example** (Extract refinement types) * @@ -190,21 +201,22 @@ export declare namespace Predicate { * type Output = Predicate.Refinement.Out * ``` * - * See also: {@link Refinement}, {@link Predicate} - * + * @see {@link Refinement} + * @see {@link Predicate} * @since 3.6.0 - * @category type-level */ export declare namespace Refinement { /** * Extracts the input type `A` from a `Refinement`. * - * When to use: - * - You want to infer the input type from a refinement type. + * **When to use** + * + * Use when you want to infer the input type from a refinement type. * - * Behavior: - * - Type-only; no runtime value is created. - * - Resolves to `never` if the type does not match `Refinement`. + * **Details** + * + * This is type-only and creates no runtime value. It resolves to `never` if + * the type does not match `Refinement`. * * **Example** (Infer input) * @@ -215,21 +227,23 @@ export declare namespace Refinement { * type Input = Predicate.Refinement.In * ``` * - * See also: {@link Refinement.Out}, {@link Predicate.In} - * + * @see {@link Refinement.Out} + * @see {@link Predicate.In} + * @category utility types * @since 3.6.0 - * @category type-level */ type In = [T] extends [Refinement] ? _A : never; /** * Extracts the output type `B` from a `Refinement`. * - * When to use: - * - You want to infer the narrowed type from a refinement type. + * **When to use** + * + * Use when you want to infer the narrowed type from a refinement type. + * + * **Details** * - * Behavior: - * - Type-only; no runtime value is created. - * - Resolves to `never` if the type does not match `Refinement`. + * This is type-only and creates no runtime value. It resolves to `never` if + * the type does not match `Refinement`. * * **Example** (Infer output) * @@ -240,20 +254,21 @@ export declare namespace Refinement { * type Output = Predicate.Refinement.Out * ``` * - * See also: {@link Refinement.In} - * + * @see {@link Refinement.In} + * @category utility types * @since 3.6.0 - * @category type-level */ type Out = [T] extends [Refinement] ? _B : never; /** * A utility type representing any refinement type. * - * When to use: - * - You need a constraint for "any refinement" in generic code. + * **When to use** + * + * Use when you need a constraint for "any refinement" in generic code. * - * Behavior: - * - Type-only; no runtime value is created. + * **Details** + * + * This is type-only and creates no runtime value. * * **Example** (Generic constraint) * @@ -263,24 +278,25 @@ export declare namespace Refinement { * type AnyRefinement = Predicate.Refinement.Any * ``` * - * See also: {@link Refinement.In}, {@link Refinement.Out} - * + * @see {@link Refinement.In} + * @see {@link Refinement.Out} + * @category utility types * @since 3.6.0 - * @category type-level */ type Any = Refinement; } /** * Transforms the input of a predicate using a mapping function. * - * When to use: - * - You have a predicate on `A` and want one on `B` via `B -> A`. - * - You want to check derived values (lengths, projections, etc.). + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Returns a new predicate that applies `f` before `self`. - * - No short-circuit beyond what `self` does. + * Use when you have a predicate on `A` and want to check `B` values by mapping + * each `B` to an `A`, such as checking lengths or projections. + * + * **Details** + * + * Returns a new predicate that applies `f` before `self`. There is no + * additional short-circuiting beyond what `self` does. * * **Example** (Check string length) * @@ -294,8 +310,9 @@ export declare namespace Refinement { * console.log(isLongerThan2("hello")) * ``` * - * See also: {@link Predicate}, {@link and}, {@link not} - * + * @see {@link Predicate} + * @see {@link and} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -303,14 +320,15 @@ export declare const mapInput: { /** * Transforms the input of a predicate using a mapping function. * - * When to use: - * - You have a predicate on `A` and want one on `B` via `B -> A`. - * - You want to check derived values (lengths, projections, etc.). + * **When to use** + * + * Use when you have a predicate on `A` and want to check `B` values by mapping + * each `B` to an `A`, such as checking lengths or projections. * - * Behavior: - * - Pure; does not mutate input. - * - Returns a new predicate that applies `f` before `self`. - * - No short-circuit beyond what `self` does. + * **Details** + * + * Returns a new predicate that applies `f` before `self`. There is no + * additional short-circuiting beyond what `self` does. * * **Example** (Check string length) * @@ -324,8 +342,9 @@ export declare const mapInput: { * console.log(isLongerThan2("hello")) * ``` * - * See also: {@link Predicate}, {@link and}, {@link not} - * + * @see {@link Predicate} + * @see {@link and} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -333,14 +352,15 @@ export declare const mapInput: { /** * Transforms the input of a predicate using a mapping function. * - * When to use: - * - You have a predicate on `A` and want one on `B` via `B -> A`. - * - You want to check derived values (lengths, projections, etc.). + * **When to use** + * + * Use when you have a predicate on `A` and want to check `B` values by mapping + * each `B` to an `A`, such as checking lengths or projections. * - * Behavior: - * - Pure; does not mutate input. - * - Returns a new predicate that applies `f` before `self`. - * - No short-circuit beyond what `self` does. + * **Details** + * + * Returns a new predicate that applies `f` before `self`. There is no + * additional short-circuiting beyond what `self` does. * * **Example** (Check string length) * @@ -354,8 +374,9 @@ export declare const mapInput: { * console.log(isLongerThan2("hello")) * ``` * - * See also: {@link Predicate}, {@link and}, {@link not} - * + * @see {@link Predicate} + * @see {@link and} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -364,14 +385,15 @@ export declare const mapInput: { /** * Checks whether a readonly array has exactly `n` elements. * - * When to use: - * - You need a runtime check for tuple length. - * - You want to narrow `ReadonlyArray` to `TupleOf`. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Only checks length, not element types. - * - Returns a refinement on the array type. + * Use when you need a `Predicate` guard for exact tuple length that narrows + * `ReadonlyArray` to `TupleOf`. + * + * **Details** + * + * This only checks length, not element types, and returns a refinement on the + * array type. * * **Example** (Exact length) * @@ -383,8 +405,8 @@ export declare const mapInput: { * console.log(isPair([1, 2])) * ``` * - * See also: {@link isTupleOfAtLeast}, {@link Tuple} - * + * @see {@link isTupleOfAtLeast} + * @see {@link Tuple} * @category guards * @since 3.3.0 */ @@ -392,14 +414,15 @@ export declare const isTupleOf: { /** * Checks whether a readonly array has exactly `n` elements. * - * When to use: - * - You need a runtime check for tuple length. - * - You want to narrow `ReadonlyArray` to `TupleOf`. + * **When to use** + * + * Use when you need a `Predicate` guard for exact tuple length that narrows + * `ReadonlyArray` to `TupleOf`. * - * Behavior: - * - Pure; does not mutate input. - * - Only checks length, not element types. - * - Returns a refinement on the array type. + * **Details** + * + * This only checks length, not element types, and returns a refinement on the + * array type. * * **Example** (Exact length) * @@ -411,8 +434,8 @@ export declare const isTupleOf: { * console.log(isPair([1, 2])) * ``` * - * See also: {@link isTupleOfAtLeast}, {@link Tuple} - * + * @see {@link isTupleOfAtLeast} + * @see {@link Tuple} * @category guards * @since 3.3.0 */ @@ -420,14 +443,15 @@ export declare const isTupleOf: { /** * Checks whether a readonly array has exactly `n` elements. * - * When to use: - * - You need a runtime check for tuple length. - * - You want to narrow `ReadonlyArray` to `TupleOf`. + * **When to use** + * + * Use when you need a `Predicate` guard for exact tuple length that narrows + * `ReadonlyArray` to `TupleOf`. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Only checks length, not element types. - * - Returns a refinement on the array type. + * This only checks length, not element types, and returns a refinement on the + * array type. * * **Example** (Exact length) * @@ -439,8 +463,8 @@ export declare const isTupleOf: { * console.log(isPair([1, 2])) * ``` * - * See also: {@link isTupleOfAtLeast}, {@link Tuple} - * + * @see {@link isTupleOfAtLeast} + * @see {@link Tuple} * @category guards * @since 3.3.0 */ @@ -449,14 +473,15 @@ export declare const isTupleOf: { /** * Checks whether a readonly array has at least `n` elements. * - * When to use: - * - You need a runtime check for tuple-like minimum length. - * - You want to narrow `ReadonlyArray` to `TupleOfAtLeast`. + * **When to use** + * + * Use when you need a `Predicate` guard for tuple-like minimum length that + * narrows `ReadonlyArray` to `TupleOfAtLeast`. * - * Behavior: - * - Pure; does not mutate input. - * - Only checks length, not element types. - * - Returns a refinement on the array type. + * **Details** + * + * This only checks length, not element types, and returns a refinement on the + * array type. * * **Example** (Minimum length) * @@ -468,8 +493,8 @@ export declare const isTupleOf: { * console.log(hasAtLeast2([1, 2, 3])) * ``` * - * See also: {@link isTupleOf}, {@link Tuple} - * + * @see {@link isTupleOf} + * @see {@link Tuple} * @category guards * @since 3.3.0 */ @@ -477,14 +502,15 @@ export declare const isTupleOfAtLeast: { /** * Checks whether a readonly array has at least `n` elements. * - * When to use: - * - You need a runtime check for tuple-like minimum length. - * - You want to narrow `ReadonlyArray` to `TupleOfAtLeast`. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Only checks length, not element types. - * - Returns a refinement on the array type. + * Use when you need a `Predicate` guard for tuple-like minimum length that + * narrows `ReadonlyArray` to `TupleOfAtLeast`. + * + * **Details** + * + * This only checks length, not element types, and returns a refinement on the + * array type. * * **Example** (Minimum length) * @@ -496,8 +522,8 @@ export declare const isTupleOfAtLeast: { * console.log(hasAtLeast2([1, 2, 3])) * ``` * - * See also: {@link isTupleOf}, {@link Tuple} - * + * @see {@link isTupleOf} + * @see {@link Tuple} * @category guards * @since 3.3.0 */ @@ -505,14 +531,15 @@ export declare const isTupleOfAtLeast: { /** * Checks whether a readonly array has at least `n` elements. * - * When to use: - * - You need a runtime check for tuple-like minimum length. - * - You want to narrow `ReadonlyArray` to `TupleOfAtLeast`. + * **When to use** + * + * Use when you need a `Predicate` guard for tuple-like minimum length that + * narrows `ReadonlyArray` to `TupleOfAtLeast`. * - * Behavior: - * - Pure; does not mutate input. - * - Only checks length, not element types. - * - Returns a refinement on the array type. + * **Details** + * + * This only checks length, not element types, and returns a refinement on the + * array type. * * **Example** (Minimum length) * @@ -524,8 +551,8 @@ export declare const isTupleOfAtLeast: { * console.log(hasAtLeast2([1, 2, 3])) * ``` * - * See also: {@link isTupleOf}, {@link Tuple} - * + * @see {@link isTupleOf} + * @see {@link Tuple} * @category guards * @since 3.3.0 */ @@ -534,14 +561,15 @@ export declare const isTupleOfAtLeast: { /** * Checks whether a value is truthy. * - * When to use: - * - You want a predicate that mirrors JavaScript truthiness. - * - You need to filter out falsy values like `0`, "", and `false`. + * **When to use** + * + * Use when you want a predicate that mirrors JavaScript truthiness and filters + * out falsy values like `0`, `""`, and `false`. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `!!input` under the hood. - * - Treats `0`, "", `false`, `null`, and `undefined` as false. + * This uses `!!input` and treats `0`, `""`, `false`, `null`, and `undefined` + * as false. * * **Example** (Filter truthy) * @@ -554,8 +582,8 @@ export declare const isTupleOfAtLeast: { * console.log(truthy) * ``` * - * See also: {@link isNullish}, {@link isNotNullish} - * + * @see {@link isNullish} + * @see {@link isNotNullish} * @category guards * @since 2.0.0 */ @@ -563,12 +591,13 @@ export declare function isTruthy(input: unknown): boolean; /** * Checks whether a value is a `Set`. * - * When to use: - * - You need a runtime guard for `Set` values. + * **When to use** + * + * Use when you need a `Predicate` runtime guard for `Set` values. * - * Behavior: - * - Pure; does not mutate input. - * - Uses `instanceof Set`. + * **Details** + * + * Uses `instanceof Set`. * * **Example** (Guard a Set) * @@ -582,8 +611,8 @@ export declare function isTruthy(input: unknown): boolean; * } * ``` * - * See also: {@link isMap}, {@link isIterable} - * + * @see {@link isMap} + * @see {@link isIterable} * @category guards * @since 2.0.0 */ @@ -591,12 +620,13 @@ export declare function isSet(input: unknown): input is Set; /** * Checks whether a value is a `Map`. * - * When to use: - * - You need a runtime guard for `Map` values. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `instanceof Map`. + * Use when you need a `Predicate` runtime guard for `Map` values. + * + * **Details** + * + * Uses `instanceof Map`. * * **Example** (Guard a Map) * @@ -610,8 +640,8 @@ export declare function isSet(input: unknown): input is Set; * } * ``` * - * See also: {@link isSet}, {@link isIterable} - * + * @see {@link isSet} + * @see {@link isIterable} * @category guards * @since 2.0.0 */ @@ -619,13 +649,14 @@ export declare function isMap(input: unknown): input is Map; /** * Checks whether a value is a `string`. * - * When to use: - * - You need to guard an `unknown` value as a string. - * - You want to narrow in `if` statements. + * **When to use** + * + * Use when you need a `Predicate` guard to narrow an `unknown` value to a + * string. * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "string"`. + * **Details** + * + * Uses `typeof input === "string"`. * * **Example** (Guard string) * @@ -639,8 +670,9 @@ export declare function isMap(input: unknown): input is Map; * } * ``` * - * See also: {@link isNumber}, {@link isBoolean}, {@link Refinement} - * + * @see {@link isNumber} + * @see {@link isBoolean} + * @see {@link Refinement} * @category guards * @since 2.0.0 */ @@ -648,13 +680,14 @@ export declare function isString(input: unknown): input is string; /** * Checks whether a value is a `number`. * - * When to use: - * - You need to guard an `unknown` value as a number. + * **When to use** + * + * Use when you need a `Predicate` guard to narrow an `unknown` value to a + * number. * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "number"`. - * - Does not exclude `NaN` or `Infinity`. + * **Details** + * + * Uses `typeof input === "number"` and does not exclude `NaN` or `Infinity`. * * **Example** (Guard number) * @@ -668,8 +701,8 @@ export declare function isString(input: unknown): input is string; * } * ``` * - * See also: {@link isBigInt}, {@link isString} - * + * @see {@link isBigInt} + * @see {@link isString} * @category guards * @since 2.0.0 */ @@ -677,12 +710,14 @@ export declare function isNumber(input: unknown): input is number; /** * Checks whether a value is a `boolean`. * - * When to use: - * - You need to guard an `unknown` value as a boolean. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "boolean"`. + * Use when you need a `Predicate` guard to narrow an `unknown` value to a + * boolean. + * + * **Details** + * + * Uses `typeof input === "boolean"`. * * **Example** (Guard boolean) * @@ -696,8 +731,8 @@ export declare function isNumber(input: unknown): input is number; * } * ``` * - * See also: {@link isString}, {@link isNumber} - * + * @see {@link isString} + * @see {@link isNumber} * @category guards * @since 2.0.0 */ @@ -705,12 +740,14 @@ export declare function isBoolean(input: unknown): input is boolean; /** * Checks whether a value is a `bigint`. * - * When to use: - * - You need to guard an `unknown` value as a bigint. + * **When to use** + * + * Use when you need a `Predicate` guard to narrow an `unknown` value to a + * bigint. * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "bigint"`. + * **Details** + * + * Uses `typeof input === "bigint"`. * * **Example** (Guard bigint) * @@ -724,8 +761,7 @@ export declare function isBoolean(input: unknown): input is boolean; * } * ``` * - * See also: {@link isNumber} - * + * @see {@link isNumber} * @category guards * @since 2.0.0 */ @@ -733,12 +769,14 @@ export declare function isBigInt(input: unknown): input is bigint; /** * Checks whether a value is a `symbol`. * - * When to use: - * - You need to guard an `unknown` value as a symbol. + * **When to use** + * + * Use when you need a `Predicate` guard to narrow an `unknown` value to a + * symbol. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "symbol"`. + * Uses `typeof input === "symbol"`. * * **Example** (Guard symbol) * @@ -752,8 +790,7 @@ export declare function isBigInt(input: unknown): input is bigint; * } * ``` * - * See also: {@link isPropertyKey} - * + * @see {@link isPropertyKey} * @category guards * @since 2.0.0 */ @@ -761,12 +798,14 @@ export declare function isSymbol(input: unknown): input is symbol; /** * Checks whether a value is a valid `PropertyKey` (string, number, or symbol). * - * When to use: - * - You need to guard unknown keys before indexing. + * **When to use** + * + * Use when you need a `Predicate` guard for unknown property keys before + * indexing. * - * Behavior: - * - Pure; does not mutate input. - * - Uses {@link isString}, {@link isNumber}, and {@link isSymbol}. + * **Details** + * + * Uses `isString`, `isNumber`, and `isSymbol`. * * **Example** (Guard property key) * @@ -781,8 +820,9 @@ export declare function isSymbol(input: unknown): input is symbol; * } * ``` * - * See also: {@link isString}, {@link isNumber}, {@link isSymbol} - * + * @see {@link isString} + * @see {@link isNumber} + * @see {@link isSymbol} * @category guards * @since 4.0.0 */ @@ -790,12 +830,14 @@ export declare function isPropertyKey(u: unknown): u is PropertyKey; /** * Checks whether a value is a `function`. * - * When to use: - * - You need to guard an `unknown` value as callable. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "function"`. + * Use when you need a `Predicate` guard to narrow an `unknown` value to a + * callable function. + * + * **Details** + * + * Uses `typeof input === "function"`. * * **Example** (Guard function) * @@ -809,8 +851,7 @@ export declare function isPropertyKey(u: unknown): u is PropertyKey; * } * ``` * - * See also: {@link isObjectKeyword} - * + * @see {@link isObjectKeyword} * @category guards * @since 2.0.0 */ @@ -818,12 +859,14 @@ export declare function isFunction(input: unknown): input is Function; /** * Checks whether a value is `undefined`. * - * When to use: - * - You need a guard for optional values. + * **When to use** + * + * Use when you need a `Predicate` guard for values that are exactly + * `undefined`. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `input === undefined`. + * Uses `input === undefined`. * * **Example** (Guard undefined) * @@ -835,8 +878,8 @@ export declare function isFunction(input: unknown): input is Function; * console.log(Predicate.isUndefined(data)) * ``` * - * See also: {@link isNotUndefined}, {@link isNullish} - * + * @see {@link isNotUndefined} + * @see {@link isNullish} * @category guards * @since 2.0.0 */ @@ -844,12 +887,14 @@ export declare function isUndefined(input: unknown): input is undefined; /** * Checks whether a value is not `undefined`. * - * When to use: - * - You want to filter out `undefined` while preserving other falsy values. + * **When to use** + * + * Use when you need a `Predicate` refinement that filters out `undefined` + * while preserving other falsy values. * - * Behavior: - * - Pure; does not mutate input. - * - Returns a refinement that excludes `undefined`. + * **Details** + * + * Returns a refinement that excludes `undefined`. * * **Example** (Filter undefined) * @@ -862,8 +907,8 @@ export declare function isUndefined(input: unknown): input is undefined; * console.log(defined) * ``` * - * See also: {@link isUndefined}, {@link isNotNullish} - * + * @see {@link isUndefined} + * @see {@link isNotNullish} * @category guards * @since 2.0.0 */ @@ -871,12 +916,13 @@ export declare function isNotUndefined(input: A): input is Exclude(input: A): input is Exclude(input: A): input is Exclude; /** * Checks whether a value is `null` or `undefined`. * - * When to use: - * - You want to guard nullish values explicitly. + * **When to use** + * + * Use when you need a `Predicate` guard for nullish values. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `input === null || input === undefined`. + * Uses `input === null || input === undefined`. * * **Example** (Guard nullish) * @@ -942,8 +991,9 @@ export declare function isNotNull(input: A): input is Exclude; * console.log(nullish) * ``` * - * See also: {@link isNotNullish}, {@link isUndefined}, {@link isNull} - * + * @see {@link isNotNullish} + * @see {@link isUndefined} + * @see {@link isNull} * @category guards * @since 4.0.0 */ @@ -951,12 +1001,14 @@ export declare function isNullish(input: A): input is A & (null | undefined); /** * Checks whether a value is not `null` and not `undefined`. * - * When to use: - * - You want to filter out nullish values but keep other falsy ones. + * **When to use** + * + * Use when you need a `Predicate` refinement that filters out nullish values + * but keeps other falsy ones. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `input != null`. + * Uses `input != null`. * * **Example** (Filter non-nullish) * @@ -969,21 +1021,19 @@ export declare function isNullish(input: A): input is A & (null | undefined); * console.log(present) * ``` * - * See also: {@link isNullish}, {@link isNotNull}, {@link isNotUndefined} - * + * @see {@link isNullish} + * @see {@link isNotNull} + * @see {@link isNotUndefined} * @category guards * @since 4.0.0 */ export declare function isNotNullish(input: A): input is NonNullable; /** - * A guard that always returns `false`. + * Type guard that always returns `false`. * - * When to use: - * - You need a predicate that never accepts, e.g. in default branches. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Always returns `false`. + * Use when you need a `Predicate` that never accepts, e.g. in default branches. * * **Example** (Never matches) * @@ -993,21 +1043,17 @@ export declare function isNotNullish(input: A): input is NonNullable; * console.log(Predicate.isNever("anything")) * ``` * - * See also: {@link isUnknown} - * + * @see {@link isUnknown} * @category guards * @since 2.0.0 */ export declare function isNever(_: unknown): _ is never; /** - * A guard that always returns `true`. + * Type guard that always returns `true`. * - * When to use: - * - You need a predicate that always accepts, e.g. as a placeholder. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Always returns `true`. + * Use when you need a `Predicate` that always accepts, e.g. as a placeholder. * * **Example** (Always matches) * @@ -1017,8 +1063,7 @@ export declare function isNever(_: unknown): _ is never; * console.log(Predicate.isUnknown(123)) * ``` * - * See also: {@link isNever} - * + * @see {@link isNever} * @category guards * @since 2.0.0 */ @@ -1026,13 +1071,14 @@ export declare function isUnknown(_: unknown): _ is unknown; /** * Checks whether a value is an object or an array (non-null object). * - * When to use: - * - You want to accept plain objects and arrays, but not `null`. + * **When to use** + * + * Use when you need a `Predicate` guard that accepts plain objects and arrays, + * but not `null`. * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "object" && input !== null`. - * - Includes arrays. + * **Details** + * + * Uses `typeof input === "object" && input !== null` and includes arrays. * * **Example** (Object or array) * @@ -1042,8 +1088,8 @@ export declare function isUnknown(_: unknown): _ is unknown; * console.log(Predicate.isObjectOrArray([])) * ``` * - * See also: {@link isObject}, {@link isObjectKeyword} - * + * @see {@link isObject} + * @see {@link isObjectKeyword} * @category guards * @since 4.0.0 */ @@ -1051,14 +1097,18 @@ export declare function isObjectOrArray(input: unknown): input is { [x: PropertyKey]: unknown; } | Array; /** - * Checks whether a value is a plain object (not an array, not `null`). + * Checks whether a value is a non-null object value that is not an array. * - * When to use: - * - You need to accept objects but exclude arrays. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "object" && input !== null && !Array.isArray(input)`. + * Use to narrow unknown input to a non-null, non-array object with a + * `Predicate` guard. + * + * **Details** + * + * This is a structural runtime check using `typeof input === "object"`, so it + * also accepts object instances such as `Date`, `Map`, class instances, and + * typed arrays. It excludes `null` and arrays. * * **Example** (Guard object) * @@ -1069,23 +1119,28 @@ export declare function isObjectOrArray(input: unknown): input is { * console.log(Predicate.isObject([1, 2])) * ``` * - * See also: {@link isObjectOrArray}, {@link isReadonlyObject} - * + * @see {@link isObjectOrArray} + * @see {@link isReadonlyObject} * @category guards - * @since 4.0.0 + * @since 2.0.0 */ export declare function isObject(input: unknown): input is { [x: PropertyKey]: unknown; }; /** - * Checks whether a value is a readonly object. + * Checks whether a value is a non-null, non-array object and narrows it to a + * readonly indexable object type. + * + * **When to use** * - * When to use: - * - You need a guard for object-like values and do not care about mutability. + * Use to narrow unknown input to a readonly view of a non-null, non-array + * object with a `Predicate` guard. * - * Behavior: - * - Pure; does not mutate input. - * - Delegates to {@link isObject}. + * **Details** + * + * Readonly-ness is a TypeScript type-level view; it is not observable at + * runtime. This delegates to `isObject`, so class instances and built-in object + * instances are accepted. * * **Example** (Readonly object) * @@ -1097,8 +1152,7 @@ export declare function isObject(input: unknown): input is { * console.log(Predicate.isReadonlyObject(data)) * ``` * - * See also: {@link isObject} - * + * @see {@link isObject} * @category guards * @since 4.0.0 */ @@ -1108,12 +1162,14 @@ export declare function isReadonlyObject(input: unknown): input is { /** * Checks whether a value is an `object` in the JavaScript sense (objects, arrays, functions). * - * When to use: - * - You want to accept arrays and functions as well as objects. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Returns `true` for arrays and functions, `false` for `null`. + * Use when you need a `Predicate` guard that accepts arrays and functions as + * well as objects. + * + * **Details** + * + * Returns `true` for arrays and functions, and `false` for `null`. * * **Example** (Object keyword) * @@ -1124,23 +1180,24 @@ export declare function isReadonlyObject(input: unknown): input is { * console.log(Predicate.isObjectKeyword(null)) * ``` * - * See also: {@link isObject}, {@link isObjectOrArray} - * + * @see {@link isObject} + * @see {@link isObjectOrArray} * @category guards - * @since 2.0.0 + * @since 4.0.0 */ export declare function isObjectKeyword(input: unknown): input is object; /** * Checks whether a value has a given property key. * - * When to use: - * - You need to guard property access on `unknown` values. - * - You want a simple structural guard for objects. + * **When to use** + * + * Use when you need a `Predicate` guard for property access on `unknown` + * values with a simple structural object check. * - * Behavior: - * - Pure; does not mutate input. - * - Uses the `in` operator and {@link isObjectKeyword}. - * - Does not check property value types. + * **Details** + * + * Uses the `in` operator and `isObjectKeyword`. This does not check property + * value types. * * **Example** (Guard property) * @@ -1155,8 +1212,8 @@ export declare function isObjectKeyword(input: unknown): input is object; * } * ``` * - * See also: {@link isTagged}, {@link isObjectKeyword} - * + * @see {@link isTagged} + * @see {@link isObjectKeyword} * @category guards * @since 2.0.0 */ @@ -1164,14 +1221,15 @@ export declare const hasProperty: { /** * Checks whether a value has a given property key. * - * When to use: - * - You need to guard property access on `unknown` values. - * - You want a simple structural guard for objects. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Uses the `in` operator and {@link isObjectKeyword}. - * - Does not check property value types. + * Use when you need a `Predicate` guard for property access on `unknown` + * values with a simple structural object check. + * + * **Details** + * + * Uses the `in` operator and `isObjectKeyword`. This does not check property + * value types. * * **Example** (Guard property) * @@ -1186,8 +1244,8 @@ export declare const hasProperty: { * } * ``` * - * See also: {@link isTagged}, {@link isObjectKeyword} - * + * @see {@link isTagged} + * @see {@link isObjectKeyword} * @category guards * @since 2.0.0 */ @@ -1197,14 +1255,15 @@ export declare const hasProperty: { /** * Checks whether a value has a given property key. * - * When to use: - * - You need to guard property access on `unknown` values. - * - You want a simple structural guard for objects. + * **When to use** + * + * Use when you need a `Predicate` guard for property access on `unknown` + * values with a simple structural object check. * - * Behavior: - * - Pure; does not mutate input. - * - Uses the `in` operator and {@link isObjectKeyword}. - * - Does not check property value types. + * **Details** + * + * Uses the `in` operator and `isObjectKeyword`. This does not check property + * value types. * * **Example** (Guard property) * @@ -1219,8 +1278,8 @@ export declare const hasProperty: { * } * ``` * - * See also: {@link isTagged}, {@link isObjectKeyword} - * + * @see {@link isTagged} + * @see {@link isObjectKeyword} * @category guards * @since 2.0.0 */ @@ -1231,13 +1290,14 @@ export declare const hasProperty: { /** * Checks whether a value has a `_tag` property equal to the given tag. * - * When to use: - * - You model tagged unions with a `_tag` field. - * - You want a quick, structural guard for tagged values. + * **When to use** + * + * Use when you model tagged unions with a `_tag` field and want a quick + * `Predicate` guard for tagged values. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Uses {@link hasProperty} and strict equality on `_tag`. + * Uses `hasProperty` and strict equality on `_tag`. * * **Example** (Guard tagged) * @@ -1249,8 +1309,7 @@ export declare const hasProperty: { * console.log(isOk({ _tag: "Ok", value: 1 })) * ``` * - * See also: {@link hasProperty} - * + * @see {@link hasProperty} * @category guards * @since 2.0.0 */ @@ -1258,13 +1317,14 @@ export declare const isTagged: { /** * Checks whether a value has a `_tag` property equal to the given tag. * - * When to use: - * - You model tagged unions with a `_tag` field. - * - You want a quick, structural guard for tagged values. + * **When to use** + * + * Use when you model tagged unions with a `_tag` field and want a quick + * `Predicate` guard for tagged values. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Uses {@link hasProperty} and strict equality on `_tag`. + * Uses `hasProperty` and strict equality on `_tag`. * * **Example** (Guard tagged) * @@ -1276,8 +1336,7 @@ export declare const isTagged: { * console.log(isOk({ _tag: "Ok", value: 1 })) * ``` * - * See also: {@link hasProperty} - * + * @see {@link hasProperty} * @category guards * @since 2.0.0 */ @@ -1287,13 +1346,14 @@ export declare const isTagged: { /** * Checks whether a value has a `_tag` property equal to the given tag. * - * When to use: - * - You model tagged unions with a `_tag` field. - * - You want a quick, structural guard for tagged values. + * **When to use** + * + * Use when you model tagged unions with a `_tag` field and want a quick + * `Predicate` guard for tagged values. * - * Behavior: - * - Pure; does not mutate input. - * - Uses {@link hasProperty} and strict equality on `_tag`. + * **Details** + * + * Uses `hasProperty` and strict equality on `_tag`. * * **Example** (Guard tagged) * @@ -1305,8 +1365,7 @@ export declare const isTagged: { * console.log(isOk({ _tag: "Ok", value: 1 })) * ``` * - * See also: {@link hasProperty} - * + * @see {@link hasProperty} * @category guards * @since 2.0.0 */ @@ -1317,12 +1376,13 @@ export declare const isTagged: { /** * Checks whether a value is an `Error`. * - * When to use: - * - You need to guard errors caught from unknown sources. + * **When to use** + * + * Use when you need a `Predicate` guard for errors caught from unknown sources. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `instanceof Error`. + * Uses `instanceof Error`. * * **Example** (Guard error) * @@ -1334,8 +1394,7 @@ export declare const isTagged: { * console.log(Predicate.isError(data)) * ``` * - * See also: {@link isUnknown} - * + * @see {@link isUnknown} * @category guards * @since 2.0.0 */ @@ -1343,12 +1402,13 @@ export declare function isError(input: unknown): input is Error; /** * Checks whether a value is a `Uint8Array`. * - * When to use: - * - You need to guard binary data at runtime. + * **When to use** + * + * Use when you need a `Predicate` runtime guard for binary data. * - * Behavior: - * - Pure; does not mutate input. - * - Uses `instanceof Uint8Array`. + * **Details** + * + * Uses `instanceof Uint8Array`. * * **Example** (Guard Uint8Array) * @@ -1360,8 +1420,8 @@ export declare function isError(input: unknown): input is Error; * console.log(Predicate.isUint8Array(data)) * ``` * - * See also: {@link isIterable}, {@link isSet} - * + * @see {@link isIterable} + * @see {@link isSet} * @category guards * @since 2.0.0 */ @@ -1369,12 +1429,13 @@ export declare function isUint8Array(input: unknown): input is Uint8Array; /** * Checks whether a value is a `Date`. * - * When to use: - * - You need to guard dates at runtime. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `instanceof Date`. + * Use when you need a `Predicate` runtime guard for dates. + * + * **Details** + * + * Uses `instanceof Date`. * * **Example** (Guard Date) * @@ -1386,8 +1447,7 @@ export declare function isUint8Array(input: unknown): input is Uint8Array; * console.log(Predicate.isDate(data)) * ``` * - * See also: {@link isRegExp} - * + * @see {@link isRegExp} * @category guards * @since 2.0.0 */ @@ -1395,13 +1455,13 @@ export declare function isDate(input: unknown): input is Date; /** * Checks whether a value is iterable. * - * When to use: - * - You need a guard before iterating an unknown value. + * **When to use** + * + * Use when you need a `Predicate` guard before iterating an unknown value. * - * Behavior: - * - Pure; does not mutate input. - * - Accepts strings as iterable. - * - Uses {@link hasProperty} for `Symbol.iterator`. + * **Details** + * + * Accepts strings as iterable and uses `hasProperty` for `Symbol.iterator`. * * **Example** (Guard iterable) * @@ -1413,8 +1473,8 @@ export declare function isDate(input: unknown): input is Date; * console.log(Predicate.isIterable(data)) * ``` * - * See also: {@link isSet}, {@link isMap} - * + * @see {@link isSet} + * @see {@link isMap} * @category guards * @since 2.0.0 */ @@ -1422,12 +1482,13 @@ export declare function isIterable(input: unknown): input is Iterable; /** * Checks whether a value is a `Promise`-like object with `then` and `catch`. * - * When to use: - * - You need to detect promise instances across realms. + * **When to use** + * + * Use when you need a `Predicate` guard for promise instances across realms. * - * Behavior: - * - Pure; does not mutate input. - * - Structural check for `then` and `catch` functions. + * **Details** + * + * Performs a structural check for `then` and `catch` functions. * * **Example** (Guard promise) * @@ -1439,8 +1500,7 @@ export declare function isIterable(input: unknown): input is Iterable; * console.log(Predicate.isPromise(data)) * ``` * - * See also: {@link isPromiseLike} - * + * @see {@link isPromiseLike} * @category guards * @since 2.0.0 */ @@ -1448,12 +1508,14 @@ export declare function isPromise(input: unknown): input is Promise; /** * Checks whether a value is `PromiseLike` (has a `then` method). * - * When to use: - * - You only need `then` to interop with promise-like values. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Structural check for a callable `then`. + * Use when you need a `Predicate` guard for promise-like values with a + * callable `then` method. + * + * **Details** + * + * Performs a structural check for a callable `then`. * * **Example** (Guard promise-like) * @@ -1465,8 +1527,7 @@ export declare function isPromise(input: unknown): input is Promise; * console.log(Predicate.isPromiseLike(data)) * ``` * - * See also: {@link isPromise} - * + * @see {@link isPromise} * @category guards * @since 2.0.0 */ @@ -1474,12 +1535,13 @@ export declare function isPromiseLike(input: unknown): input is PromiseLike>(elem /** * Creates a predicate for objects by applying predicates to named properties. * - * When to use: - * - You want to validate a record shape at runtime. - * - You want to lift property predicates into an object predicate. + * **When to use** + * + * Use when you want to validate a record shape at runtime by lifting property + * predicates into an object predicate. * - * Behavior: - * - Pure; does not mutate input. - * - Returns a refinement if any field predicate is a refinement. - * - Checks only the specified keys; extra keys are ignored. + * **Details** + * + * Returns a refinement if any field predicate is a refinement. Only the + * specified keys are checked, and extra keys are ignored. * * **Example** (Struct predicate) * @@ -1712,8 +1780,8 @@ export declare function Tuple>(elem * console.log(userCheck({ id: 1, name: "Ada" })) * ``` * - * See also: {@link Tuple}, {@link hasProperty} - * + * @see {@link Tuple} + * @see {@link hasProperty} * @category combinators * @since 4.0.0 */ @@ -1727,12 +1795,13 @@ export declare function Struct>(fields: /** * Negates a predicate. * - * When to use: - * - You want the inverse of an existing predicate. + * **When to use** + * + * Use when you want the inverse of an existing predicate. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Returns a new predicate that flips the boolean result. + * Returns a new predicate that flips the boolean result. * * **Example** (Negate) * @@ -1744,8 +1813,9 @@ export declare function Struct>(fields: * console.log(isNotString(1)) * ``` * - * See also: {@link and}, {@link or}, {@link xor} - * + * @see {@link and} + * @see {@link or} + * @see {@link xor} * @category combinators * @since 2.0.0 */ @@ -1753,14 +1823,15 @@ export declare function not(self: Predicate): Predicate; /** * Creates a predicate that returns `true` if either predicate is `true`. * - * When to use: - * - You want to accept values that satisfy at least one condition. - * - You want to combine refinements with union narrowing. + * **When to use** + * + * Use when you want to combine `Predicate`s with OR, accepting values that + * satisfy at least one condition, including refinements that narrow to a union. * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `true`. - * - For refinements, the output type is a union. + * **Details** + * + * Evaluation short-circuits on the first `true`. For refinements, the output + * type is a union. * * **Example** (Either condition) * @@ -1772,8 +1843,8 @@ export declare function not(self: Predicate): Predicate; * console.log(isStringOrNumber("a")) * ``` * - * See also: {@link and}, {@link xor} - * + * @see {@link and} + * @see {@link xor} * @category combinators * @since 2.0.0 */ @@ -1781,14 +1852,15 @@ export declare const or: { /** * Creates a predicate that returns `true` if either predicate is `true`. * - * When to use: - * - You want to accept values that satisfy at least one condition. - * - You want to combine refinements with union narrowing. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `true`. - * - For refinements, the output type is a union. + * Use when you want to combine `Predicate`s with OR, accepting values that + * satisfy at least one condition, including refinements that narrow to a union. + * + * **Details** + * + * Evaluation short-circuits on the first `true`. For refinements, the output + * type is a union. * * **Example** (Either condition) * @@ -1800,8 +1872,8 @@ export declare const or: { * console.log(isStringOrNumber("a")) * ``` * - * See also: {@link and}, {@link xor} - * + * @see {@link and} + * @see {@link xor} * @category combinators * @since 2.0.0 */ @@ -1809,14 +1881,15 @@ export declare const or: { /** * Creates a predicate that returns `true` if either predicate is `true`. * - * When to use: - * - You want to accept values that satisfy at least one condition. - * - You want to combine refinements with union narrowing. + * **When to use** + * + * Use when you want to combine `Predicate`s with OR, accepting values that + * satisfy at least one condition, including refinements that narrow to a union. * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `true`. - * - For refinements, the output type is a union. + * **Details** + * + * Evaluation short-circuits on the first `true`. For refinements, the output + * type is a union. * * **Example** (Either condition) * @@ -1828,8 +1901,8 @@ export declare const or: { * console.log(isStringOrNumber("a")) * ``` * - * See also: {@link and}, {@link xor} - * + * @see {@link and} + * @see {@link xor} * @category combinators * @since 2.0.0 */ @@ -1837,14 +1910,15 @@ export declare const or: { /** * Creates a predicate that returns `true` if either predicate is `true`. * - * When to use: - * - You want to accept values that satisfy at least one condition. - * - You want to combine refinements with union narrowing. + * **When to use** + * + * Use when you want to combine `Predicate`s with OR, accepting values that + * satisfy at least one condition, including refinements that narrow to a union. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `true`. - * - For refinements, the output type is a union. + * Evaluation short-circuits on the first `true`. For refinements, the output + * type is a union. * * **Example** (Either condition) * @@ -1856,8 +1930,8 @@ export declare const or: { * console.log(isStringOrNumber("a")) * ``` * - * See also: {@link and}, {@link xor} - * + * @see {@link and} + * @see {@link xor} * @category combinators * @since 2.0.0 */ @@ -1865,14 +1939,15 @@ export declare const or: { /** * Creates a predicate that returns `true` if either predicate is `true`. * - * When to use: - * - You want to accept values that satisfy at least one condition. - * - You want to combine refinements with union narrowing. + * **When to use** + * + * Use when you want to combine `Predicate`s with OR, accepting values that + * satisfy at least one condition, including refinements that narrow to a union. * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `true`. - * - For refinements, the output type is a union. + * **Details** + * + * Evaluation short-circuits on the first `true`. For refinements, the output + * type is a union. * * **Example** (Either condition) * @@ -1884,8 +1959,8 @@ export declare const or: { * console.log(isStringOrNumber("a")) * ``` * - * See also: {@link and}, {@link xor} - * + * @see {@link and} + * @see {@link xor} * @category combinators * @since 2.0.0 */ @@ -1894,14 +1969,16 @@ export declare const or: { /** * Creates a predicate that returns `true` only if both predicates are `true`. * - * When to use: - * - You want to accept values that satisfy multiple conditions. - * - You want to combine refinements with intersection narrowing. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `false`. - * - For refinements, the output type is an intersection. + * Use when you want to combine `Predicate`s with AND, accepting values that + * satisfy multiple conditions, including refinements that narrow to an + * intersection. + * + * **Details** + * + * Evaluation short-circuits on the first `false`. For refinements, the output + * type is an intersection. * * **Example** (Both conditions) * @@ -1921,8 +1998,8 @@ export declare const or: { * } * ``` * - * See also: {@link or}, {@link not} - * + * @see {@link or} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -1930,14 +2007,16 @@ export declare const and: { /** * Creates a predicate that returns `true` only if both predicates are `true`. * - * When to use: - * - You want to accept values that satisfy multiple conditions. - * - You want to combine refinements with intersection narrowing. + * **When to use** + * + * Use when you want to combine `Predicate`s with AND, accepting values that + * satisfy multiple conditions, including refinements that narrow to an + * intersection. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `false`. - * - For refinements, the output type is an intersection. + * Evaluation short-circuits on the first `false`. For refinements, the output + * type is an intersection. * * **Example** (Both conditions) * @@ -1957,8 +2036,8 @@ export declare const and: { * } * ``` * - * See also: {@link or}, {@link not} - * + * @see {@link or} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -1966,14 +2045,16 @@ export declare const and: { /** * Creates a predicate that returns `true` only if both predicates are `true`. * - * When to use: - * - You want to accept values that satisfy multiple conditions. - * - You want to combine refinements with intersection narrowing. + * **When to use** + * + * Use when you want to combine `Predicate`s with AND, accepting values that + * satisfy multiple conditions, including refinements that narrow to an + * intersection. * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `false`. - * - For refinements, the output type is an intersection. + * **Details** + * + * Evaluation short-circuits on the first `false`. For refinements, the output + * type is an intersection. * * **Example** (Both conditions) * @@ -1993,8 +2074,8 @@ export declare const and: { * } * ``` * - * See also: {@link or}, {@link not} - * + * @see {@link or} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -2002,14 +2083,16 @@ export declare const and: { /** * Creates a predicate that returns `true` only if both predicates are `true`. * - * When to use: - * - You want to accept values that satisfy multiple conditions. - * - You want to combine refinements with intersection narrowing. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `false`. - * - For refinements, the output type is an intersection. + * Use when you want to combine `Predicate`s with AND, accepting values that + * satisfy multiple conditions, including refinements that narrow to an + * intersection. + * + * **Details** + * + * Evaluation short-circuits on the first `false`. For refinements, the output + * type is an intersection. * * **Example** (Both conditions) * @@ -2029,8 +2112,8 @@ export declare const and: { * } * ``` * - * See also: {@link or}, {@link not} - * + * @see {@link or} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -2038,14 +2121,16 @@ export declare const and: { /** * Creates a predicate that returns `true` only if both predicates are `true`. * - * When to use: - * - You want to accept values that satisfy multiple conditions. - * - You want to combine refinements with intersection narrowing. + * **When to use** + * + * Use when you want to combine `Predicate`s with AND, accepting values that + * satisfy multiple conditions, including refinements that narrow to an + * intersection. * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `false`. - * - For refinements, the output type is an intersection. + * **Details** + * + * Evaluation short-circuits on the first `false`. For refinements, the output + * type is an intersection. * * **Example** (Both conditions) * @@ -2065,8 +2150,8 @@ export declare const and: { * } * ``` * - * See also: {@link or}, {@link not} - * + * @see {@link or} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -2075,12 +2160,13 @@ export declare const and: { /** * Creates a predicate that returns `true` if exactly one predicate is `true`. * - * When to use: - * - You want an exclusive-or between two conditions. + * **When to use** + * + * Use when you want to combine two `Predicate`s with exclusive-or semantics. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Returns `true` when results differ. + * Returns `true` when results differ. * * **Example** (Exclusive or) * @@ -2094,8 +2180,8 @@ export declare const and: { * console.log(either(-2)) * ``` * - * See also: {@link or}, {@link and} - * + * @see {@link or} + * @see {@link and} * @category combinators * @since 2.0.0 */ @@ -2103,12 +2189,13 @@ export declare const xor: { /** * Creates a predicate that returns `true` if exactly one predicate is `true`. * - * When to use: - * - You want an exclusive-or between two conditions. + * **When to use** + * + * Use when you want to combine two `Predicate`s with exclusive-or semantics. * - * Behavior: - * - Pure; does not mutate input. - * - Returns `true` when results differ. + * **Details** + * + * Returns `true` when results differ. * * **Example** (Exclusive or) * @@ -2122,8 +2209,8 @@ export declare const xor: { * console.log(either(-2)) * ``` * - * See also: {@link or}, {@link and} - * + * @see {@link or} + * @see {@link and} * @category combinators * @since 2.0.0 */ @@ -2131,12 +2218,13 @@ export declare const xor: { /** * Creates a predicate that returns `true` if exactly one predicate is `true`. * - * When to use: - * - You want an exclusive-or between two conditions. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Returns `true` when results differ. + * Use when you want to combine two `Predicate`s with exclusive-or semantics. + * + * **Details** + * + * Returns `true` when results differ. * * **Example** (Exclusive or) * @@ -2150,8 +2238,8 @@ export declare const xor: { * console.log(either(-2)) * ``` * - * See also: {@link or}, {@link and} - * + * @see {@link or} + * @see {@link and} * @category combinators * @since 2.0.0 */ @@ -2160,12 +2248,13 @@ export declare const xor: { /** * Creates a predicate that returns `true` when both predicates agree. * - * When to use: - * - You want to check equivalence of two predicates. + * **When to use** + * + * Use when you want to check equivalence of two `Predicate`s. * - * Behavior: - * - Pure; does not mutate input. - * - Returns `true` when both results are equal. + * **Details** + * + * Returns `true` when both results are equal. * * **Example** (Equivalence) * @@ -2178,8 +2267,7 @@ export declare const xor: { * console.log(same(3)) * ``` * - * See also: {@link xor} - * + * @see {@link xor} * @category combinators * @since 2.0.0 */ @@ -2187,12 +2275,13 @@ export declare const eqv: { /** * Creates a predicate that returns `true` when both predicates agree. * - * When to use: - * - You want to check equivalence of two predicates. + * **When to use** + * + * Use when you want to check equivalence of two `Predicate`s. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Returns `true` when both results are equal. + * Returns `true` when both results are equal. * * **Example** (Equivalence) * @@ -2205,8 +2294,7 @@ export declare const eqv: { * console.log(same(3)) * ``` * - * See also: {@link xor} - * + * @see {@link xor} * @category combinators * @since 2.0.0 */ @@ -2214,12 +2302,13 @@ export declare const eqv: { /** * Creates a predicate that returns `true` when both predicates agree. * - * When to use: - * - You want to check equivalence of two predicates. + * **When to use** + * + * Use when you want to check equivalence of two `Predicate`s. * - * Behavior: - * - Pure; does not mutate input. - * - Returns `true` when both results are equal. + * **Details** + * + * Returns `true` when both results are equal. * * **Example** (Equivalence) * @@ -2232,8 +2321,7 @@ export declare const eqv: { * console.log(same(3)) * ``` * - * See also: {@link xor} - * + * @see {@link xor} * @category combinators * @since 2.0.0 */ @@ -2242,13 +2330,15 @@ export declare const eqv: { /** * Creates a predicate representing logical implication: if `antecedent`, then `consequent`. * - * When to use: - * - You want a rule that only applies when a precondition holds. - * - You model constraints like "if A then B". + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Returns `true` when the antecedent is `false`. + * Use when you need to encode logical implication between `Predicate` rules, + * where one rule only applies when a precondition holds. + * + * **Details** + * + * Models constraints like "if A then B" and returns `true` when the antecedent + * is `false`. * * **Example** (Implication) * @@ -2262,8 +2352,8 @@ export declare const eqv: { * console.log(implies(16)) * ``` * - * See also: {@link and}, {@link or} - * + * @see {@link and} + * @see {@link or} * @category combinators * @since 2.0.0 */ @@ -2271,13 +2361,15 @@ export declare const implies: { /** * Creates a predicate representing logical implication: if `antecedent`, then `consequent`. * - * When to use: - * - You want a rule that only applies when a precondition holds. - * - You model constraints like "if A then B". + * **When to use** + * + * Use when you need to encode logical implication between `Predicate` rules, + * where one rule only applies when a precondition holds. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Returns `true` when the antecedent is `false`. + * Models constraints like "if A then B" and returns `true` when the antecedent + * is `false`. * * **Example** (Implication) * @@ -2291,8 +2383,8 @@ export declare const implies: { * console.log(implies(16)) * ``` * - * See also: {@link and}, {@link or} - * + * @see {@link and} + * @see {@link or} * @category combinators * @since 2.0.0 */ @@ -2300,13 +2392,15 @@ export declare const implies: { /** * Creates a predicate representing logical implication: if `antecedent`, then `consequent`. * - * When to use: - * - You want a rule that only applies when a precondition holds. - * - You model constraints like "if A then B". + * **When to use** + * + * Use when you need to encode logical implication between `Predicate` rules, + * where one rule only applies when a precondition holds. * - * Behavior: - * - Pure; does not mutate input. - * - Returns `true` when the antecedent is `false`. + * **Details** + * + * Models constraints like "if A then B" and returns `true` when the antecedent + * is `false`. * * **Example** (Implication) * @@ -2320,8 +2414,8 @@ export declare const implies: { * console.log(implies(16)) * ``` * - * See also: {@link and}, {@link or} - * + * @see {@link and} + * @see {@link or} * @category combinators * @since 2.0.0 */ @@ -2330,12 +2424,13 @@ export declare const implies: { /** * Creates a predicate that returns `true` when neither predicate is `true`. * - * When to use: - * - You want the logical NOR of two conditions. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Returns the negation of {@link or}. + * Use when you want to combine two `Predicate`s with logical NOR semantics. + * + * **Details** + * + * Returns the negation of `or`. * * **Example** (NOR) * @@ -2347,8 +2442,8 @@ export declare const implies: { * console.log(neither(true)) * ``` * - * See also: {@link or}, {@link not} - * + * @see {@link or} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -2356,12 +2451,13 @@ export declare const nor: { /** * Creates a predicate that returns `true` when neither predicate is `true`. * - * When to use: - * - You want the logical NOR of two conditions. + * **When to use** + * + * Use when you want to combine two `Predicate`s with logical NOR semantics. * - * Behavior: - * - Pure; does not mutate input. - * - Returns the negation of {@link or}. + * **Details** + * + * Returns the negation of `or`. * * **Example** (NOR) * @@ -2373,8 +2469,8 @@ export declare const nor: { * console.log(neither(true)) * ``` * - * See also: {@link or}, {@link not} - * + * @see {@link or} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -2382,12 +2478,13 @@ export declare const nor: { /** * Creates a predicate that returns `true` when neither predicate is `true`. * - * When to use: - * - You want the logical NOR of two conditions. + * **When to use** + * + * Use when you want to combine two `Predicate`s with logical NOR semantics. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Returns the negation of {@link or}. + * Returns the negation of `or`. * * **Example** (NOR) * @@ -2399,8 +2496,8 @@ export declare const nor: { * console.log(neither(true)) * ``` * - * See also: {@link or}, {@link not} - * + * @see {@link or} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -2409,12 +2506,13 @@ export declare const nor: { /** * Creates a predicate that returns `true` unless both predicates are `true`. * - * When to use: - * - You want the logical NAND of two conditions. + * **When to use** + * + * Use when you want to combine two `Predicate`s with logical NAND semantics. * - * Behavior: - * - Pure; does not mutate input. - * - Returns the negation of {@link and}. + * **Details** + * + * Returns the negation of `and`. * * **Example** (NAND) * @@ -2426,8 +2524,8 @@ export declare const nor: { * console.log(notBoth("a")) * ``` * - * See also: {@link and}, {@link not} - * + * @see {@link and} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -2435,12 +2533,13 @@ export declare const nand: { /** * Creates a predicate that returns `true` unless both predicates are `true`. * - * When to use: - * - You want the logical NAND of two conditions. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Returns the negation of {@link and}. + * Use when you want to combine two `Predicate`s with logical NAND semantics. + * + * **Details** + * + * Returns the negation of `and`. * * **Example** (NAND) * @@ -2452,8 +2551,8 @@ export declare const nand: { * console.log(notBoth("a")) * ``` * - * See also: {@link and}, {@link not} - * + * @see {@link and} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -2461,12 +2560,13 @@ export declare const nand: { /** * Creates a predicate that returns `true` unless both predicates are `true`. * - * When to use: - * - You want the logical NAND of two conditions. + * **When to use** + * + * Use when you want to combine two `Predicate`s with logical NAND semantics. * - * Behavior: - * - Pure; does not mutate input. - * - Returns the negation of {@link and}. + * **Details** + * + * Returns the negation of `and`. * * **Example** (NAND) * @@ -2478,8 +2578,8 @@ export declare const nand: { * console.log(notBoth("a")) * ``` * - * See also: {@link and}, {@link not} - * + * @see {@link and} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -2488,13 +2588,14 @@ export declare const nand: { /** * Creates a predicate that returns `true` if all predicates in the collection return `true`. * - * When to use: - * - You have a dynamic list of predicates to apply. + * **When to use** + * + * Use when you have a dynamic list of predicates to apply. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `false`. - * - Iterates the collection each time the predicate is called. + * Evaluation short-circuits on the first `false`. The collection is iterated + * each time the predicate is called. * * **Example** (All checks) * @@ -2506,8 +2607,8 @@ export declare const nand: { * console.log(allChecks(2)) * ``` * - * See also: {@link some}, {@link and} - * + * @see {@link some} + * @see {@link and} * @category elements * @since 2.0.0 */ @@ -2515,13 +2616,14 @@ export declare function every(collection: Iterable>): Predicate< /** * Creates a predicate that returns `true` if any predicate in the collection returns `true`. * - * When to use: - * - You have a dynamic list of predicates and only need one to pass. + * **When to use** + * + * Use when you have a dynamic list of predicates and only need one to pass. * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `true`. - * - Iterates the collection each time the predicate is called. + * **Details** + * + * Evaluation short-circuits on the first `true`. The collection is iterated + * each time the predicate is called. * * **Example** (Any check) * @@ -2533,8 +2635,8 @@ export declare function every(collection: Iterable>): Predicate< * console.log(anyCheck("ok")) * ``` * - * See also: {@link every}, {@link or} - * + * @see {@link every} + * @see {@link or} * @category elements * @since 2.0.0 */ diff --git a/.opencode/node_modules/effect/dist/Predicate.d.ts.map b/.opencode/node_modules/effect/dist/Predicate.d.ts.map index 1077088efc75c72e37e0da0fe24aff594d29842a..25d60b492356d716110972c0bad0f561cade2f9f 100644 --- a/.opencode/node_modules/effect/dist/Predicate.d.ts.map +++ b/.opencode/node_modules/effect/dist/Predicate.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Predicate.d.ts","sourceRoot":"","sources":["../src/Predicate.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,SAAS,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,CAAA;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACrD,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAA;CACzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,SAAS,CAAC;IAC/C,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,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AI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAA;IAC7D;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;CAI1D,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,IAAI,EAAE;IACjB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAA;IAC7D;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;CAI1D,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CASzE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CASxE"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Predicate.js b/.opencode/node_modules/effect/dist/Predicate.js index 6bd6861ce70f7bfc90955d9d744237d831aedb99..4212ccb709cedee13df2ff11bca147c3fa2c6efc 100644 --- a/.opencode/node_modules/effect/dist/Predicate.js +++ b/.opencode/node_modules/effect/dist/Predicate.js @@ -1,41 +1,11 @@ /** - * Predicate and Refinement helpers for runtime checks, filtering, and type narrowing. - * This module provides small, pure functions you can combine to decide whether a - * value matches a condition and, when using refinements, narrow TypeScript types. - * - * Mental model: - * - A `Predicate` is just `(a: A) => boolean`. - * - A `Refinement` is a predicate that narrows `A` to `B` when true. - * - Guards like `isString` are predicates/refinements for common runtime types. - * - Combinators like `and`/`or` build new predicates from existing ones. - * - `Tuple` and `Struct` lift element/property predicates to compound values. - * - * Common tasks: - * - Reuse an existing predicate on a different input shape -> {@link mapInput} - * - Combine checks -> {@link and}, {@link or}, {@link not}, {@link xor} - * - Build tuple/object checks -> {@link Tuple}, {@link Struct} - * - Narrow `unknown` to a concrete type -> {@link Refinement}, {@link compose} - * - Check runtime types -> {@link isString}, {@link isNumber}, {@link isObject} - * - * Gotchas: - * - `isTruthy` uses JavaScript truthiness; `0`, "", and `false` are false. - * - `isObject` excludes arrays; use {@link isObjectOrArray} for both. - * - `isIterable` treats strings as iterable. - * - `isPromise`/`isPromiseLike` are structural checks (then/catch), not `instanceof`. - * - `isTupleOf` and `isTupleOfAtLeast` only check length, not element types. - * - * **Example** (Filter by a predicate) + * Defines runtime checks for values. * - * ```ts - * import * as Predicate from "effect/Predicate" - * - * const isPositive = (n: number) => n > 0 - * const data = [2, -1, 3] - * - * console.log(data.filter(isPositive)) - * ``` - * - * See also: {@link Predicate}, {@link Refinement}, {@link and}, {@link or}, {@link mapInput} + * A `Predicate` returns `true` or `false` for an `A`. A + * `Refinement` is a predicate that also narrows the TypeScript type when + * it succeeds. This module includes guards for common JavaScript values, + * property and tag checks, tuple and struct checks, boolean combinators, and + * helpers for composing predicates and refinements. * * @since 2.0.0 */ @@ -43,14 +13,15 @@ import { dual } from "./Function.js"; /** * Transforms the input of a predicate using a mapping function. * - * When to use: - * - You have a predicate on `A` and want one on `B` via `B -> A`. - * - You want to check derived values (lengths, projections, etc.). + * **When to use** + * + * Use when you have a predicate on `A` and want to check `B` values by mapping + * each `B` to an `A`, such as checking lengths or projections. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Returns a new predicate that applies `f` before `self`. - * - No short-circuit beyond what `self` does. + * Returns a new predicate that applies `f` before `self`. There is no + * additional short-circuiting beyond what `self` does. * * **Example** (Check string length) * @@ -64,8 +35,9 @@ import { dual } from "./Function.js"; * console.log(isLongerThan2("hello")) * ``` * - * See also: {@link Predicate}, {@link and}, {@link not} - * + * @see {@link Predicate} + * @see {@link and} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -73,14 +45,15 @@ export const mapInput = /*#__PURE__*/dual(2, (self, f) => b => self(f(b))); /** * Checks whether a readonly array has exactly `n` elements. * - * When to use: - * - You need a runtime check for tuple length. - * - You want to narrow `ReadonlyArray` to `TupleOf`. + * **When to use** + * + * Use when you need a `Predicate` guard for exact tuple length that narrows + * `ReadonlyArray` to `TupleOf`. * - * Behavior: - * - Pure; does not mutate input. - * - Only checks length, not element types. - * - Returns a refinement on the array type. + * **Details** + * + * This only checks length, not element types, and returns a refinement on the + * array type. * * **Example** (Exact length) * @@ -92,8 +65,8 @@ export const mapInput = /*#__PURE__*/dual(2, (self, f) => b => self(f(b))); * console.log(isPair([1, 2])) * ``` * - * See also: {@link isTupleOfAtLeast}, {@link Tuple} - * + * @see {@link isTupleOfAtLeast} + * @see {@link Tuple} * @category guards * @since 3.3.0 */ @@ -101,14 +74,15 @@ export const isTupleOf = /*#__PURE__*/dual(2, (self, n) => self.length === n); /** * Checks whether a readonly array has at least `n` elements. * - * When to use: - * - You need a runtime check for tuple-like minimum length. - * - You want to narrow `ReadonlyArray` to `TupleOfAtLeast`. + * **When to use** + * + * Use when you need a `Predicate` guard for tuple-like minimum length that + * narrows `ReadonlyArray` to `TupleOfAtLeast`. * - * Behavior: - * - Pure; does not mutate input. - * - Only checks length, not element types. - * - Returns a refinement on the array type. + * **Details** + * + * This only checks length, not element types, and returns a refinement on the + * array type. * * **Example** (Minimum length) * @@ -120,8 +94,8 @@ export const isTupleOf = /*#__PURE__*/dual(2, (self, n) => self.length === n); * console.log(hasAtLeast2([1, 2, 3])) * ``` * - * See also: {@link isTupleOf}, {@link Tuple} - * + * @see {@link isTupleOf} + * @see {@link Tuple} * @category guards * @since 3.3.0 */ @@ -129,14 +103,15 @@ export const isTupleOfAtLeast = /*#__PURE__*/dual(2, (self, n) => self.length >= /** * Checks whether a value is truthy. * - * When to use: - * - You want a predicate that mirrors JavaScript truthiness. - * - You need to filter out falsy values like `0`, "", and `false`. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `!!input` under the hood. - * - Treats `0`, "", `false`, `null`, and `undefined` as false. + * Use when you want a predicate that mirrors JavaScript truthiness and filters + * out falsy values like `0`, `""`, and `false`. + * + * **Details** + * + * This uses `!!input` and treats `0`, `""`, `false`, `null`, and `undefined` + * as false. * * **Example** (Filter truthy) * @@ -149,8 +124,8 @@ export const isTupleOfAtLeast = /*#__PURE__*/dual(2, (self, n) => self.length >= * console.log(truthy) * ``` * - * See also: {@link isNullish}, {@link isNotNullish} - * + * @see {@link isNullish} + * @see {@link isNotNullish} * @category guards * @since 2.0.0 */ @@ -160,12 +135,13 @@ export function isTruthy(input) { /** * Checks whether a value is a `Set`. * - * When to use: - * - You need a runtime guard for `Set` values. + * **When to use** + * + * Use when you need a `Predicate` runtime guard for `Set` values. * - * Behavior: - * - Pure; does not mutate input. - * - Uses `instanceof Set`. + * **Details** + * + * Uses `instanceof Set`. * * **Example** (Guard a Set) * @@ -179,8 +155,8 @@ export function isTruthy(input) { * } * ``` * - * See also: {@link isMap}, {@link isIterable} - * + * @see {@link isMap} + * @see {@link isIterable} * @category guards * @since 2.0.0 */ @@ -190,12 +166,13 @@ export function isSet(input) { /** * Checks whether a value is a `Map`. * - * When to use: - * - You need a runtime guard for `Map` values. + * **When to use** + * + * Use when you need a `Predicate` runtime guard for `Map` values. * - * Behavior: - * - Pure; does not mutate input. - * - Uses `instanceof Map`. + * **Details** + * + * Uses `instanceof Map`. * * **Example** (Guard a Map) * @@ -209,8 +186,8 @@ export function isSet(input) { * } * ``` * - * See also: {@link isSet}, {@link isIterable} - * + * @see {@link isSet} + * @see {@link isIterable} * @category guards * @since 2.0.0 */ @@ -220,13 +197,14 @@ export function isMap(input) { /** * Checks whether a value is a `string`. * - * When to use: - * - You need to guard an `unknown` value as a string. - * - You want to narrow in `if` statements. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "string"`. + * Use when you need a `Predicate` guard to narrow an `unknown` value to a + * string. + * + * **Details** + * + * Uses `typeof input === "string"`. * * **Example** (Guard string) * @@ -240,8 +218,9 @@ export function isMap(input) { * } * ``` * - * See also: {@link isNumber}, {@link isBoolean}, {@link Refinement} - * + * @see {@link isNumber} + * @see {@link isBoolean} + * @see {@link Refinement} * @category guards * @since 2.0.0 */ @@ -251,13 +230,14 @@ export function isString(input) { /** * Checks whether a value is a `number`. * - * When to use: - * - You need to guard an `unknown` value as a number. + * **When to use** + * + * Use when you need a `Predicate` guard to narrow an `unknown` value to a + * number. * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "number"`. - * - Does not exclude `NaN` or `Infinity`. + * **Details** + * + * Uses `typeof input === "number"` and does not exclude `NaN` or `Infinity`. * * **Example** (Guard number) * @@ -271,8 +251,8 @@ export function isString(input) { * } * ``` * - * See also: {@link isBigInt}, {@link isString} - * + * @see {@link isBigInt} + * @see {@link isString} * @category guards * @since 2.0.0 */ @@ -282,12 +262,14 @@ export function isNumber(input) { /** * Checks whether a value is a `boolean`. * - * When to use: - * - You need to guard an `unknown` value as a boolean. + * **When to use** + * + * Use when you need a `Predicate` guard to narrow an `unknown` value to a + * boolean. * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "boolean"`. + * **Details** + * + * Uses `typeof input === "boolean"`. * * **Example** (Guard boolean) * @@ -301,8 +283,8 @@ export function isNumber(input) { * } * ``` * - * See also: {@link isString}, {@link isNumber} - * + * @see {@link isString} + * @see {@link isNumber} * @category guards * @since 2.0.0 */ @@ -312,12 +294,14 @@ export function isBoolean(input) { /** * Checks whether a value is a `bigint`. * - * When to use: - * - You need to guard an `unknown` value as a bigint. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "bigint"`. + * Use when you need a `Predicate` guard to narrow an `unknown` value to a + * bigint. + * + * **Details** + * + * Uses `typeof input === "bigint"`. * * **Example** (Guard bigint) * @@ -331,8 +315,7 @@ export function isBoolean(input) { * } * ``` * - * See also: {@link isNumber} - * + * @see {@link isNumber} * @category guards * @since 2.0.0 */ @@ -342,12 +325,14 @@ export function isBigInt(input) { /** * Checks whether a value is a `symbol`. * - * When to use: - * - You need to guard an `unknown` value as a symbol. + * **When to use** + * + * Use when you need a `Predicate` guard to narrow an `unknown` value to a + * symbol. * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "symbol"`. + * **Details** + * + * Uses `typeof input === "symbol"`. * * **Example** (Guard symbol) * @@ -361,8 +346,7 @@ export function isBigInt(input) { * } * ``` * - * See also: {@link isPropertyKey} - * + * @see {@link isPropertyKey} * @category guards * @since 2.0.0 */ @@ -372,12 +356,14 @@ export function isSymbol(input) { /** * Checks whether a value is a valid `PropertyKey` (string, number, or symbol). * - * When to use: - * - You need to guard unknown keys before indexing. + * **When to use** + * + * Use when you need a `Predicate` guard for unknown property keys before + * indexing. * - * Behavior: - * - Pure; does not mutate input. - * - Uses {@link isString}, {@link isNumber}, and {@link isSymbol}. + * **Details** + * + * Uses `isString`, `isNumber`, and `isSymbol`. * * **Example** (Guard property key) * @@ -392,8 +378,9 @@ export function isSymbol(input) { * } * ``` * - * See also: {@link isString}, {@link isNumber}, {@link isSymbol} - * + * @see {@link isString} + * @see {@link isNumber} + * @see {@link isSymbol} * @category guards * @since 4.0.0 */ @@ -403,12 +390,14 @@ export function isPropertyKey(u) { /** * Checks whether a value is a `function`. * - * When to use: - * - You need to guard an `unknown` value as callable. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "function"`. + * Use when you need a `Predicate` guard to narrow an `unknown` value to a + * callable function. + * + * **Details** + * + * Uses `typeof input === "function"`. * * **Example** (Guard function) * @@ -422,8 +411,7 @@ export function isPropertyKey(u) { * } * ``` * - * See also: {@link isObjectKeyword} - * + * @see {@link isObjectKeyword} * @category guards * @since 2.0.0 */ @@ -433,12 +421,14 @@ export function isFunction(input) { /** * Checks whether a value is `undefined`. * - * When to use: - * - You need a guard for optional values. + * **When to use** + * + * Use when you need a `Predicate` guard for values that are exactly + * `undefined`. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `input === undefined`. + * Uses `input === undefined`. * * **Example** (Guard undefined) * @@ -450,8 +440,8 @@ export function isFunction(input) { * console.log(Predicate.isUndefined(data)) * ``` * - * See also: {@link isNotUndefined}, {@link isNullish} - * + * @see {@link isNotUndefined} + * @see {@link isNullish} * @category guards * @since 2.0.0 */ @@ -461,12 +451,14 @@ export function isUndefined(input) { /** * Checks whether a value is not `undefined`. * - * When to use: - * - You want to filter out `undefined` while preserving other falsy values. + * **When to use** + * + * Use when you need a `Predicate` refinement that filters out `undefined` + * while preserving other falsy values. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Returns a refinement that excludes `undefined`. + * Returns a refinement that excludes `undefined`. * * **Example** (Filter undefined) * @@ -479,8 +471,8 @@ export function isUndefined(input) { * console.log(defined) * ``` * - * See also: {@link isUndefined}, {@link isNotNullish} - * + * @see {@link isUndefined} + * @see {@link isNotNullish} * @category guards * @since 2.0.0 */ @@ -490,12 +482,13 @@ export function isNotUndefined(input) { /** * Checks whether a value is `null`. * - * When to use: - * - You need a guard for nullable values. + * **When to use** + * + * Use when you need a `Predicate` guard for nullable values. * - * Behavior: - * - Pure; does not mutate input. - * - Uses `input === null`. + * **Details** + * + * Uses `input === null`. * * **Example** (Guard null) * @@ -507,8 +500,8 @@ export function isNotUndefined(input) { * console.log(Predicate.isNull(data)) * ``` * - * See also: {@link isNotNull}, {@link isNullish} - * + * @see {@link isNotNull} + * @see {@link isNullish} * @category guards * @since 2.0.0 */ @@ -518,12 +511,14 @@ export function isNull(input) { /** * Checks whether a value is not `null`. * - * When to use: - * - You want to filter out `null` while preserving other falsy values. + * **When to use** + * + * Use when you need a `Predicate` refinement that filters out `null` while + * preserving other falsy values. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Returns a refinement that excludes `null`. + * Returns a refinement that excludes `null`. * * **Example** (Filter null) * @@ -536,8 +531,8 @@ export function isNull(input) { * console.log(nonNull) * ``` * - * See also: {@link isNull}, {@link isNotNullish} - * + * @see {@link isNull} + * @see {@link isNotNullish} * @category guards * @since 2.0.0 */ @@ -547,12 +542,13 @@ export function isNotNull(input) { /** * Checks whether a value is `null` or `undefined`. * - * When to use: - * - You want to guard nullish values explicitly. + * **When to use** + * + * Use when you need a `Predicate` guard for nullish values. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `input === null || input === undefined`. + * Uses `input === null || input === undefined`. * * **Example** (Guard nullish) * @@ -565,8 +561,9 @@ export function isNotNull(input) { * console.log(nullish) * ``` * - * See also: {@link isNotNullish}, {@link isUndefined}, {@link isNull} - * + * @see {@link isNotNullish} + * @see {@link isUndefined} + * @see {@link isNull} * @category guards * @since 4.0.0 */ @@ -576,12 +573,14 @@ export function isNullish(input) { /** * Checks whether a value is not `null` and not `undefined`. * - * When to use: - * - You want to filter out nullish values but keep other falsy ones. + * **When to use** + * + * Use when you need a `Predicate` refinement that filters out nullish values + * but keeps other falsy ones. * - * Behavior: - * - Pure; does not mutate input. - * - Uses `input != null`. + * **Details** + * + * Uses `input != null`. * * **Example** (Filter non-nullish) * @@ -594,8 +593,9 @@ export function isNullish(input) { * console.log(present) * ``` * - * See also: {@link isNullish}, {@link isNotNull}, {@link isNotUndefined} - * + * @see {@link isNullish} + * @see {@link isNotNull} + * @see {@link isNotUndefined} * @category guards * @since 4.0.0 */ @@ -603,14 +603,11 @@ export function isNotNullish(input) { return input != null; } /** - * A guard that always returns `false`. + * Type guard that always returns `false`. * - * When to use: - * - You need a predicate that never accepts, e.g. in default branches. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Always returns `false`. + * Use when you need a `Predicate` that never accepts, e.g. in default branches. * * **Example** (Never matches) * @@ -620,8 +617,7 @@ export function isNotNullish(input) { * console.log(Predicate.isNever("anything")) * ``` * - * See also: {@link isUnknown} - * + * @see {@link isUnknown} * @category guards * @since 2.0.0 */ @@ -629,14 +625,11 @@ export function isNever(_) { return false; } /** - * A guard that always returns `true`. + * Type guard that always returns `true`. * - * When to use: - * - You need a predicate that always accepts, e.g. as a placeholder. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Always returns `true`. + * Use when you need a `Predicate` that always accepts, e.g. as a placeholder. * * **Example** (Always matches) * @@ -646,8 +639,7 @@ export function isNever(_) { * console.log(Predicate.isUnknown(123)) * ``` * - * See also: {@link isNever} - * + * @see {@link isNever} * @category guards * @since 2.0.0 */ @@ -657,13 +649,14 @@ export function isUnknown(_) { /** * Checks whether a value is an object or an array (non-null object). * - * When to use: - * - You want to accept plain objects and arrays, but not `null`. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "object" && input !== null`. - * - Includes arrays. + * Use when you need a `Predicate` guard that accepts plain objects and arrays, + * but not `null`. + * + * **Details** + * + * Uses `typeof input === "object" && input !== null` and includes arrays. * * **Example** (Object or array) * @@ -673,8 +666,8 @@ export function isUnknown(_) { * console.log(Predicate.isObjectOrArray([])) * ``` * - * See also: {@link isObject}, {@link isObjectKeyword} - * + * @see {@link isObject} + * @see {@link isObjectKeyword} * @category guards * @since 4.0.0 */ @@ -682,14 +675,18 @@ export function isObjectOrArray(input) { return typeof input === "object" && input !== null; } /** - * Checks whether a value is a plain object (not an array, not `null`). + * Checks whether a value is a non-null object value that is not an array. + * + * **When to use** + * + * Use to narrow unknown input to a non-null, non-array object with a + * `Predicate` guard. * - * When to use: - * - You need to accept objects but exclude arrays. + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `typeof input === "object" && input !== null && !Array.isArray(input)`. + * This is a structural runtime check using `typeof input === "object"`, so it + * also accepts object instances such as `Date`, `Map`, class instances, and + * typed arrays. It excludes `null` and arrays. * * **Example** (Guard object) * @@ -700,23 +697,28 @@ export function isObjectOrArray(input) { * console.log(Predicate.isObject([1, 2])) * ``` * - * See also: {@link isObjectOrArray}, {@link isReadonlyObject} - * + * @see {@link isObjectOrArray} + * @see {@link isReadonlyObject} * @category guards - * @since 4.0.0 + * @since 2.0.0 */ export function isObject(input) { return typeof input === "object" && input !== null && !Array.isArray(input); } /** - * Checks whether a value is a readonly object. + * Checks whether a value is a non-null, non-array object and narrows it to a + * readonly indexable object type. + * + * **When to use** * - * When to use: - * - You need a guard for object-like values and do not care about mutability. + * Use to narrow unknown input to a readonly view of a non-null, non-array + * object with a `Predicate` guard. * - * Behavior: - * - Pure; does not mutate input. - * - Delegates to {@link isObject}. + * **Details** + * + * Readonly-ness is a TypeScript type-level view; it is not observable at + * runtime. This delegates to `isObject`, so class instances and built-in object + * instances are accepted. * * **Example** (Readonly object) * @@ -728,8 +730,7 @@ export function isObject(input) { * console.log(Predicate.isReadonlyObject(data)) * ``` * - * See also: {@link isObject} - * + * @see {@link isObject} * @category guards * @since 4.0.0 */ @@ -739,12 +740,14 @@ export function isReadonlyObject(input) { /** * Checks whether a value is an `object` in the JavaScript sense (objects, arrays, functions). * - * When to use: - * - You want to accept arrays and functions as well as objects. + * **When to use** + * + * Use when you need a `Predicate` guard that accepts arrays and functions as + * well as objects. * - * Behavior: - * - Pure; does not mutate input. - * - Returns `true` for arrays and functions, `false` for `null`. + * **Details** + * + * Returns `true` for arrays and functions, and `false` for `null`. * * **Example** (Object keyword) * @@ -755,10 +758,10 @@ export function isReadonlyObject(input) { * console.log(Predicate.isObjectKeyword(null)) * ``` * - * See also: {@link isObject}, {@link isObjectOrArray} - * + * @see {@link isObject} + * @see {@link isObjectOrArray} * @category guards - * @since 2.0.0 + * @since 4.0.0 */ export function isObjectKeyword(input) { return typeof input === "object" && input !== null || isFunction(input); @@ -766,14 +769,15 @@ export function isObjectKeyword(input) { /** * Checks whether a value has a given property key. * - * When to use: - * - You need to guard property access on `unknown` values. - * - You want a simple structural guard for objects. + * **When to use** + * + * Use when you need a `Predicate` guard for property access on `unknown` + * values with a simple structural object check. * - * Behavior: - * - Pure; does not mutate input. - * - Uses the `in` operator and {@link isObjectKeyword}. - * - Does not check property value types. + * **Details** + * + * Uses the `in` operator and `isObjectKeyword`. This does not check property + * value types. * * **Example** (Guard property) * @@ -788,8 +792,8 @@ export function isObjectKeyword(input) { * } * ``` * - * See also: {@link isTagged}, {@link isObjectKeyword} - * + * @see {@link isTagged} + * @see {@link isObjectKeyword} * @category guards * @since 2.0.0 */ @@ -797,13 +801,14 @@ export const hasProperty = /*#__PURE__*/dual(2, (self, property) => isObjectKeyw /** * Checks whether a value has a `_tag` property equal to the given tag. * - * When to use: - * - You model tagged unions with a `_tag` field. - * - You want a quick, structural guard for tagged values. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Uses {@link hasProperty} and strict equality on `_tag`. + * Use when you model tagged unions with a `_tag` field and want a quick + * `Predicate` guard for tagged values. + * + * **Details** + * + * Uses `hasProperty` and strict equality on `_tag`. * * **Example** (Guard tagged) * @@ -815,8 +820,7 @@ export const hasProperty = /*#__PURE__*/dual(2, (self, property) => isObjectKeyw * console.log(isOk({ _tag: "Ok", value: 1 })) * ``` * - * See also: {@link hasProperty} - * + * @see {@link hasProperty} * @category guards * @since 2.0.0 */ @@ -824,12 +828,13 @@ export const isTagged = /*#__PURE__*/dual(2, (self, tag) => hasProperty(self, "_ /** * Checks whether a value is an `Error`. * - * When to use: - * - You need to guard errors caught from unknown sources. + * **When to use** + * + * Use when you need a `Predicate` guard for errors caught from unknown sources. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `instanceof Error`. + * Uses `instanceof Error`. * * **Example** (Guard error) * @@ -841,8 +846,7 @@ export const isTagged = /*#__PURE__*/dual(2, (self, tag) => hasProperty(self, "_ * console.log(Predicate.isError(data)) * ``` * - * See also: {@link isUnknown} - * + * @see {@link isUnknown} * @category guards * @since 2.0.0 */ @@ -852,12 +856,13 @@ export function isError(input) { /** * Checks whether a value is a `Uint8Array`. * - * When to use: - * - You need to guard binary data at runtime. + * **When to use** + * + * Use when you need a `Predicate` runtime guard for binary data. * - * Behavior: - * - Pure; does not mutate input. - * - Uses `instanceof Uint8Array`. + * **Details** + * + * Uses `instanceof Uint8Array`. * * **Example** (Guard Uint8Array) * @@ -869,8 +874,8 @@ export function isError(input) { * console.log(Predicate.isUint8Array(data)) * ``` * - * See also: {@link isIterable}, {@link isSet} - * + * @see {@link isIterable} + * @see {@link isSet} * @category guards * @since 2.0.0 */ @@ -880,12 +885,13 @@ export function isUint8Array(input) { /** * Checks whether a value is a `Date`. * - * When to use: - * - You need to guard dates at runtime. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `instanceof Date`. + * Use when you need a `Predicate` runtime guard for dates. + * + * **Details** + * + * Uses `instanceof Date`. * * **Example** (Guard Date) * @@ -897,8 +903,7 @@ export function isUint8Array(input) { * console.log(Predicate.isDate(data)) * ``` * - * See also: {@link isRegExp} - * + * @see {@link isRegExp} * @category guards * @since 2.0.0 */ @@ -908,13 +913,13 @@ export function isDate(input) { /** * Checks whether a value is iterable. * - * When to use: - * - You need a guard before iterating an unknown value. + * **When to use** + * + * Use when you need a `Predicate` guard before iterating an unknown value. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Accepts strings as iterable. - * - Uses {@link hasProperty} for `Symbol.iterator`. + * Accepts strings as iterable and uses `hasProperty` for `Symbol.iterator`. * * **Example** (Guard iterable) * @@ -926,8 +931,8 @@ export function isDate(input) { * console.log(Predicate.isIterable(data)) * ``` * - * See also: {@link isSet}, {@link isMap} - * + * @see {@link isSet} + * @see {@link isMap} * @category guards * @since 2.0.0 */ @@ -937,12 +942,13 @@ export function isIterable(input) { /** * Checks whether a value is a `Promise`-like object with `then` and `catch`. * - * When to use: - * - You need to detect promise instances across realms. + * **When to use** + * + * Use when you need a `Predicate` guard for promise instances across realms. * - * Behavior: - * - Pure; does not mutate input. - * - Structural check for `then` and `catch` functions. + * **Details** + * + * Performs a structural check for `then` and `catch` functions. * * **Example** (Guard promise) * @@ -954,8 +960,7 @@ export function isIterable(input) { * console.log(Predicate.isPromise(data)) * ``` * - * See also: {@link isPromiseLike} - * + * @see {@link isPromiseLike} * @category guards * @since 2.0.0 */ @@ -965,12 +970,14 @@ export function isPromise(input) { /** * Checks whether a value is `PromiseLike` (has a `then` method). * - * When to use: - * - You only need `then` to interop with promise-like values. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Structural check for a callable `then`. + * Use when you need a `Predicate` guard for promise-like values with a + * callable `then` method. + * + * **Details** + * + * Performs a structural check for a callable `then`. * * **Example** (Guard promise-like) * @@ -982,8 +989,7 @@ export function isPromise(input) { * console.log(Predicate.isPromiseLike(data)) * ``` * - * See also: {@link isPromise} - * + * @see {@link isPromise} * @category guards * @since 2.0.0 */ @@ -993,12 +999,13 @@ export function isPromiseLike(input) { /** * Checks whether a value is a `RegExp`. * - * When to use: - * - You need a runtime guard for regular expressions. + * **When to use** + * + * Use when you need a `Predicate` runtime guard for regular expressions. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Uses `instanceof RegExp`. + * Uses `instanceof RegExp`. * * **Example** (Guard RegExp) * @@ -1010,8 +1017,7 @@ export function isPromiseLike(input) { * console.log(Predicate.isRegExp(data)) * ``` * - * See also: {@link isDate} - * + * @see {@link isDate} * @category guards * @since 3.9.0 */ @@ -1021,14 +1027,15 @@ export function isRegExp(input) { /** * Composes two predicates or refinements into one. * - * When to use: - * - You want to chain two refinements for progressive narrowing. - * - You want a predicate that applies two checks in sequence. + * **When to use** + * + * Use when you want to compose two `Predicate` checks in sequence, especially + * when chaining refinements for progressive narrowing. * - * Behavior: - * - Pure; does not mutate input. - * - For refinements, the output type is narrowed by both. - * - Short-circuits on the first `false`. + * **Details** + * + * For refinements, the output type is narrowed by both checks. Evaluation + * short-circuits on the first `false`. * * **Example** (Compose refinements) * @@ -1043,8 +1050,8 @@ export function isRegExp(input) { * console.log(isIntegerNumber(1)) * ``` * - * See also: {@link and}, {@link Refinement} - * + * @see {@link and} + * @see {@link Refinement} * @category combinators * @since 2.0.0 */ @@ -1052,14 +1059,15 @@ export const compose = /*#__PURE__*/dual(2, (ab, bc) => a => ab(a) && bc(a)); /** * Creates a predicate for tuples by applying predicates to each element. * - * When to use: - * - You want to validate tuple positions independently. - * - You want to lift element predicates into a tuple predicate. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Returns a refinement if any element predicate is a refinement. - * - Stops at the first failing element. + * Use when you want to validate tuple positions independently by lifting + * element predicates into a tuple predicate. + * + * **Details** + * + * Returns a refinement if any element predicate is a refinement. Evaluation + * stops at the first failing element. * * **Example** (Tuple predicate) * @@ -1071,8 +1079,8 @@ export const compose = /*#__PURE__*/dual(2, (ab, bc) => a => ab(a) && bc(a)); * console.log(tupleCheck([1, "ok"])) * ``` * - * See also: {@link Struct}, {@link isTupleOf} - * + * @see {@link Struct} + * @see {@link isTupleOf} * @category combinators * @since 4.0.0 */ @@ -1089,14 +1097,15 @@ export function Tuple(elements) { /** * Creates a predicate for objects by applying predicates to named properties. * - * When to use: - * - You want to validate a record shape at runtime. - * - You want to lift property predicates into an object predicate. + * **When to use** + * + * Use when you want to validate a record shape at runtime by lifting property + * predicates into an object predicate. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Returns a refinement if any field predicate is a refinement. - * - Checks only the specified keys; extra keys are ignored. + * Returns a refinement if any field predicate is a refinement. Only the + * specified keys are checked, and extra keys are ignored. * * **Example** (Struct predicate) * @@ -1111,8 +1120,8 @@ export function Tuple(elements) { * console.log(userCheck({ id: 1, name: "Ada" })) * ``` * - * See also: {@link Tuple}, {@link hasProperty} - * + * @see {@link Tuple} + * @see {@link hasProperty} * @category combinators * @since 4.0.0 */ @@ -1130,12 +1139,13 @@ export function Struct(fields) { /** * Negates a predicate. * - * When to use: - * - You want the inverse of an existing predicate. + * **When to use** + * + * Use when you want the inverse of an existing predicate. * - * Behavior: - * - Pure; does not mutate input. - * - Returns a new predicate that flips the boolean result. + * **Details** + * + * Returns a new predicate that flips the boolean result. * * **Example** (Negate) * @@ -1147,8 +1157,9 @@ export function Struct(fields) { * console.log(isNotString(1)) * ``` * - * See also: {@link and}, {@link or}, {@link xor} - * + * @see {@link and} + * @see {@link or} + * @see {@link xor} * @category combinators * @since 2.0.0 */ @@ -1158,14 +1169,15 @@ export function not(self) { /** * Creates a predicate that returns `true` if either predicate is `true`. * - * When to use: - * - You want to accept values that satisfy at least one condition. - * - You want to combine refinements with union narrowing. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `true`. - * - For refinements, the output type is a union. + * Use when you want to combine `Predicate`s with OR, accepting values that + * satisfy at least one condition, including refinements that narrow to a union. + * + * **Details** + * + * Evaluation short-circuits on the first `true`. For refinements, the output + * type is a union. * * **Example** (Either condition) * @@ -1177,8 +1189,8 @@ export function not(self) { * console.log(isStringOrNumber("a")) * ``` * - * See also: {@link and}, {@link xor} - * + * @see {@link and} + * @see {@link xor} * @category combinators * @since 2.0.0 */ @@ -1186,14 +1198,16 @@ export const or = /*#__PURE__*/dual(2, (self, that) => a => self(a) || that(a)); /** * Creates a predicate that returns `true` only if both predicates are `true`. * - * When to use: - * - You want to accept values that satisfy multiple conditions. - * - You want to combine refinements with intersection narrowing. + * **When to use** + * + * Use when you want to combine `Predicate`s with AND, accepting values that + * satisfy multiple conditions, including refinements that narrow to an + * intersection. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `false`. - * - For refinements, the output type is an intersection. + * Evaluation short-circuits on the first `false`. For refinements, the output + * type is an intersection. * * **Example** (Both conditions) * @@ -1213,8 +1227,8 @@ export const or = /*#__PURE__*/dual(2, (self, that) => a => self(a) || that(a)); * } * ``` * - * See also: {@link or}, {@link not} - * + * @see {@link or} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -1222,12 +1236,13 @@ export const and = /*#__PURE__*/dual(2, (self, that) => a => self(a) && that(a)) /** * Creates a predicate that returns `true` if exactly one predicate is `true`. * - * When to use: - * - You want an exclusive-or between two conditions. + * **When to use** + * + * Use when you want to combine two `Predicate`s with exclusive-or semantics. * - * Behavior: - * - Pure; does not mutate input. - * - Returns `true` when results differ. + * **Details** + * + * Returns `true` when results differ. * * **Example** (Exclusive or) * @@ -1241,8 +1256,8 @@ export const and = /*#__PURE__*/dual(2, (self, that) => a => self(a) && that(a)) * console.log(either(-2)) * ``` * - * See also: {@link or}, {@link and} - * + * @see {@link or} + * @see {@link and} * @category combinators * @since 2.0.0 */ @@ -1250,12 +1265,13 @@ export const xor = /*#__PURE__*/dual(2, (self, that) => a => self(a) !== that(a) /** * Creates a predicate that returns `true` when both predicates agree. * - * When to use: - * - You want to check equivalence of two predicates. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Returns `true` when both results are equal. + * Use when you want to check equivalence of two `Predicate`s. + * + * **Details** + * + * Returns `true` when both results are equal. * * **Example** (Equivalence) * @@ -1268,8 +1284,7 @@ export const xor = /*#__PURE__*/dual(2, (self, that) => a => self(a) !== that(a) * console.log(same(3)) * ``` * - * See also: {@link xor} - * + * @see {@link xor} * @category combinators * @since 2.0.0 */ @@ -1277,13 +1292,15 @@ export const eqv = /*#__PURE__*/dual(2, (self, that) => a => self(a) === that(a) /** * Creates a predicate representing logical implication: if `antecedent`, then `consequent`. * - * When to use: - * - You want a rule that only applies when a precondition holds. - * - You model constraints like "if A then B". + * **When to use** + * + * Use when you need to encode logical implication between `Predicate` rules, + * where one rule only applies when a precondition holds. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Returns `true` when the antecedent is `false`. + * Models constraints like "if A then B" and returns `true` when the antecedent + * is `false`. * * **Example** (Implication) * @@ -1297,8 +1314,8 @@ export const eqv = /*#__PURE__*/dual(2, (self, that) => a => self(a) === that(a) * console.log(implies(16)) * ``` * - * See also: {@link and}, {@link or} - * + * @see {@link and} + * @see {@link or} * @category combinators * @since 2.0.0 */ @@ -1306,12 +1323,13 @@ export const implies = /*#__PURE__*/dual(2, (antecedent, consequent) => a => ant /** * Creates a predicate that returns `true` when neither predicate is `true`. * - * When to use: - * - You want the logical NOR of two conditions. + * **When to use** + * + * Use when you want to combine two `Predicate`s with logical NOR semantics. * - * Behavior: - * - Pure; does not mutate input. - * - Returns the negation of {@link or}. + * **Details** + * + * Returns the negation of `or`. * * **Example** (NOR) * @@ -1323,8 +1341,8 @@ export const implies = /*#__PURE__*/dual(2, (antecedent, consequent) => a => ant * console.log(neither(true)) * ``` * - * See also: {@link or}, {@link not} - * + * @see {@link or} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -1332,12 +1350,13 @@ export const nor = /*#__PURE__*/dual(2, (self, that) => a => !(self(a) || that(a /** * Creates a predicate that returns `true` unless both predicates are `true`. * - * When to use: - * - You want the logical NAND of two conditions. + * **When to use** * - * Behavior: - * - Pure; does not mutate input. - * - Returns the negation of {@link and}. + * Use when you want to combine two `Predicate`s with logical NAND semantics. + * + * **Details** + * + * Returns the negation of `and`. * * **Example** (NAND) * @@ -1349,8 +1368,8 @@ export const nor = /*#__PURE__*/dual(2, (self, that) => a => !(self(a) || that(a * console.log(notBoth("a")) * ``` * - * See also: {@link and}, {@link not} - * + * @see {@link and} + * @see {@link not} * @category combinators * @since 2.0.0 */ @@ -1358,13 +1377,14 @@ export const nand = /*#__PURE__*/dual(2, (self, that) => a => !(self(a) && that( /** * Creates a predicate that returns `true` if all predicates in the collection return `true`. * - * When to use: - * - You have a dynamic list of predicates to apply. + * **When to use** + * + * Use when you have a dynamic list of predicates to apply. + * + * **Details** * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `false`. - * - Iterates the collection each time the predicate is called. + * Evaluation short-circuits on the first `false`. The collection is iterated + * each time the predicate is called. * * **Example** (All checks) * @@ -1376,8 +1396,8 @@ export const nand = /*#__PURE__*/dual(2, (self, that) => a => !(self(a) && that( * console.log(allChecks(2)) * ``` * - * See also: {@link some}, {@link and} - * + * @see {@link some} + * @see {@link and} * @category elements * @since 2.0.0 */ @@ -1394,13 +1414,14 @@ export function every(collection) { /** * Creates a predicate that returns `true` if any predicate in the collection returns `true`. * - * When to use: - * - You have a dynamic list of predicates and only need one to pass. + * **When to use** + * + * Use when you have a dynamic list of predicates and only need one to pass. * - * Behavior: - * - Pure; does not mutate input. - * - Short-circuits on the first `true`. - * - Iterates the collection each time the predicate is called. + * **Details** + * + * Evaluation short-circuits on the first `true`. The collection is iterated + * each time the predicate is called. * * **Example** (Any check) * @@ -1412,8 +1433,8 @@ export function every(collection) { * console.log(anyCheck("ok")) * ``` * - * See also: {@link every}, {@link or} - * + * @see {@link every} + * @see {@link or} * @category elements * @since 2.0.0 */ diff --git a/.opencode/node_modules/effect/dist/Predicate.js.map b/.opencode/node_modules/effect/dist/Predicate.js.map index e0d1f44d8b326ca37a4e0018201745a9fdb655a0..de30f0c1ca1e23ce682c03980b6961555425e9da 100644 --- a/.opencode/node_modules/effect/dist/Predicate.js.map +++ b/.opencode/node_modules/effect/dist/Predicate.js.map @@ -1 +1 @@ -{"version":3,"file":"Predicate.js","names":["dual","mapInput","self","f","b","isTupleOf","n","length","isTupleOfAtLeast","isTruthy","input","isSet","Set","isMap","Map","isString","isNumber","isBoolean","isBigInt","isSymbol","isPropertyKey","u","isFunction","isUndefined","undefined","isNotUndefined","isNull","isNotNull","isNullish","isNotNullish","isNever","_","isUnknown","isObjectOrArray","isObject","Array","isArray","isReadonlyObject","isObjectKeyword","hasProperty","property","isTagged","tag","isError","Error","isUint8Array","Uint8Array","isDate","Date","isIterable","Symbol","iterator","isPromise","then","catch","isPromiseLike","isRegExp","RegExp","compose","ab","bc","a","Tuple","elements","as","i","Struct","fields","keys","Object","key","not","or","that","and","xor","eqv","implies","antecedent","consequent","nor","nand","every","collection","p","some"],"sources":["../src/Predicate.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAASA,IAAI,QAAQ,eAAe;AA2RpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,OAAO,MAAMC,QAAQ,gBA6DjBD,IAAI,CAAC,CAAC,EAAE,CAAOE,IAAkB,EAAEC,CAAc,KAAoBC,CAAC,IAAKF,IAAI,CAACC,CAAC,CAACC,CAAC,CAAC,CAAC,CAAC;AAE1F;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,MAAMC,SAAS,gBAyDlBL,IAAI,CAAC,CAAC,EAAE,CAAsBE,IAAsB,EAAEI,CAAI,KAA4BJ,IAAI,CAACK,MAAM,KAAKD,CAAC,CAAC;AAE5G;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,MAAME,gBAAgB,gBAyDzBR,IAAI,CAAC,CAAC,EAAE,CAAsBE,IAAsB,EAAEI,CAAI,KAAmCJ,IAAI,CAACK,MAAM,IAAID,CAAC,CAAC;AAElH;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAM,SAAUG,QAAQA,CAACC,KAAc;EACrC,OAAO,CAAC,CAACA,KAAK;AAChB;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAM,SAAUC,KAAKA,CAACD,KAAc;EAClC,OAAOA,KAAK,YAAYE,GAAG;AAC7B;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAM,SAAUC,KAAKA,CAACH,KAAc;EAClC,OAAOA,KAAK,YAAYI,GAAG;AAC7B;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAM,SAAUC,QAAQA,CAACL,KAAc;EACrC,OAAO,OAA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mB,GAAG,gBAqDZhF,IAAI,CACN,CAAC,EACD,CAAIE,IAAkB,EAAEuE,IAAkB,KAAoBZ,CAAC,IAAK,EAAE3D,IAAI,CAAC2D,CAAC,CAAC,IAAIY,IAAI,CAACZ,CAAC,CAAC,CAAC,CAC1F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMoB,IAAI,gBAqDbjF,IAAI,CACN,CAAC,EACD,CAAIE,IAAkB,EAAEuE,IAAkB,KAAoBZ,CAAC,IAAK,EAAE3D,IAAI,CAAC2D,CAAC,CAAC,IAAIY,IAAI,CAACZ,CAAC,CAAC,CAAC,CAC1F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAM,SAAUqB,KAAKA,CAAIC,UAAkC;EACzD,OAAQtB,CAAC,IAAI;IACX,KAAK,MAAMuB,CAAC,IAAID,UAAU,EAAE;MAC1B,IAAI,CAACC,CAAC,CAACvB,CAAC,CAAC,EAAE;QACT,OAAO,KAAK;MACd;IACF;IACA,OAAO,IAAI;EACb,CAAC;AACH;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAM,SAAUwB,IAAIA,CAAIF,UAAkC;EACxD,OAAQtB,CAAC,IAAI;IACX,KAAK,MAAMuB,CAAC,IAAID,UAAU,EAAE;MAC1B,IAAIC,CAAC,CAACvB,CAAC,CAAC,EAAE;QACR,OAAO,IAAI;MACb;IACF;IACA,OAAO,KAAK;EACd,CAAC;AACH","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Predicate.js","names":["dual","mapInput","self","f","b","isTupleOf","n","length","isTupleOfAtLeast","isTruthy","input","isSet","Set","isMap","Map","isString","isNumber","isBoolean","isBigInt","isSymbol","isPropertyKey","u","isFunction","isUndefined","undefined","isNotUndefined","isNull","isNotNull","isNullish","isNotNullish","isNever","_","isUnknown","isObjectOrArray","isObject","Array","isArray","isReadonlyObject","isObjectKeyword","hasProperty","property","isTagged","tag","isError","Error","isUint8Array","Uint8Array","isDate","Date","isIterable","Symbol","iterator","isPromise","then","catch","isPromiseLike","isRegExp","RegExp","compose","ab","bc","a","Tuple","elements","as","i","Struct","fields","keys","Object","key","not","or","that","and","xor","eqv","implies","antecedent","consequent","nor","nand","every","collection","p","some"],"sources":["../src/Predicate.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAWA,SAASA,IAAI,QAAQ,eAAe;AA0SpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,MAAMC,QAAQ,gBAiEjBD,IAAI,CAAC,CAAC,EAAE,CAAOE,IAAkB,EAAEC,CAAc,KAAoBC,CAAC,IAAKF,IAAI,CAACC,CAAC,CAACC,CAAC,CAAC,CAAC,CAAC;AAE1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAO,MAAMC,SAAS,gBA2DlBL,IAAI,CAAC,CAAC,EAAE,CAAsBE,IAAsB,EAAEI,CAAI,KAA4BJ,IAAI,CAACK,MAAM,KAAKD,CAAC,CAAC;AAE5G;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAO,MAAME,gBAAgB,gBA2DzBR,IAAI,CAAC,CAAC,EAAE,CAAsBE,IAAsB,EAAEI,CAAI,KAAmCJ,IAAI,CAACK,MAAM,IAAID,CAAC,CAAC;AAElH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,OAAM,SAAUG,QAAQA,CAACC,KAAc;EACrC,OAAO,CAAC,CAACA,KAAK;AAChB;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAM,SAAUC,KAAKA,CAACD,KAAc;EAClC,OAAOA,KAAK,YAAYE,GAAG;AAC7B;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAM,SAAUC,KAAKA,CAACH,KAAc;EAClC,OAAOA,KAAK,YAAYI,GAAG;AAC7B;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAM,SAAUC,QAAQA,CAACL,K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G,IAAI,CACrH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAMmB,GAAG,gBAuDZhF,IAAI,CACN,CAAC,EACD,CAAIE,IAAkB,EAAEuE,IAAkB,KAAoBZ,CAAC,IAAK,EAAE3D,IAAI,CAAC2D,CAAC,CAAC,IAAIY,IAAI,CAACZ,CAAC,CAAC,CAAC,CAC1F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAMoB,IAAI,gBAuDbjF,IAAI,CACN,CAAC,EACD,CAAIE,IAAkB,EAAEuE,IAAkB,KAAoBZ,CAAC,IAAK,EAAE3D,IAAI,CAAC2D,CAAC,CAAC,IAAIY,IAAI,CAACZ,CAAC,CAAC,CAAC,CAC1F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAM,SAAUqB,KAAKA,CAAIC,UAAkC;EACzD,OAAQtB,CAAC,IAAI;IACX,KAAK,MAAMuB,CAAC,IAAID,UAAU,EAAE;MAC1B,IAAI,CAACC,CAAC,CAACvB,CAAC,CAAC,EAAE;QACT,OAAO,KAAK;MACd;IACF;IACA,OAAO,IAAI;EACb,CAAC;AACH;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAM,SAAUwB,IAAIA,CAAIF,UAAkC;EACxD,OAAQtB,CAAC,IAAI;IACX,KAAK,MAAMuB,CAAC,IAAID,UAAU,EAAE;MAC1B,IAAIC,CAAC,CAACvB,CAAC,CAAC,EAAE;QACR,OAAO,IAAI;MACb;IACF;IACA,OAAO,KAAK;EACd,CAAC;AACH","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/PrimaryKey.d.ts b/.opencode/node_modules/effect/dist/PrimaryKey.d.ts index ab0da5f530b90ab7d958fd824a8cdc5ee6952bfa..1a31abf996b4a384b9669ca017e4c5c652512be9 100644 --- a/.opencode/node_modules/effect/dist/PrimaryKey.d.ts +++ b/.opencode/node_modules/effect/dist/PrimaryKey.d.ts @@ -1,27 +1,42 @@ /** - * This module provides functionality for working with primary keys. - * A `PrimaryKey` is a simple interface that represents a unique identifier - * that can be converted to a string representation. - * - * Primary keys are useful for creating unique identifiers for objects, - * database records, cache keys, or any scenario where you need a - * string-based unique identifier. + * The `PrimaryKey` module defines a small protocol for values that can expose + * a stable, string-based identifier. A value participates by implementing a + * method at {@link symbol}; consumers can check unknown values with + * {@link isPrimaryKey} and read the key with {@link value}. * * @since 2.0.0 */ /** - * The unique identifier used to identify objects that implement the `PrimaryKey` interface. + * Defines the unique identifier used to identify objects that implement the `PrimaryKey` interface. + * + * **When to use** + * + * Use to implement the `PrimaryKey` protocol as a computed property key on + * classes or object literals that expose a stable string identifier. * + * @see {@link PrimaryKey} for the protocol interface that declares the method keyed by this symbol + * @see {@link value} for reading the string key from a `PrimaryKey` value + * @see {@link isPrimaryKey} for checking whether an unknown value carries this method + * + * @category symbols * @since 2.0.0 */ export declare const symbol = "~effect/interfaces/PrimaryKey"; /** * An interface for objects that can provide a string-based primary key. * + * **When to use** + * + * Use to define values that expose a stable string identifier for equality, + * hashing, caching, or persistence. + * + * **Details** + * * Objects implementing this interface must provide a method that returns * a unique string identifier. * - * @example + * **Example** (Implementing a primary key) + * * ```ts * import { PrimaryKey } from "effect" * @@ -44,14 +59,37 @@ export interface PrimaryKey { [symbol](): string; } /** + * Checks whether a value implements the `PrimaryKey` protocol. + * + * **When to use** + * + * Use to narrow an unknown value before treating it as a `PrimaryKey`. + * + * **Details** + * + * This is a structural guard for the `PrimaryKey.symbol` property. + * + * **Gotchas** + * + * This guard does not call the method or verify that it returns a string. + * + * @see {@link PrimaryKey} for the protocol being checked + * @see {@link value} for extracting the string value after narrowing + * * @category models - * @since 2.0.0 + * @since 4.0.0 */ export declare const isPrimaryKey: (u: unknown) => u is PrimaryKey; /** * Extracts the string value from a `PrimaryKey`. * - * @example + * **When to use** + * + * Use to read the stable string identifier from a value that implements + * `PrimaryKey`. + * + * **Example** (Reading primary key values) + * * ```ts * import { PrimaryKey } from "effect" * diff --git a/.opencode/node_modules/effect/dist/PrimaryKey.d.ts.map b/.opencode/node_modules/effect/dist/PrimaryKey.d.ts.map index 8ee9853ac49a7a2f8f936c98baeec541b57a84d1..a37e6e365aa900b4dc89ceaf284f3ebd5f780f7d 100644 --- a/.opencode/node_modules/effect/dist/PrimaryKey.d.ts.map +++ b/.opencode/node_modules/effect/dist/PrimaryKey.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"PrimaryKey.d.ts","sourceRoot":"","sources":["../src/PrimaryKey.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH;;;;GAIG;AACH,eAAO,MAAM,MAAM,kCAAkC,CAAA;AAErD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,MAAM,CAAC,IAAI,MAAM,CAAA;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,UAAoC,CAAA;AAEnF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,KAAK,GAAI,MAAM,UAAU,KAAG,MAAwB,CAAA"} \ No newline at end of file +{"version":3,"file":"PrimaryKey.d.ts","sourceRoot":"","sources":["../src/PrimaryKey.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,MAAM,kCAAkC,CAAA;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,MAAM,CAAC,IAAI,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,UAAoC,CAAA;AAEnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,KAAK,GAAI,MAAM,UAAU,KAAG,MAAwB,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/PrimaryKey.js b/.opencode/node_modules/effect/dist/PrimaryKey.js index bec2a8056eceb780fd891076448cd9310a6df0ce..ce19258ffaa28d1f0a9b77d243d626444a361c7c 100644 --- a/.opencode/node_modules/effect/dist/PrimaryKey.js +++ b/.opencode/node_modules/effect/dist/PrimaryKey.js @@ -1,30 +1,60 @@ /** - * This module provides functionality for working with primary keys. - * A `PrimaryKey` is a simple interface that represents a unique identifier - * that can be converted to a string representation. - * - * Primary keys are useful for creating unique identifiers for objects, - * database records, cache keys, or any scenario where you need a - * string-based unique identifier. + * The `PrimaryKey` module defines a small protocol for values that can expose + * a stable, string-based identifier. A value participates by implementing a + * method at {@link symbol}; consumers can check unknown values with + * {@link isPrimaryKey} and read the key with {@link value}. * * @since 2.0.0 */ import { hasProperty } from "./Predicate.js"; /** - * The unique identifier used to identify objects that implement the `PrimaryKey` interface. + * Defines the unique identifier used to identify objects that implement the `PrimaryKey` interface. + * + * **When to use** + * + * Use to implement the `PrimaryKey` protocol as a computed property key on + * classes or object literals that expose a stable string identifier. + * + * @see {@link PrimaryKey} for the protocol interface that declares the method keyed by this symbol + * @see {@link value} for reading the string key from a `PrimaryKey` value + * @see {@link isPrimaryKey} for checking whether an unknown value carries this method * + * @category symbols * @since 2.0.0 */ export const symbol = "~effect/interfaces/PrimaryKey"; /** + * Checks whether a value implements the `PrimaryKey` protocol. + * + * **When to use** + * + * Use to narrow an unknown value before treating it as a `PrimaryKey`. + * + * **Details** + * + * This is a structural guard for the `PrimaryKey.symbol` property. + * + * **Gotchas** + * + * This guard does not call the method or verify that it returns a string. + * + * @see {@link PrimaryKey} for the protocol being checked + * @see {@link value} for extracting the string value after narrowing + * * @category models - * @since 2.0.0 + * @since 4.0.0 */ export const isPrimaryKey = u => hasProperty(u, symbol); /** * Extracts the string value from a `PrimaryKey`. * - * @example + * **When to use** + * + * Use to read the stable string identifier from a value that implements + * `PrimaryKey`. + * + * **Example** (Reading primary key values) + * * ```ts * import { PrimaryKey } from "effect" * diff --git a/.opencode/node_modules/effect/dist/PrimaryKey.js.map b/.opencode/node_modules/effect/dist/PrimaryKey.js.map index c8dd0567fe11c3421d69edd1ff6c0e4385830774..ef37338a2e37d129e3dcc1f2bdc3365c1ff56813 100644 --- a/.opencode/node_modules/effect/dist/PrimaryKey.js.map +++ b/.opencode/node_modules/effect/dist/PrimaryKey.js.map @@ -1 +1 @@ -{"version":3,"file":"PrimaryKey.js","names":["hasProperty","symbol","isPrimaryKey","u","value","self"],"sources":["../src/PrimaryKey.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAYA,SAASA,WAAW,QAAQ,gBAAgB;AAE5C;;;;;AAKA,OAAO,MAAMC,MAAM,GAAG,+BAA+B;AA+BrD;;;;AAIA,OAAO,MAAMC,YAAY,GAAIC,CAAU,IAAsBH,WAAW,CAACG,CAAC,EAAEF,MAAM,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAO,MAAMG,KAAK,GAAIC,IAAgB,IAAaA,IAAI,CAACJ,MAAM,CAAC,EAAE","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"PrimaryKey.js","names":["hasProperty","symbol","isPrimaryKey","u","value","self"],"sources":["../src/PrimaryKey.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;AASA,SAASA,WAAW,QAAQ,gBAAgB;AAE5C;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,MAAM,GAAG,+BAA+B;AAuCrD;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAMC,YAAY,GAAIC,CAAU,IAAsBH,WAAW,CAACG,CAAC,EAAEF,MAAM,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,OAAO,MAAMG,KAAK,GAAIC,IAAgB,IAAaA,IAAI,CAACJ,MAAM,CAAC,EAAE","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/PubSub.d.ts b/.opencode/node_modules/effect/dist/PubSub.d.ts index ea26324407cfaeaaaf3665759b2f83a6ce4fd9a2..0e8ee36d2034f557afb7e24e202c3348f3e524d9 100644 --- a/.opencode/node_modules/effect/dist/PubSub.d.ts +++ b/.opencode/node_modules/effect/dist/PubSub.d.ts @@ -1,30 +1,12 @@ /** - * This module provides utilities for working with publish-subscribe (PubSub) systems. + * Broadcasts values from publishers to many subscribers. * - * A PubSub is an asynchronous message hub where publishers can publish messages and subscribers - * can subscribe to receive those messages. PubSub supports various backpressure strategies, - * message replay, and concurrent access from multiple producers and consumers. - * - * @example - * ```ts - * import { Effect, PubSub } from "effect" - * - * const program = Effect.gen(function*() { - * const pubsub = yield* PubSub.bounded(10) - * - * // Publisher - * yield* PubSub.publish(pubsub, "Hello") - * yield* PubSub.publish(pubsub, "World") - * - * // Subscriber - * yield* Effect.scoped(Effect.gen(function*() { - * const subscription = yield* PubSub.subscribe(pubsub) - * const message1 = yield* PubSub.take(subscription) - * const message2 = yield* PubSub.take(subscription) - * console.log(message1, message2) // "Hello", "World" - * })) - * }) - * ``` + * Publishers add messages with `publish` or `publishAll`, and each active + * `Subscription` receives its own copy of every accepted message. Unlike a + * queue, subscribers do not compete for messages. This module includes bounded, + * dropping, sliding, and unbounded hubs, optional replay buffers for late + * subscribers, message-taking helpers, capacity and shutdown operations, and + * low-level types for custom hub strategies. * * @since 2.0.0 */ @@ -45,22 +27,23 @@ declare const TypeId = "~effect/PubSub"; * messages of type `A` and subscribers can subscribe to take messages of type * `A`. * - * @example + * **Example** (Publishing and subscribing to messages) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create a bounded PubSub with capacity 10 * const pubsub = yield* PubSub.bounded(10) * - * // Publish messages - * yield* PubSub.publish(pubsub, "Hello") - * yield* PubSub.publish(pubsub, "World") - * * // Subscribe and consume messages * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Publish messages + * yield* PubSub.publish(pubsub, "Hello") + * yield* PubSub.publish(pubsub, "World") + * * const message1 = yield* PubSub.take(subscription) * const message2 = yield* PubSub.take(subscription) * console.log(message1, message2) // "Hello", "World" @@ -68,8 +51,8 @@ declare const TypeId = "~effect/PubSub"; * }) * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface PubSub extends Pipeable { readonly [TypeId]: { @@ -83,15 +66,18 @@ export interface PubSub extends Pipeable { readonly strategy: PubSub.Strategy; } /** + * Companion namespace containing the low-level building blocks used by + * `PubSub`, including atomic implementations, backing subscriptions, replay + * windows, and delivery strategies. + * * @since 2.0.0 - * @category models */ export declare namespace PubSub { /** * Low-level atomic PubSub interface that handles the core message storage and retrieval. * - * @since 4.0.0 * @category models + * @since 4.0.0 */ interface Atomic { readonly capacity: number; @@ -107,8 +93,8 @@ export declare namespace PubSub { /** * Low-level subscription interface that handles message polling for individual subscribers. * - * @since 4.0.0 * @category models + * @since 4.0.0 */ interface BackingSubscription { isEmpty(): boolean; @@ -118,17 +104,23 @@ export declare namespace PubSub { unsubscribe(): void; } /** - * Internal type representing the mapping from subscriptions to their pollers. + * Tracks the pollers currently waiting on each backing subscription. + * + * **Details** + * + * This type is part of the low-level `PubSub.Strategy` contract. Most + * application code should use `subscribe`, `take`, and the other `PubSub` + * operations instead of manipulating subscriber maps directly. * - * @since 4.0.0 * @category models + * @since 4.0.0 */ type Subscribers = Map, Set>>>; /** * Interface for accessing replay buffer contents for late subscribers. * - * @since 4.0.0 * @category models + * @since 4.0.0 */ interface ReplayWindow { take(): A | undefined; @@ -139,8 +131,8 @@ export declare namespace PubSub { /** * Strategy interface defining how PubSub handles backpressure and message distribution. * - * @since 4.0.0 * @category models + * @since 4.0.0 */ interface Strategy { /** @@ -174,10 +166,10 @@ declare const SubscriptionTypeId = "~effect/PubSub/Subscription"; /** * A subscription represents a consumer's connection to a PubSub, allowing them to take messages. * - * @example + * **Example** (Taking messages from a subscription) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -188,18 +180,23 @@ declare const SubscriptionTypeId = "~effect/PubSub/Subscription"; * pubsub * ) * + * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3"]) + * * // Take individual messages * const message = yield* PubSub.take(subscription) + * console.log(message) // "msg1" * * // Take multiple messages - * const messages = yield* PubSub.takeUpTo(subscription, 5) + * const messages = yield* PubSub.takeUpTo(subscription, 1) + * console.log(messages) // ["msg2"] * const allMessages = yield* PubSub.takeAll(subscription) + * console.log(allMessages) // ["msg3"] * })) * }) * ``` * - * @since 4.0.0 * @category models + * @since 4.0.0 */ export interface Subscription extends Pipeable { readonly [SubscriptionTypeId]: { @@ -217,10 +214,10 @@ export interface Subscription extends Pipeable { /** * Creates a PubSub with a custom atomic implementation and strategy. * - * @example + * **Example** (Creating a PubSub with a custom strategy) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create custom PubSub with specific atomic implementation and strategy @@ -234,28 +231,28 @@ export interface Subscription extends Pipeable { * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export declare const make: (options: { readonly atomicPubSub: LazyArg>; readonly strategy: LazyArg>; }) => Effect.Effect>; /** - * Creates a bounded PubSub with backpressure strategy. + * Creates a bounded `PubSub` that applies backpressure when it reaches + * capacity. + * + * **Details** * - * The PubSub will retain messages until they have been taken by all subscribers. - * When the PubSub reaches capacity, publishers will be suspended until space becomes available. - * This ensures message delivery guarantees but may slow down fast publishers. + * Published messages are retained until all current subscribers have taken + * them. When the capacity is full, publishers suspend until space is available. + * Pass an options object to configure both `capacity` and an optional replay + * buffer for late subscribers. * - * @param capacity - The maximum number of messages the PubSub can hold, or an options object - * with capacity and optional replay buffer size - * @returns An Effect that creates a bounded PubSub + * **Example** (Creating a bounded PubSub) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create bounded PubSub with capacity 100 @@ -269,8 +266,8 @@ export declare const make: (options: { * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const bounded: (capacity: number | { readonly capacity: number; @@ -280,12 +277,14 @@ export declare const bounded: (capacity: number | { * Creates a bounded `PubSub` with the dropping strategy. The `PubSub` will drop new * messages if the `PubSub` is at capacity. * + * **Details** + * * For best performance use capacities that are powers of two. * - * @example + * **Example** (Dropping messages when full) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create dropping PubSub that drops new messages when full @@ -297,17 +296,24 @@ export declare const bounded: (capacity: number | { * replay: 5 * }) * - * // Fill the PubSub and see dropping behavior - * yield* PubSub.publish(pubsub, "msg1") // succeeds - * yield* PubSub.publish(pubsub, "msg2") // succeeds - * yield* PubSub.publish(pubsub, "msg3") // succeeds - * const dropped = yield* PubSub.publish(pubsub, "msg4") // returns false (dropped) - * console.log("Message dropped:", !dropped) + * yield* Effect.scoped(Effect.gen(function*() { + * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Fill the PubSub and see dropping behavior + * yield* PubSub.publish(pubsub, "msg1") // succeeds + * yield* PubSub.publish(pubsub, "msg2") // succeeds + * yield* PubSub.publish(pubsub, "msg3") // succeeds + * const dropped = yield* PubSub.publish(pubsub, "msg4") // returns false (dropped) + * console.log("Message dropped:", !dropped) // true + * + * const messages = yield* PubSub.takeAll(subscription) + * console.log(messages) // ["msg1", "msg2", "msg3"] + * })) * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const dropping: (capacity: number | { readonly capacity: number; @@ -317,12 +323,14 @@ export declare const dropping: (capacity: number | { * Creates a bounded `PubSub` with the sliding strategy. The `PubSub` will add new * messages and drop old messages if the `PubSub` is at capacity. * + * **Details** + * * For best performance use capacities that are powers of two. * - * @example + * **Example** (Sliding old messages when full) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create sliding PubSub that evicts old messages when full @@ -334,22 +342,23 @@ export declare const dropping: (capacity: number | { * replay: 2 * }) * - * // Fill and overflow the PubSub - * yield* PubSub.publish(pubsub, "msg1") - * yield* PubSub.publish(pubsub, "msg2") - * yield* PubSub.publish(pubsub, "msg3") - * yield* PubSub.publish(pubsub, "msg4") // "msg1" is evicted - * * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Fill and overflow the PubSub + * yield* PubSub.publish(pubsub, "msg1") + * yield* PubSub.publish(pubsub, "msg2") + * yield* PubSub.publish(pubsub, "msg3") + * yield* PubSub.publish(pubsub, "msg4") // "msg1" is evicted + * * const messages = yield* PubSub.takeAll(subscription) * console.log(messages) // ["msg2", "msg3", "msg4"] * })) * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const sliding: (capacity: number | { readonly capacity: number; @@ -358,10 +367,10 @@ export declare const sliding: (capacity: number | { /** * Creates an unbounded `PubSub`. * - * @example + * **Example** (Creating an unbounded PubSub) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create unbounded PubSub @@ -372,21 +381,22 @@ export declare const sliding: (capacity: number | { * replay: 10 * }) * - * // Can publish unlimited messages - * for (let i = 0; i < 1000; i++) { - * yield* PubSub.publish(pubsub, `message-${i}`) - * } - * * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Can publish unlimited messages + * for (let i = 0; i < 3; i++) { + * yield* PubSub.publish(pubsub, `message-${i}`) + * } + * * const message = yield* PubSub.take(subscription) - * console.log("First message:", message) + * console.log("First message:", message) // "message-0" * })) * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const unbounded: (options?: { readonly replay?: number | undefined; @@ -394,8 +404,30 @@ export declare const unbounded: (options?: { /** * Creates a bounded atomic PubSub implementation with optional replay buffer. * - * @since 4.0.0 + * **When to use** + * + * Use to provide bounded message storage when building a custom `PubSub` with + * `make` and an explicit delivery strategy. + * + * **Details** + * + * Pass either a capacity number or an options object with `capacity` and + * optional `replay`. A positive `replay` value enables a replay buffer for late + * subscribers, and fractional replay sizes are rounded up. + * + * **Gotchas** + * + * The capacity must be greater than zero; invalid capacities throw + * synchronously before an atomic implementation is created. + * + * @see {@link make} for constructing a `PubSub` from an atomic implementation and delivery strategy + * @see {@link makeAtomicUnbounded} for an atomic implementation without a bounded capacity + * @see {@link bounded} for the higher-level backpressure constructor + * @see {@link dropping} for the higher-level dropping constructor + * @see {@link sliding} for the higher-level sliding constructor + * * @category constructors + * @since 4.0.0 */ export declare const makeAtomicBounded: (capacity: number | { readonly capacity: number; @@ -404,8 +436,22 @@ export declare const makeAtomicBounded: (capacity: number | { /** * Creates an unbounded atomic PubSub implementation with optional replay buffer. * - * @since 4.0.0 + * **When to use** + * + * Use to create the low-level storage layer for a custom `PubSub` whose active + * subscribers may retain an unbounded number of pending messages. + * + * **Gotchas** + * + * Messages published while subscribers are active can be retained without a + * capacity limit until those subscribers take them or unsubscribe. + * + * @see {@link makeAtomicBounded} for a bounded atomic implementation that enforces capacity + * @see {@link make} for wrapping an atomic implementation with a delivery strategy + * @see {@link unbounded} for the high-level effectful constructor for unbounded `PubSub` values + * * @category constructors + * @since 4.0.0 */ export declare const makeAtomicUnbounded: (options?: { readonly replay?: number | undefined; @@ -413,10 +459,10 @@ export declare const makeAtomicUnbounded: (options?: { /** * Returns the number of elements the queue can hold. * - * @example + * **Example** (Getting PubSub capacity) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(100) @@ -429,19 +475,23 @@ export declare const makeAtomicUnbounded: (options?: { * }) * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export declare const capacity: (self: PubSub) => number; /** - * Retrieves the size of the queue, which is equal to the number of elements - * in the queue. This may be negative if fibers are suspended waiting for - * elements to be added to the queue. + * Returns the current number of messages retained by the `PubSub` for active + * subscribers. + * + * **Details** + * + * If the `PubSub` has been shut down, the returned effect succeeds with `0`. + * The size is not a count of waiting subscribers or suspended publishers. + * + * **Example** (Getting PubSub size) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -450,25 +500,41 @@ export declare const capacity: (self: PubSub) => number; * const initialSize = yield* PubSub.size(pubsub) * console.log("Initial size:", initialSize) // 0 * - * // Publish some messages - * yield* PubSub.publish(pubsub, "msg1") - * yield* PubSub.publish(pubsub, "msg2") + * yield* Effect.scoped(Effect.gen(function*() { + * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Publish some messages for the active subscription + * yield* PubSub.publish(pubsub, "msg1") + * yield* PubSub.publish(pubsub, "msg2") + * + * const afterPublish = yield* PubSub.size(pubsub) + * console.log("After publishing:", afterPublish) // 2 * - * const afterPublish = yield* PubSub.size(pubsub) - * console.log("After publishing:", afterPublish) // 2 + * yield* PubSub.takeAll(subscription) + * })) * }) * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export declare const size: (self: PubSub) => Effect.Effect; /** - * Retrieves the size of the queue, which is equal to the number of elements - * in the queue. This may be negative if fibers are suspended waiting for - * elements to be added to the queue. + * Returns the current number of messages retained by the `PubSub` for active + * subscribers synchronously. + * + * **When to use** + * + * Use when an immediate `PubSub` size snapshot is needed outside effectful code + * and concurrent changes between the check and later use are acceptable. + * + * **Details** + * + * Returns `0` after shutdown. Because this is an unsafe synchronous snapshot, + * prefer `size` in effectful code. + * + * **Example** (Reading size synchronously) * - * @example * ```ts * import { PubSub } from "effect" * @@ -479,18 +545,21 @@ export declare const size: (self: PubSub) => Effect.Effect; * console.log("Current size:", size) * ``` * - * @since 2.0.0 * @category getters + * @since 4.0.0 */ export declare const sizeUnsafe: (self: PubSub) => number; /** - * Returns `true` if the `PubSub` contains at least one element, `false` - * otherwise. + * Returns `true` when the `PubSub` has reached its configured capacity. + * + * **Details** + * + * For unbounded PubSubs this is normally `false`. + * + * **Example** (Checking whether a PubSub is full) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(2) @@ -499,26 +568,32 @@ export declare const sizeUnsafe: (self: PubSub) => number; * const initiallyFull = yield* PubSub.isFull(pubsub) * console.log("Initially full:", initiallyFull) // false * - * // Fill the PubSub - * yield* PubSub.publish(pubsub, "msg1") - * yield* PubSub.publish(pubsub, "msg2") + * yield* Effect.scoped(Effect.gen(function*() { + * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Fill the PubSub for the active subscription + * yield* PubSub.publish(pubsub, "msg1") + * yield* PubSub.publish(pubsub, "msg2") + * + * const nowFull = yield* PubSub.isFull(pubsub) + * console.log("Now full:", nowFull) // true * - * const nowFull = yield* PubSub.isFull(pubsub) - * console.log("Now full:", nowFull) // true + * yield* PubSub.takeAll(subscription) + * })) * }) * ``` * - * @since 2.0.0 * @category predicates + * @since 2.0.0 */ export declare const isFull: (self: PubSub) => Effect.Effect; /** * Returns `true` if the `Pubsub` contains zero elements, `false` otherwise. * - * @example + * **Example** (Checking whether a PubSub is empty) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -527,57 +602,66 @@ export declare const isFull: (self: PubSub) => Effect.Effect; * const initiallyEmpty = yield* PubSub.isEmpty(pubsub) * console.log("Initially empty:", initiallyEmpty) // true * - * // Publish a message - * yield* PubSub.publish(pubsub, "Hello") + * yield* Effect.scoped(Effect.gen(function*() { + * const subscription = yield* PubSub.subscribe(pubsub) * - * const nowEmpty = yield* PubSub.isEmpty(pubsub) - * console.log("Now empty:", nowEmpty) // false + * // Publish a message for the active subscription + * yield* PubSub.publish(pubsub, "Hello") + * + * const nowEmpty = yield* PubSub.isEmpty(pubsub) + * console.log("Now empty:", nowEmpty) // false + * + * yield* PubSub.take(subscription) + * })) * }) * ``` * - * @since 2.0.0 * @category predicates + * @since 2.0.0 */ export declare const isEmpty: (self: PubSub) => Effect.Effect; /** - * Interrupts any fibers that are suspended on `offer` or `take`. Future calls - * to `offer*` and `take*` will be interrupted immediately. + * Shuts down the `PubSub`, interrupting suspended publishers and subscribers + * and finalizing active subscriptions. + * + * **Details** + * + * After shutdown, `publish` and `publishAll` succeed with `false`, + * `publishUnsafe` returns `false`, and subscription operations such as `take` + * interrupt. + * + * **Example** (Shutting down a PubSub) * - * @example * ```ts - * import { Effect, Fiber, PubSub } from "effect" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(1) * - * // Start a fiber that will be suspended waiting to publish - * const publisherFiber = yield* Effect.forkChild( - * Effect.gen(function*() { - * yield* PubSub.publish(pubsub, "msg1") // fills the buffer - * yield* PubSub.publish(pubsub, "msg2") // will suspend here - * }) - * ) - * * // Shutdown the PubSub * yield* PubSub.shutdown(pubsub) * - * // The suspended publisher will be interrupted - * const result = yield* Fiber.await(publisherFiber) - * console.log("Publisher interrupted:", result._tag === "Failure") + * const isShutdown = yield* PubSub.isShutdown(pubsub) + * console.log("Is shutdown:", isShutdown) // true + * + * // Publishing after shutdown returns false + * const published = yield* PubSub.publish(pubsub, "msg1") + * console.log("Published after shutdown:", published) // false * }) * ``` * - * @since 2.0.0 * @category lifecycle + * @since 2.0.0 */ export declare const shutdown: (self: PubSub) => Effect.Effect; /** - * Returns `true` if `shutdown` has been called, otherwise returns `false`. + * Checks effectfully whether `shutdown` has been called, returning `true` + * after shutdown and `false` otherwise. + * + * **Example** (Checking whether a PubSub is shutdown) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -594,14 +678,21 @@ export declare const shutdown: (self: PubSub) => Effect.Effect; * }) * ``` * - * @since 2.0.0 * @category predicates + * @since 2.0.0 */ export declare const isShutdown: (self: PubSub) => Effect.Effect; /** - * Returns `true` if `shutdown` has been called, otherwise returns `false`. + * Checks synchronously whether `shutdown` has been called, returning `true` + * after shutdown and `false` otherwise. + * + * **When to use** + * + * Use when an immediate `PubSub` shutdown-state snapshot is needed outside + * effectful code and racing shutdown changes are acceptable. + * + * **Example** (Checking shutdown synchronously) * - * @example * ```ts * import { PubSub } from "effect" * @@ -616,8 +707,8 @@ export declare const isShutdown: (self: PubSub) => Effect.Effect; * } * ``` * - * @since 4.0.0 * @category predicates + * @since 4.0.0 */ export declare const isShutdownUnsafe: (self: PubSub) => boolean; /** @@ -625,7 +716,8 @@ export declare const isShutdownUnsafe: (self: PubSub) => boolean; * not resume until the queue has been shutdown. If the queue is already * shutdown, the `Effect` will resume right away. * - * @example + * **Example** (Waiting for shutdown) + * * ```ts * import { Effect, Fiber, PubSub } from "effect" * @@ -651,18 +743,29 @@ export declare const isShutdownUnsafe: (self: PubSub) => boolean; * }) * ``` * - * @since 2.0.0 * @category lifecycle + * @since 2.0.0 */ export declare const awaitShutdown: (self: PubSub) => Effect.Effect; /** - * Publishes a message to the `PubSub`, returning whether the message was published - * to the `PubSub`. + * Publishes a message to the `PubSub` as an `Effect`, returning whether the + * message was accepted. + * + * **When to use** + * + * Use when you need to publish from effectful code and let the configured + * PubSub strategy handle surplus messages. + * + * **Details** + * + * The effect succeeds with `false` if the `PubSub` is shut down. If the message + * cannot be accepted immediately, the configured strategy decides how surplus + * messages are handled. + * + * **Example** (Publishing a message) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -671,35 +774,41 @@ export declare const awaitShutdown: (self: PubSub) => Effect.Effect; * const published = yield* PubSub.publish(pubsub, "Hello World") * console.log("Message published:", published) // true * - * // With a full bounded PubSub using backpressure strategy - * const smallPubsub = yield* PubSub.bounded(1) - * yield* PubSub.publish(smallPubsub, "msg1") // succeeds - * - * // This will suspend until space becomes available - * const publishEffect = PubSub.publish(smallPubsub, "msg2") - * - * // Create a subscriber to free up space * yield* Effect.scoped(Effect.gen(function*() { - * const subscription = yield* PubSub.subscribe(smallPubsub) - * yield* PubSub.take(subscription) // frees space - * const result = yield* publishEffect - * console.log("Second message published:", result) // true + * const subscription = yield* PubSub.subscribe(pubsub) + * + * yield* PubSub.publish(pubsub, "Hello") + * const message = yield* PubSub.take(subscription) + * console.log("Received:", message) // "Hello" * })) * }) * ``` * - * @since 2.0.0 + * @see {@link publishUnsafe} for a synchronous non-blocking attempt that does not run effectful surplus handling + * * @category publishing + * @since 2.0.0 */ export declare const publish: { /** - * Publishes a message to the `PubSub`, returning whether the message was published - * to the `PubSub`. + * Publishes a message to the `PubSub` as an `Effect`, returning whether the + * message was accepted. + * + * **When to use** + * + * Use when you need to publish from effectful code and let the configured + * PubSub strategy handle surplus messages. + * + * **Details** + * + * The effect succeeds with `false` if the `PubSub` is shut down. If the message + * cannot be accepted immediately, the configured strategy decides how surplus + * messages are handled. + * + * **Example** (Publishing a message) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -708,35 +817,41 @@ export declare const publish: { * const published = yield* PubSub.publish(pubsub, "Hello World") * console.log("Message published:", published) // true * - * // With a full bounded PubSub using backpressure strategy - * const smallPubsub = yield* PubSub.bounded(1) - * yield* PubSub.publish(smallPubsub, "msg1") // succeeds - * - * // This will suspend until space becomes available - * const publishEffect = PubSub.publish(smallPubsub, "msg2") - * - * // Create a subscriber to free up space * yield* Effect.scoped(Effect.gen(function*() { - * const subscription = yield* PubSub.subscribe(smallPubsub) - * yield* PubSub.take(subscription) // frees space - * const result = yield* publishEffect - * console.log("Second message published:", result) // true + * const subscription = yield* PubSub.subscribe(pubsub) + * + * yield* PubSub.publish(pubsub, "Hello") + * const message = yield* PubSub.take(subscription) + * console.log("Received:", message) // "Hello" * })) * }) * ``` * - * @since 2.0.0 + * @see {@link publishUnsafe} for a synchronous non-blocking attempt that does not run effectful surplus handling + * * @category publishing + * @since 2.0.0 */ (value: A): (self: PubSub) => Effect.Effect; /** - * Publishes a message to the `PubSub`, returning whether the message was published - * to the `PubSub`. + * Publishes a message to the `PubSub` as an `Effect`, returning whether the + * message was accepted. + * + * **When to use** + * + * Use when you need to publish from effectful code and let the configured + * PubSub strategy handle surplus messages. + * + * **Details** + * + * The effect succeeds with `false` if the `PubSub` is shut down. If the message + * cannot be accepted immediately, the configured strategy decides how surplus + * messages are handled. + * + * **Example** (Publishing a message) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -745,33 +860,40 @@ export declare const publish: { * const published = yield* PubSub.publish(pubsub, "Hello World") * console.log("Message published:", published) // true * - * // With a full bounded PubSub using backpressure strategy - * const smallPubsub = yield* PubSub.bounded(1) - * yield* PubSub.publish(smallPubsub, "msg1") // succeeds - * - * // This will suspend until space becomes available - * const publishEffect = PubSub.publish(smallPubsub, "msg2") - * - * // Create a subscriber to free up space * yield* Effect.scoped(Effect.gen(function*() { - * const subscription = yield* PubSub.subscribe(smallPubsub) - * yield* PubSub.take(subscription) // frees space - * const result = yield* publishEffect - * console.log("Second message published:", result) // true + * const subscription = yield* PubSub.subscribe(pubsub) + * + * yield* PubSub.publish(pubsub, "Hello") + * const message = yield* PubSub.take(subscription) + * console.log("Received:", message) // "Hello" * })) * }) * ``` * - * @since 2.0.0 + * @see {@link publishUnsafe} for a synchronous non-blocking attempt that does not run effectful surplus handling + * * @category publishing + * @since 2.0.0 */ (self: PubSub, value: A): Effect.Effect; }; /** - * Publishes a message to the `PubSub`, returning whether the message was published - * to the `PubSub`. + * Attempts to publish a message synchronously without applying the PubSub + * strategy's effectful surplus handling. + * + * **When to use** + * + * Use when you need a non-blocking synchronous publish attempt where `false` + * is an acceptable result when the message cannot be accepted immediately. + * + * **Details** + * + * Returns `false` if the `PubSub` is shut down or the message cannot be + * accepted immediately, for example when a bounded PubSub is full. Prefer + * `publish` when backpressure or sliding behavior should be honored. + * + * **Example** (Publishing without suspending) * - * @example * ```ts * import { PubSub } from "effect" * @@ -792,15 +914,29 @@ export declare const publish: { * console.log(`Published ${publishedCount} out of ${messages.length} messages`) * ``` * - * @since 4.0.0 + * @see {@link publish} for effectful publishing that honors the configured surplus strategy + * * @category publishing + * @since 4.0.0 */ export declare const publishUnsafe: { /** - * Publishes a message to the `PubSub`, returning whether the message was published - * to the `PubSub`. + * Attempts to publish a message synchronously without applying the PubSub + * strategy's effectful surplus handling. + * + * **When to use** + * + * Use when you need a non-blocking synchronous publish attempt where `false` + * is an acceptable result when the message cannot be accepted immediately. + * + * **Details** + * + * Returns `false` if the `PubSub` is shut down or the message cannot be + * accepted immediately, for example when a bounded PubSub is full. Prefer + * `publish` when backpressure or sliding behavior should be honored. + * + * **Example** (Publishing without suspending) * - * @example * ```ts * import { PubSub } from "effect" * @@ -821,15 +957,29 @@ export declare const publishUnsafe: { * console.log(`Published ${publishedCount} out of ${messages.length} messages`) * ``` * - * @since 4.0.0 + * @see {@link publish} for effectful publishing that honors the configured surplus strategy + * * @category publishing + * @since 4.0.0 */ (value: A): (self: PubSub) => boolean; /** - * Publishes a message to the `PubSub`, returning whether the message was published - * to the `PubSub`. + * Attempts to publish a message synchronously without applying the PubSub + * strategy's effectful surplus handling. + * + * **When to use** + * + * Use when you need a non-blocking synchronous publish attempt where `false` + * is an acceptable result when the message cannot be accepted immediately. + * + * **Details** + * + * Returns `false` if the `PubSub` is shut down or the message cannot be + * accepted immediately, for example when a bounded PubSub is full. Prefer + * `publish` when backpressure or sliding behavior should be honored. + * + * **Example** (Publishing without suspending) * - * @example * ```ts * import { PubSub } from "effect" * @@ -850,8 +1000,10 @@ export declare const publishUnsafe: { * console.log(`Published ${publishedCount} out of ${messages.length} messages`) * ``` * - * @since 4.0.0 + * @see {@link publish} for effectful publishing that honors the configured surplus strategy + * * @category publishing + * @since 4.0.0 */ (self: PubSub, value: A): boolean; }; @@ -859,10 +1011,10 @@ export declare const publishUnsafe: { * Publishes all of the specified messages to the `PubSub`, returning whether they * were published to the `PubSub`. * - * @example + * **Example** (Publishing multiple messages) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, Fiber, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -872,35 +1024,40 @@ export declare const publishUnsafe: { * const allPublished = yield* PubSub.publishAll(pubsub, messages) * console.log("All messages published:", allPublished) // true * - * // With a smaller capacity + * // With a smaller capacity and an active subscription * const smallPubsub = yield* PubSub.bounded(2) * const manyMessages = ["msg1", "msg2", "msg3", "msg4"] * - * // Will suspend until space becomes available for all messages - * const publishAllEffect = PubSub.publishAll(smallPubsub, manyMessages) - * - * // Subscribe to consume messages and free space * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(smallPubsub) - * yield* PubSub.takeAll(subscription) // consume all messages - * const result = yield* publishAllEffect - * console.log("All messages eventually published:", result) + * + * // Will suspend until space becomes available for all messages + * const fiber = yield* Effect.forkChild(PubSub.publishAll(smallPubsub, manyMessages)) + * + * const firstBatch = yield* PubSub.takeBetween(subscription, 2, 2) + * console.log("First batch:", firstBatch) // ["msg1", "msg2"] + * + * const result = yield* Fiber.join(fiber) + * console.log("All messages eventually published:", result) // true + * + * const secondBatch = yield* PubSub.takeAll(subscription) + * console.log("Second batch:", secondBatch) // ["msg3", "msg4"] * })) * }) * ``` * - * @since 2.0.0 * @category publishing + * @since 2.0.0 */ export declare const publishAll: { /** * Publishes all of the specified messages to the `PubSub`, returning whether they * were published to the `PubSub`. * - * @example + * **Example** (Publishing multiple messages) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, Fiber, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -910,35 +1067,40 @@ export declare const publishAll: { * const allPublished = yield* PubSub.publishAll(pubsub, messages) * console.log("All messages published:", allPublished) // true * - * // With a smaller capacity + * // With a smaller capacity and an active subscription * const smallPubsub = yield* PubSub.bounded(2) * const manyMessages = ["msg1", "msg2", "msg3", "msg4"] * - * // Will suspend until space becomes available for all messages - * const publishAllEffect = PubSub.publishAll(smallPubsub, manyMessages) - * - * // Subscribe to consume messages and free space * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(smallPubsub) - * yield* PubSub.takeAll(subscription) // consume all messages - * const result = yield* publishAllEffect - * console.log("All messages eventually published:", result) + * + * // Will suspend until space becomes available for all messages + * const fiber = yield* Effect.forkChild(PubSub.publishAll(smallPubsub, manyMessages)) + * + * const firstBatch = yield* PubSub.takeBetween(subscription, 2, 2) + * console.log("First batch:", firstBatch) // ["msg1", "msg2"] + * + * const result = yield* Fiber.join(fiber) + * console.log("All messages eventually published:", result) // true + * + * const secondBatch = yield* PubSub.takeAll(subscription) + * console.log("Second batch:", secondBatch) // ["msg3", "msg4"] * })) * }) * ``` * - * @since 2.0.0 * @category publishing + * @since 2.0.0 */ (elements: Iterable): (self: PubSub) => Effect.Effect; /** * Publishes all of the specified messages to the `PubSub`, returning whether they * were published to the `PubSub`. * - * @example + * **Example** (Publishing multiple messages) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, Fiber, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -948,25 +1110,30 @@ export declare const publishAll: { * const allPublished = yield* PubSub.publishAll(pubsub, messages) * console.log("All messages published:", allPublished) // true * - * // With a smaller capacity + * // With a smaller capacity and an active subscription * const smallPubsub = yield* PubSub.bounded(2) * const manyMessages = ["msg1", "msg2", "msg3", "msg4"] * - * // Will suspend until space becomes available for all messages - * const publishAllEffect = PubSub.publishAll(smallPubsub, manyMessages) - * - * // Subscribe to consume messages and free space * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(smallPubsub) - * yield* PubSub.takeAll(subscription) // consume all messages - * const result = yield* publishAllEffect - * console.log("All messages eventually published:", result) + * + * // Will suspend until space becomes available for all messages + * const fiber = yield* Effect.forkChild(PubSub.publishAll(smallPubsub, manyMessages)) + * + * const firstBatch = yield* PubSub.takeBetween(subscription, 2, 2) + * console.log("First batch:", firstBatch) // ["msg1", "msg2"] + * + * const result = yield* Fiber.join(fiber) + * console.log("All messages eventually published:", result) // true + * + * const secondBatch = yield* PubSub.takeAll(subscription) + * console.log("Second batch:", secondBatch) // ["msg3", "msg4"] * })) * }) * ``` * - * @since 2.0.0 * @category publishing + * @since 2.0.0 */ (self: PubSub, elements: Iterable): Effect.Effect; }; @@ -975,21 +1142,22 @@ export declare const publishAll: { * be evaluated multiple times within the scope to take a message from the `PubSub` * each time. * - * @example + * **Example** (Subscribing to messages) + * * ```ts * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) * - * // Publish some messages - * yield* PubSub.publish(pubsub, "Hello") - * yield* PubSub.publish(pubsub, "World") - * * // Subscribe within a scope for automatic cleanup * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) * + * // Publish some messages + * yield* PubSub.publish(pubsub, "Hello") + * yield* PubSub.publish(pubsub, "World") + * * // Take messages one by one * const msg1 = yield* PubSub.take(subscription) * const msg2 = yield* PubSub.take(subscription) @@ -998,13 +1166,13 @@ export declare const publishAll: { * // Subscription is automatically cleaned up when scope exits * })) * - * // Multiple subscribers can receive the same messages - * yield* PubSub.publish(pubsub, "Broadcast") - * * yield* Effect.scoped(Effect.gen(function*() { * const sub1 = yield* PubSub.subscribe(pubsub) * const sub2 = yield* PubSub.subscribe(pubsub) * + * // Multiple subscribers can receive the same messages + * yield* PubSub.publish(pubsub, "Broadcast") + * * const [msg1, msg2] = yield* Effect.all([ * PubSub.take(sub1), * PubSub.take(sub2) @@ -1014,15 +1182,16 @@ export declare const publishAll: { * }) * ``` * + * @category subscriptions * @since 2.0.0 - * @category subscription */ export declare const subscribe: (self: PubSub) => Effect.Effect, never, Scope.Scope>; /** * Takes a single message from the subscription. If no messages are available, * this will suspend until a message becomes available. * - * @example + * **Example** (Taking a message) + * * ```ts * import { Effect, Fiber, PubSub } from "effect" * @@ -1047,27 +1216,28 @@ export declare const subscribe: (self: PubSub) => Effect.Effect(self: Subscription) => Effect.Effect; /** * Takes all available messages from the subscription, suspending if no items * are available. * - * @example + * **Example** (Taking all available messages) + * * ```ts * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) * - * // Publish multiple messages - * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3"]) - * * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) * + * // Publish multiple messages + * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3"]) + * * // Take all available messages at once * const allMessages = yield* PubSub.takeAll(subscription) * console.log("All messages:", allMessages) // ["msg1", "msg2", "msg3"] @@ -1075,27 +1245,27 @@ export declare const take: (self: Subscription) => Effect.Effect; * }) * ``` * + * @category subscriptions * @since 4.0.0 - * @category subscription */ export declare const takeAll: (self: Subscription) => Effect.Effect>; /** * Takes up to the specified number of messages from the subscription without suspending. * - * @example + * **Example** (Taking up to a maximum number of messages) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) * - * // Publish multiple messages - * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3", "msg4", "msg5"]) - * * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) * + * // Publish multiple messages + * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3", "msg4", "msg5"]) + * * // Take up to 3 messages * const upTo3 = yield* PubSub.takeUpTo(subscription, 3) * console.log("Up to 3:", upTo3) // ["msg1", "msg2", "msg3"] @@ -1111,27 +1281,27 @@ export declare const takeAll: (self: Subscription) => Effect.Effect(10) * - * // Publish multiple messages - * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3", "msg4", "msg5"]) - * * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) * + * // Publish multiple messages + * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3", "msg4", "msg5"]) + * * // Take up to 3 messages * const upTo3 = yield* PubSub.takeUpTo(subscription, 3) * console.log("Up to 3:", upTo3) // ["msg1", "msg2", "msg3"] @@ -1147,27 +1317,27 @@ export declare const takeUpTo: { * }) * ``` * + * @category subscriptions * @since 4.0.0 - * @category subscription */ (max: number): (self: Subscription) => Effect.Effect>; /** * Takes up to the specified number of messages from the subscription without suspending. * - * @example + * **Example** (Taking up to a maximum number of messages) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) * - * // Publish multiple messages - * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3", "msg4", "msg5"]) - * * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) * + * // Publish multiple messages + * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3", "msg4", "msg5"]) + * * // Take up to 3 messages * const upTo3 = yield* PubSub.takeUpTo(subscription, 3) * console.log("Up to 3:", upTo3) // ["msg1", "msg2", "msg3"] @@ -1183,8 +1353,8 @@ export declare const takeUpTo: { * }) * ``` * + * @category subscriptions * @since 4.0.0 - * @category subscription */ (self: Subscription, max: number): Effect.Effect>; }; @@ -1192,7 +1362,8 @@ export declare const takeUpTo: { * Takes between the specified minimum and maximum number of messages from the subscription. * Will suspend if the minimum number is not immediately available. * - * @example + * **Example** (Taking between a minimum and maximum) + * * ```ts * import { Effect, Fiber, PubSub } from "effect" * @@ -1217,15 +1388,16 @@ export declare const takeUpTo: { * }) * ``` * + * @category subscriptions * @since 4.0.0 - * @category subscription */ export declare const takeBetween: { /** * Takes between the specified minimum and maximum number of messages from the subscription. * Will suspend if the minimum number is not immediately available. * - * @example + * **Example** (Taking between a minimum and maximum) + * * ```ts * import { Effect, Fiber, PubSub } from "effect" * @@ -1250,15 +1422,16 @@ export declare const takeBetween: { * }) * ``` * + * @category subscriptions * @since 4.0.0 - * @category subscription */ (min: number, max: number): (self: Subscription) => Effect.Effect>; /** * Takes between the specified minimum and maximum number of messages from the subscription. * Will suspend if the minimum number is not immediately available. * - * @example + * **Example** (Taking between a minimum and maximum) + * * ```ts * import { Effect, Fiber, PubSub } from "effect" * @@ -1283,28 +1456,39 @@ export declare const takeBetween: { * }) * ``` * + * @category subscriptions * @since 4.0.0 - * @category subscription */ (self: Subscription, min: number, max: number): Effect.Effect>; }; /** - * Returns the number of messages currently available in the subscription. + * Returns the number of messages currently available in the subscription as an + * `Effect`. + * + * **When to use** + * + * Use when checking a subscription from effectful code and shutdown should + * interrupt the effect. + * + * **Details** + * + * The count includes replay-buffered messages. If the subscription has been + * shut down, the effect interrupts. + * + * **Example** (Checking remaining messages) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) * - * // Publish some messages - * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3"]) - * * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) * + * // Publish some messages + * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3"]) + * * // Check how many messages are available * const count = yield* PubSub.remaining(subscription) * console.log("Messages available:", count) // 3 @@ -1318,14 +1502,23 @@ export declare const takeBetween: { * }) * ``` * - * @since 4.0.0 + * @see {@link remainingUnsafe} for a synchronous check that reports shutdown as `Option.none()` + * * @category getters + * @since 4.0.0 */ export declare const remaining: (self: Subscription) => Effect.Effect; /** - * Returns the number of messages currently available in the subscription. + * Synchronously returns the number of messages currently available in the + * subscription, or `Option.none()` when it is shut down. + * + * **When to use** + * + * Use when you need synchronous polling outside a managed workflow and want + * shutdown observed as data instead of interruption. + * + * **Example** (Checking remaining messages synchronously) * - * @example * ```ts * import { PubSub } from "effect" * @@ -1345,19 +1538,36 @@ export declare const remaining: (self: Subscription) => Effect.Effect(self: Subscription) => Option.Option; /** - * A strategy that applies back pressure to publishers when the `PubSub` is at - * capacity. This guarantees that all subscribers will receive all messages - * published to the `PubSub` while they are subscribed. However, it creates the - * risk that a slow subscriber will slow down the rate at which messages - * are published and received by other subscribers. + * Represents the back-pressure strategy for bounded `PubSub` values. + * + * **When to use** + * + * Use to preserve every message for current subscribers when a bounded custom + * `PubSub` should make publishers wait for capacity instead of dropping or + * evicting messages. + * + * **Details** + * + * Publishers wait when the `PubSub` is at capacity, so all current subscribers + * can receive every published message. + * + * **Gotchas** + * + * A slow subscriber can slow down publishers and other subscribers. + * + * @see {@link bounded} for creating bounded PubSubs with back pressure by default + * @see {@link DroppingStrategy} for dropping new messages when capacity is full + * @see {@link SlidingStrategy} for evicting old messages when capacity is full * - * @since 4.0.0 * @category models + * @since 4.0.0 */ export declare class BackPressureStrategy implements PubSub.Strategy { publishers: MutableList.MutableList, boolean]>; @@ -1370,17 +1580,26 @@ export declare class BackPressureStrategy implements PubSub.Strategy): void; } /** - * A strategy that drops new messages when the `PubSub` is at capacity. This - * guarantees that a slow subscriber will not slow down the rate at which - * messages are published. However, it creates the risk that a slow - * subscriber will slow down the rate at which messages are received by - * other subscribers and that subscribers may not receive all messages - * published to the `PubSub` while they are subscribed. - * - * @example + * Represents the dropping strategy for bounded `PubSub` values. + * + * **When to use** + * + * Use to keep publishers fast by dropping new messages when the `PubSub` is at + * capacity. + * + * **Details** + * + * A publish that arrives while the `PubSub` is full is dropped instead of + * waiting for capacity. + * + * **Gotchas** + * + * Subscribers may miss messages published while they are subscribed. + * + * **Example** (Using a dropping strategy) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create PubSub with dropping strategy @@ -1392,24 +1611,25 @@ export declare class BackPressureStrategy implements PubSub.Strategy new PubSub.DroppingStrategy() * }) * - * // Fill the PubSub - * const pub1 = yield* PubSub.publish(pubsub, "msg1") // true - * const pub2 = yield* PubSub.publish(pubsub, "msg2") // true - * const pub3 = yield* PubSub.publish(pubsub, "msg3") // false (dropped) - * - * console.log("Publication results:", [pub1, pub2, pub3]) // [true, true, false] - * - * // Subscribers will only see the first two messages * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Fill the PubSub + * const pub1 = yield* PubSub.publish(pubsub, "msg1") // true + * const pub2 = yield* PubSub.publish(pubsub, "msg2") // true + * const pub3 = yield* PubSub.publish(pubsub, "msg3") // false (dropped) + * + * console.log("Publication results:", [pub1, pub2, pub3]) // [true, true, false] + * + * // Subscribers will only see the first two messages * const messages = yield* PubSub.takeAll(subscription) * console.log("Received messages:", messages) // ["msg1", "msg2"] * })) * }) * ``` * - * @since 4.0.0 * @category models + * @since 4.0.0 */ export declare class DroppingStrategy implements PubSub.Strategy { get shutdown(): Effect.Effect; @@ -1419,16 +1639,26 @@ export declare class DroppingStrategy implements PubSub.Strategy { completeSubscribersUnsafe(pubsub: PubSub.Atomic, subscribers: PubSub.Subscribers): void; } /** - * A strategy that adds new messages and drops old messages when the `PubSub` is - * at capacity. This guarantees that a slow subscriber will not slow down - * the rate at which messages are published and received by other - * subscribers. However, it creates the risk that a slow subscriber will - * not receive some messages published to the `PubSub` while it is subscribed. + * Represents the sliding strategy for bounded `PubSub` values. + * + * **When to use** + * + * Use to keep the most recent messages when the `PubSub` is at capacity. + * + * **Details** + * + * New messages are accepted by evicting older messages from the bounded + * `PubSub`. + * + * **Gotchas** + * + * Slow subscribers may miss older messages that are evicted before they are + * consumed. + * + * **Example** (Using a sliding strategy) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create PubSub with sliding strategy @@ -1440,23 +1670,24 @@ export declare class DroppingStrategy implements PubSub.Strategy { * strategy: () => new PubSub.SlidingStrategy() * }) * - * // Publish messages that exceed capacity - * yield* PubSub.publish(pubsub, "msg1") // stored - * yield* PubSub.publish(pubsub, "msg2") // stored - * yield* PubSub.publish(pubsub, "msg3") // "msg1" evicted, "msg3" stored - * yield* PubSub.publish(pubsub, "msg4") // "msg2" evicted, "msg4" stored - * - * // Subscribers will see the most recent messages * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Publish messages that exceed capacity + * yield* PubSub.publish(pubsub, "msg1") // stored + * yield* PubSub.publish(pubsub, "msg2") // stored + * yield* PubSub.publish(pubsub, "msg3") // "msg1" evicted, "msg3" stored + * yield* PubSub.publish(pubsub, "msg4") // "msg2" evicted, "msg4" stored + * + * // Subscribers will see the most recent messages * const messages = yield* PubSub.takeAll(subscription) * console.log("Recent messages:", messages) // ["msg3", "msg4"] * })) * }) * ``` * - * @since 4.0.0 * @category models + * @since 4.0.0 */ export declare class SlidingStrategy implements PubSub.Strategy { get shutdown(): Effect.Effect; diff --git a/.opencode/node_modules/effect/dist/PubSub.d.ts.map b/.opencode/node_modules/effect/dist/PubSub.d.ts.map index a3ce893e2348bedffb112a060da7d2f382ae5b21..6bee4de8128cc25da86af32f82f4833097beca4b 100644 --- a/.opencode/node_modules/effect/dist/PubSub.d.ts.map +++ b/.opencode/node_modules/effect/dist/PubSub.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"PubSub.d.ts","sourceRoot":"","sources":["../src/PubSub.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,GAAG,MAAM,YAAY,CAAA;AAEjC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAE7C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,eAAe,CAAA;AAC5D,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEtD,QAAA,MAAM,MAAM,mBAAmB,CAAA;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAE,SAAQ,QAAQ;IAChD,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE;QACjB,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;KAC1B,CAAA;IACD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;IAC3C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;CAiB5E"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/PubSub.js b/.opencode/node_modules/effect/dist/PubSub.js index 9c8546771ad443bd1837add562c47b02dc89dca9..31ce1b44938c2b19079f9da729e0ec65d583c921 100644 --- a/.opencode/node_modules/effect/dist/PubSub.js +++ b/.opencode/node_modules/effect/dist/PubSub.js @@ -1,30 +1,12 @@ /** - * This module provides utilities for working with publish-subscribe (PubSub) systems. + * Broadcasts values from publishers to many subscribers. * - * A PubSub is an asynchronous message hub where publishers can publish messages and subscribers - * can subscribe to receive those messages. PubSub supports various backpressure strategies, - * message replay, and concurrent access from multiple producers and consumers. - * - * @example - * ```ts - * import { Effect, PubSub } from "effect" - * - * const program = Effect.gen(function*() { - * const pubsub = yield* PubSub.bounded(10) - * - * // Publisher - * yield* PubSub.publish(pubsub, "Hello") - * yield* PubSub.publish(pubsub, "World") - * - * // Subscriber - * yield* Effect.scoped(Effect.gen(function*() { - * const subscription = yield* PubSub.subscribe(pubsub) - * const message1 = yield* PubSub.take(subscription) - * const message2 = yield* PubSub.take(subscription) - * console.log(message1, message2) // "Hello", "World" - * })) - * }) - * ``` + * Publishers add messages with `publish` or `publishAll`, and each active + * `Subscription` receives its own copy of every accepted message. Unlike a + * queue, subscribers do not compete for messages. This module includes bounded, + * dropping, sliding, and unbounded hubs, optional replay buffers for late + * subscribers, message-taking helpers, capacity and shutdown operations, and + * low-level types for custom hub strategies. * * @since 2.0.0 */ @@ -46,10 +28,10 @@ const SubscriptionTypeId = "~effect/PubSub/Subscription"; /** * Creates a PubSub with a custom atomic implementation and strategy. * - * @example + * **Example** (Creating a PubSub with a custom strategy) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create custom PubSub with specific atomic implementation and strategy @@ -63,25 +45,25 @@ const SubscriptionTypeId = "~effect/PubSub/Subscription"; * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export const make = options => Effect.sync(() => makePubSubUnsafe(options.atomicPubSub(), new Map(), Scope.makeUnsafe(), Latch.makeUnsafe(false), MutableRef.make(false), options.strategy())); /** - * Creates a bounded PubSub with backpressure strategy. + * Creates a bounded `PubSub` that applies backpressure when it reaches + * capacity. * - * The PubSub will retain messages until they have been taken by all subscribers. - * When the PubSub reaches capacity, publishers will be suspended until space becomes available. - * This ensures message delivery guarantees but may slow down fast publishers. + * **Details** * - * @param capacity - The maximum number of messages the PubSub can hold, or an options object - * with capacity and optional replay buffer size - * @returns An Effect that creates a bounded PubSub + * Published messages are retained until all current subscribers have taken + * them. When the capacity is full, publishers suspend until space is available. + * Pass an options object to configure both `capacity` and an optional replay + * buffer for late subscribers. + * + * **Example** (Creating a bounded PubSub) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create bounded PubSub with capacity 100 @@ -95,8 +77,8 @@ export const make = options => Effect.sync(() => makePubSubUnsafe(options.atomic * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const bounded = capacity => make({ atomicPubSub: () => makeAtomicBounded(capacity), @@ -106,12 +88,14 @@ export const bounded = capacity => make({ * Creates a bounded `PubSub` with the dropping strategy. The `PubSub` will drop new * messages if the `PubSub` is at capacity. * + * **Details** + * * For best performance use capacities that are powers of two. * - * @example + * **Example** (Dropping messages when full) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create dropping PubSub that drops new messages when full @@ -123,17 +107,24 @@ export const bounded = capacity => make({ * replay: 5 * }) * - * // Fill the PubSub and see dropping behavior - * yield* PubSub.publish(pubsub, "msg1") // succeeds - * yield* PubSub.publish(pubsub, "msg2") // succeeds - * yield* PubSub.publish(pubsub, "msg3") // succeeds - * const dropped = yield* PubSub.publish(pubsub, "msg4") // returns false (dropped) - * console.log("Message dropped:", !dropped) + * yield* Effect.scoped(Effect.gen(function*() { + * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Fill the PubSub and see dropping behavior + * yield* PubSub.publish(pubsub, "msg1") // succeeds + * yield* PubSub.publish(pubsub, "msg2") // succeeds + * yield* PubSub.publish(pubsub, "msg3") // succeeds + * const dropped = yield* PubSub.publish(pubsub, "msg4") // returns false (dropped) + * console.log("Message dropped:", !dropped) // true + * + * const messages = yield* PubSub.takeAll(subscription) + * console.log(messages) // ["msg1", "msg2", "msg3"] + * })) * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const dropping = capacity => make({ atomicPubSub: () => makeAtomicBounded(capacity), @@ -143,12 +134,14 @@ export const dropping = capacity => make({ * Creates a bounded `PubSub` with the sliding strategy. The `PubSub` will add new * messages and drop old messages if the `PubSub` is at capacity. * + * **Details** + * * For best performance use capacities that are powers of two. * - * @example + * **Example** (Sliding old messages when full) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create sliding PubSub that evicts old messages when full @@ -160,22 +153,23 @@ export const dropping = capacity => make({ * replay: 2 * }) * - * // Fill and overflow the PubSub - * yield* PubSub.publish(pubsub, "msg1") - * yield* PubSub.publish(pubsub, "msg2") - * yield* PubSub.publish(pubsub, "msg3") - * yield* PubSub.publish(pubsub, "msg4") // "msg1" is evicted - * * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Fill and overflow the PubSub + * yield* PubSub.publish(pubsub, "msg1") + * yield* PubSub.publish(pubsub, "msg2") + * yield* PubSub.publish(pubsub, "msg3") + * yield* PubSub.publish(pubsub, "msg4") // "msg1" is evicted + * * const messages = yield* PubSub.takeAll(subscription) * console.log(messages) // ["msg2", "msg3", "msg4"] * })) * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const sliding = capacity => make({ atomicPubSub: () => makeAtomicBounded(capacity), @@ -184,10 +178,10 @@ export const sliding = capacity => make({ /** * Creates an unbounded `PubSub`. * - * @example + * **Example** (Creating an unbounded PubSub) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create unbounded PubSub @@ -198,21 +192,22 @@ export const sliding = capacity => make({ * replay: 10 * }) * - * // Can publish unlimited messages - * for (let i = 0; i < 1000; i++) { - * yield* PubSub.publish(pubsub, `message-${i}`) - * } - * * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Can publish unlimited messages + * for (let i = 0; i < 3; i++) { + * yield* PubSub.publish(pubsub, `message-${i}`) + * } + * * const message = yield* PubSub.take(subscription) - * console.log("First message:", message) + * console.log("First message:", message) // "message-0" * })) * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const unbounded = options => make({ atomicPubSub: () => makeAtomicUnbounded(options), @@ -221,8 +216,30 @@ export const unbounded = options => make({ /** * Creates a bounded atomic PubSub implementation with optional replay buffer. * - * @since 4.0.0 + * **When to use** + * + * Use to provide bounded message storage when building a custom `PubSub` with + * `make` and an explicit delivery strategy. + * + * **Details** + * + * Pass either a capacity number or an options object with `capacity` and + * optional `replay`. A positive `replay` value enables a replay buffer for late + * subscribers, and fractional replay sizes are rounded up. + * + * **Gotchas** + * + * The capacity must be greater than zero; invalid capacities throw + * synchronously before an atomic implementation is created. + * + * @see {@link make} for constructing a `PubSub` from an atomic implementation and delivery strategy + * @see {@link makeAtomicUnbounded} for an atomic implementation without a bounded capacity + * @see {@link bounded} for the higher-level backpressure constructor + * @see {@link dropping} for the higher-level dropping constructor + * @see {@link sliding} for the higher-level sliding constructor + * * @category constructors + * @since 4.0.0 */ export const makeAtomicBounded = capacity => { const options = typeof capacity === "number" ? { @@ -241,17 +258,31 @@ export const makeAtomicBounded = capacity => { /** * Creates an unbounded atomic PubSub implementation with optional replay buffer. * - * @since 4.0.0 + * **When to use** + * + * Use to create the low-level storage layer for a custom `PubSub` whose active + * subscribers may retain an unbounded number of pending messages. + * + * **Gotchas** + * + * Messages published while subscribers are active can be retained without a + * capacity limit until those subscribers take them or unsubscribe. + * + * @see {@link makeAtomicBounded} for a bounded atomic implementation that enforces capacity + * @see {@link make} for wrapping an atomic implementation with a delivery strategy + * @see {@link unbounded} for the high-level effectful constructor for unbounded `PubSub` values + * * @category constructors + * @since 4.0.0 */ export const makeAtomicUnbounded = options => new UnboundedPubSub(options?.replay ? new ReplayBuffer(options.replay) : undefined); /** * Returns the number of elements the queue can hold. * - * @example + * **Example** (Getting PubSub capacity) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(100) @@ -264,19 +295,23 @@ export const makeAtomicUnbounded = options => new UnboundedPubSub(options?.repla * }) * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export const capacity = self => self.pubsub.capacity; /** - * Retrieves the size of the queue, which is equal to the number of elements - * in the queue. This may be negative if fibers are suspended waiting for - * elements to be added to the queue. + * Returns the current number of messages retained by the `PubSub` for active + * subscribers. + * + * **Details** + * + * If the `PubSub` has been shut down, the returned effect succeeds with `0`. + * The size is not a count of waiting subscribers or suspended publishers. + * + * **Example** (Getting PubSub size) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -285,25 +320,41 @@ export const capacity = self => self.pubsub.capacity; * const initialSize = yield* PubSub.size(pubsub) * console.log("Initial size:", initialSize) // 0 * - * // Publish some messages - * yield* PubSub.publish(pubsub, "msg1") - * yield* PubSub.publish(pubsub, "msg2") + * yield* Effect.scoped(Effect.gen(function*() { + * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Publish some messages for the active subscription + * yield* PubSub.publish(pubsub, "msg1") + * yield* PubSub.publish(pubsub, "msg2") + * + * const afterPublish = yield* PubSub.size(pubsub) + * console.log("After publishing:", afterPublish) // 2 * - * const afterPublish = yield* PubSub.size(pubsub) - * console.log("After publishing:", afterPublish) // 2 + * yield* PubSub.takeAll(subscription) + * })) * }) * ``` * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export const size = self => Effect.sync(() => sizeUnsafe(self)); /** - * Retrieves the size of the queue, which is equal to the number of elements - * in the queue. This may be negative if fibers are suspended waiting for - * elements to be added to the queue. + * Returns the current number of messages retained by the `PubSub` for active + * subscribers synchronously. + * + * **When to use** + * + * Use when an immediate `PubSub` size snapshot is needed outside effectful code + * and concurrent changes between the check and later use are acceptable. + * + * **Details** + * + * Returns `0` after shutdown. Because this is an unsafe synchronous snapshot, + * prefer `size` in effectful code. + * + * **Example** (Reading size synchronously) * - * @example * ```ts * import { PubSub } from "effect" * @@ -314,8 +365,8 @@ export const size = self => Effect.sync(() => sizeUnsafe(self)); * console.log("Current size:", size) * ``` * - * @since 2.0.0 * @category getters + * @since 4.0.0 */ export const sizeUnsafe = self => { if (MutableRef.get(self.shutdownFlag)) { @@ -324,13 +375,16 @@ export const sizeUnsafe = self => { return self.pubsub.size(); }; /** - * Returns `true` if the `PubSub` contains at least one element, `false` - * otherwise. + * Returns `true` when the `PubSub` has reached its configured capacity. + * + * **Details** + * + * For unbounded PubSubs this is normally `false`. + * + * **Example** (Checking whether a PubSub is full) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(2) @@ -339,26 +393,32 @@ export const sizeUnsafe = self => { * const initiallyFull = yield* PubSub.isFull(pubsub) * console.log("Initially full:", initiallyFull) // false * - * // Fill the PubSub - * yield* PubSub.publish(pubsub, "msg1") - * yield* PubSub.publish(pubsub, "msg2") + * yield* Effect.scoped(Effect.gen(function*() { + * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Fill the PubSub for the active subscription + * yield* PubSub.publish(pubsub, "msg1") + * yield* PubSub.publish(pubsub, "msg2") * - * const nowFull = yield* PubSub.isFull(pubsub) - * console.log("Now full:", nowFull) // true + * const nowFull = yield* PubSub.isFull(pubsub) + * console.log("Now full:", nowFull) // true + * + * yield* PubSub.takeAll(subscription) + * })) * }) * ``` * - * @since 2.0.0 * @category predicates + * @since 2.0.0 */ export const isFull = self => Effect.map(size(self), size => size === self.pubsub.capacity); /** * Returns `true` if the `Pubsub` contains zero elements, `false` otherwise. * - * @example + * **Example** (Checking whether a PubSub is empty) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -367,60 +427,69 @@ export const isFull = self => Effect.map(size(self), size => size === self.pubsu * const initiallyEmpty = yield* PubSub.isEmpty(pubsub) * console.log("Initially empty:", initiallyEmpty) // true * - * // Publish a message - * yield* PubSub.publish(pubsub, "Hello") + * yield* Effect.scoped(Effect.gen(function*() { + * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Publish a message for the active subscription + * yield* PubSub.publish(pubsub, "Hello") + * + * const nowEmpty = yield* PubSub.isEmpty(pubsub) + * console.log("Now empty:", nowEmpty) // false * - * const nowEmpty = yield* PubSub.isEmpty(pubsub) - * console.log("Now empty:", nowEmpty) // false + * yield* PubSub.take(subscription) + * })) * }) * ``` * - * @since 2.0.0 * @category predicates + * @since 2.0.0 */ export const isEmpty = self => Effect.map(size(self), size => size === 0); /** - * Interrupts any fibers that are suspended on `offer` or `take`. Future calls - * to `offer*` and `take*` will be interrupted immediately. + * Shuts down the `PubSub`, interrupting suspended publishers and subscribers + * and finalizing active subscriptions. + * + * **Details** + * + * After shutdown, `publish` and `publishAll` succeed with `false`, + * `publishUnsafe` returns `false`, and subscription operations such as `take` + * interrupt. + * + * **Example** (Shutting down a PubSub) * - * @example * ```ts - * import { Effect, Fiber, PubSub } from "effect" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(1) * - * // Start a fiber that will be suspended waiting to publish - * const publisherFiber = yield* Effect.forkChild( - * Effect.gen(function*() { - * yield* PubSub.publish(pubsub, "msg1") // fills the buffer - * yield* PubSub.publish(pubsub, "msg2") // will suspend here - * }) - * ) - * * // Shutdown the PubSub * yield* PubSub.shutdown(pubsub) * - * // The suspended publisher will be interrupted - * const result = yield* Fiber.await(publisherFiber) - * console.log("Publisher interrupted:", result._tag === "Failure") + * const isShutdown = yield* PubSub.isShutdown(pubsub) + * console.log("Is shutdown:", isShutdown) // true + * + * // Publishing after shutdown returns false + * const published = yield* PubSub.publish(pubsub, "msg1") + * console.log("Published after shutdown:", published) // false * }) * ``` * - * @since 2.0.0 * @category lifecycle + * @since 2.0.0 */ export const shutdown = self => Effect.uninterruptible(Effect.withFiber(fiber => { MutableRef.set(self.shutdownFlag, true); return Scope.close(self.scope, Exit.interrupt(fiber.id)).pipe(Effect.andThen(self.strategy.shutdown), Effect.when(self.shutdownHook.open), Effect.asVoid); })); /** - * Returns `true` if `shutdown` has been called, otherwise returns `false`. + * Checks effectfully whether `shutdown` has been called, returning `true` + * after shutdown and `false` otherwise. + * + * **Example** (Checking whether a PubSub is shutdown) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -437,14 +506,21 @@ export const shutdown = self => Effect.uninterruptible(Effect.withFiber(fiber => * }) * ``` * - * @since 2.0.0 * @category predicates + * @since 2.0.0 */ export const isShutdown = self => Effect.sync(() => isShutdownUnsafe(self)); /** - * Returns `true` if `shutdown` has been called, otherwise returns `false`. + * Checks synchronously whether `shutdown` has been called, returning `true` + * after shutdown and `false` otherwise. + * + * **When to use** + * + * Use when an immediate `PubSub` shutdown-state snapshot is needed outside + * effectful code and racing shutdown changes are acceptable. + * + * **Example** (Checking shutdown synchronously) * - * @example * ```ts * import { PubSub } from "effect" * @@ -459,8 +535,8 @@ export const isShutdown = self => Effect.sync(() => isShutdownUnsafe(self)); * } * ``` * - * @since 4.0.0 * @category predicates + * @since 4.0.0 */ export const isShutdownUnsafe = self => self.shutdownFlag.current; /** @@ -468,7 +544,8 @@ export const isShutdownUnsafe = self => self.shutdownFlag.current; * not resume until the queue has been shutdown. If the queue is already * shutdown, the `Effect` will resume right away. * - * @example + * **Example** (Waiting for shutdown) + * * ```ts * import { Effect, Fiber, PubSub } from "effect" * @@ -494,18 +571,29 @@ export const isShutdownUnsafe = self => self.shutdownFlag.current; * }) * ``` * - * @since 2.0.0 * @category lifecycle + * @since 2.0.0 */ export const awaitShutdown = self => self.shutdownHook.await; /** - * Publishes a message to the `PubSub`, returning whether the message was published - * to the `PubSub`. + * Publishes a message to the `PubSub` as an `Effect`, returning whether the + * message was accepted. + * + * **When to use** + * + * Use when you need to publish from effectful code and let the configured + * PubSub strategy handle surplus messages. + * + * **Details** + * + * The effect succeeds with `false` if the `PubSub` is shut down. If the message + * cannot be accepted immediately, the configured strategy decides how surplus + * messages are handled. + * + * **Example** (Publishing a message) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -514,25 +602,20 @@ export const awaitShutdown = self => self.shutdownHook.await; * const published = yield* PubSub.publish(pubsub, "Hello World") * console.log("Message published:", published) // true * - * // With a full bounded PubSub using backpressure strategy - * const smallPubsub = yield* PubSub.bounded(1) - * yield* PubSub.publish(smallPubsub, "msg1") // succeeds - * - * // This will suspend until space becomes available - * const publishEffect = PubSub.publish(smallPubsub, "msg2") - * - * // Create a subscriber to free up space * yield* Effect.scoped(Effect.gen(function*() { - * const subscription = yield* PubSub.subscribe(smallPubsub) - * yield* PubSub.take(subscription) // frees space - * const result = yield* publishEffect - * console.log("Second message published:", result) // true + * const subscription = yield* PubSub.subscribe(pubsub) + * + * yield* PubSub.publish(pubsub, "Hello") + * const message = yield* PubSub.take(subscription) + * console.log("Received:", message) // "Hello" * })) * }) * ``` * - * @since 2.0.0 + * @see {@link publishUnsafe} for a synchronous non-blocking attempt that does not run effectful surplus handling + * * @category publishing + * @since 2.0.0 */ export const publish = /*#__PURE__*/dual(2, (self, value) => Effect.suspend(() => { if (self.shutdownFlag.current) { @@ -545,10 +628,22 @@ export const publish = /*#__PURE__*/dual(2, (self, value) => Effect.suspend(() = return self.strategy.handleSurplus(self.pubsub, self.subscribers, [value], self.shutdownFlag); })); /** - * Publishes a message to the `PubSub`, returning whether the message was published - * to the `PubSub`. + * Attempts to publish a message synchronously without applying the PubSub + * strategy's effectful surplus handling. + * + * **When to use** + * + * Use when you need a non-blocking synchronous publish attempt where `false` + * is an acceptable result when the message cannot be accepted immediately. + * + * **Details** + * + * Returns `false` if the `PubSub` is shut down or the message cannot be + * accepted immediately, for example when a bounded PubSub is full. Prefer + * `publish` when backpressure or sliding behavior should be honored. + * + * **Example** (Publishing without suspending) * - * @example * ```ts * import { PubSub } from "effect" * @@ -569,8 +664,10 @@ export const publish = /*#__PURE__*/dual(2, (self, value) => Effect.suspend(() = * console.log(`Published ${publishedCount} out of ${messages.length} messages`) * ``` * - * @since 4.0.0 + * @see {@link publish} for effectful publishing that honors the configured surplus strategy + * * @category publishing + * @since 4.0.0 */ export const publishUnsafe = /*#__PURE__*/dual(2, (self, value) => { if (self.shutdownFlag.current) return false; @@ -584,10 +681,10 @@ export const publishUnsafe = /*#__PURE__*/dual(2, (self, value) => { * Publishes all of the specified messages to the `PubSub`, returning whether they * were published to the `PubSub`. * - * @example + * **Example** (Publishing multiple messages) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, Fiber, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) @@ -597,25 +694,30 @@ export const publishUnsafe = /*#__PURE__*/dual(2, (self, value) => { * const allPublished = yield* PubSub.publishAll(pubsub, messages) * console.log("All messages published:", allPublished) // true * - * // With a smaller capacity + * // With a smaller capacity and an active subscription * const smallPubsub = yield* PubSub.bounded(2) * const manyMessages = ["msg1", "msg2", "msg3", "msg4"] * - * // Will suspend until space becomes available for all messages - * const publishAllEffect = PubSub.publishAll(smallPubsub, manyMessages) - * - * // Subscribe to consume messages and free space * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(smallPubsub) - * yield* PubSub.takeAll(subscription) // consume all messages - * const result = yield* publishAllEffect - * console.log("All messages eventually published:", result) + * + * // Will suspend until space becomes available for all messages + * const fiber = yield* Effect.forkChild(PubSub.publishAll(smallPubsub, manyMessages)) + * + * const firstBatch = yield* PubSub.takeBetween(subscription, 2, 2) + * console.log("First batch:", firstBatch) // ["msg1", "msg2"] + * + * const result = yield* Fiber.join(fiber) + * console.log("All messages eventually published:", result) // true + * + * const secondBatch = yield* PubSub.takeAll(subscription) + * console.log("Second batch:", secondBatch) // ["msg3", "msg4"] * })) * }) * ``` * - * @since 2.0.0 * @category publishing + * @since 2.0.0 */ export const publishAll = /*#__PURE__*/dual(2, (self, elements) => Effect.suspend(() => { if (self.shutdownFlag.current) { @@ -633,21 +735,22 @@ export const publishAll = /*#__PURE__*/dual(2, (self, elements) => Effect.suspen * be evaluated multiple times within the scope to take a message from the `PubSub` * each time. * - * @example + * **Example** (Subscribing to messages) + * * ```ts * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) * - * // Publish some messages - * yield* PubSub.publish(pubsub, "Hello") - * yield* PubSub.publish(pubsub, "World") - * * // Subscribe within a scope for automatic cleanup * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) * + * // Publish some messages + * yield* PubSub.publish(pubsub, "Hello") + * yield* PubSub.publish(pubsub, "World") + * * // Take messages one by one * const msg1 = yield* PubSub.take(subscription) * const msg2 = yield* PubSub.take(subscription) @@ -656,13 +759,13 @@ export const publishAll = /*#__PURE__*/dual(2, (self, elements) => Effect.suspen * // Subscription is automatically cleaned up when scope exits * })) * - * // Multiple subscribers can receive the same messages - * yield* PubSub.publish(pubsub, "Broadcast") - * * yield* Effect.scoped(Effect.gen(function*() { * const sub1 = yield* PubSub.subscribe(pubsub) * const sub2 = yield* PubSub.subscribe(pubsub) * + * // Multiple subscribers can receive the same messages + * yield* PubSub.publish(pubsub, "Broadcast") + * * const [msg1, msg2] = yield* Effect.all([ * PubSub.take(sub1), * PubSub.take(sub2) @@ -672,8 +775,8 @@ export const publishAll = /*#__PURE__*/dual(2, (self, elements) => Effect.suspen * }) * ``` * + * @category subscriptions * @since 2.0.0 - * @category subscription */ export const subscribe = self => Effect.uninterruptible(Effect.contextWith(services => { const localScope = Context.get(services, Scope.Scope); @@ -696,7 +799,8 @@ const unsubscribe = self => Effect.uninterruptible(Effect.withFiber(state => { * Takes a single message from the subscription. If no messages are available, * this will suspend until a message becomes available. * - * @example + * **Example** (Taking a message) + * * ```ts * import { Effect, Fiber, PubSub } from "effect" * @@ -721,8 +825,8 @@ const unsubscribe = self => Effect.uninterruptible(Effect.withFiber(state => { * }) * ``` * + * @category subscriptions * @since 4.0.0 - * @category subscription */ export const take = self => Effect.suspend(() => { if (self.shutdownFlag.current) { @@ -744,19 +848,20 @@ export const take = self => Effect.suspend(() => { * Takes all available messages from the subscription, suspending if no items * are available. * - * @example + * **Example** (Taking all available messages) + * * ```ts * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) * - * // Publish multiple messages - * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3"]) - * * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) * + * // Publish multiple messages + * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3"]) + * * // Take all available messages at once * const allMessages = yield* PubSub.takeAll(subscription) * console.log("All messages:", allMessages) // ["msg1", "msg2", "msg3"] @@ -764,8 +869,8 @@ export const take = self => Effect.suspend(() => { * }) * ``` * + * @category subscriptions * @since 4.0.0 - * @category subscription */ export const takeAll = self => Effect.suspend(function loop(value) { if (self.shutdownFlag.current) { @@ -801,20 +906,20 @@ const pollForItem = self => { /** * Takes up to the specified number of messages from the subscription without suspending. * - * @example + * **Example** (Taking up to a maximum number of messages) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) * - * // Publish multiple messages - * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3", "msg4", "msg5"]) - * * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) * + * // Publish multiple messages + * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3", "msg4", "msg5"]) + * * // Take up to 3 messages * const upTo3 = yield* PubSub.takeUpTo(subscription, 3) * console.log("Up to 3:", upTo3) // ["msg1", "msg2", "msg3"] @@ -830,8 +935,8 @@ const pollForItem = self => { * }) * ``` * + * @category subscriptions * @since 4.0.0 - * @category subscription */ export const takeUpTo = /*#__PURE__*/dual(2, (self, max) => Effect.suspend(() => { if (self.shutdownFlag.current) return Effect.interrupt; @@ -850,7 +955,8 @@ export const takeUpTo = /*#__PURE__*/dual(2, (self, max) => Effect.suspend(() => * Takes between the specified minimum and maximum number of messages from the subscription. * Will suspend if the minimum number is not immediately available. * - * @example + * **Example** (Taking between a minimum and maximum) + * * ```ts * import { Effect, Fiber, PubSub } from "effect" * @@ -875,8 +981,8 @@ export const takeUpTo = /*#__PURE__*/dual(2, (self, max) => Effect.suspend(() => * }) * ``` * + * @category subscriptions * @since 4.0.0 - * @category subscription */ export const takeBetween = /*#__PURE__*/dual(3, (self, min, max) => Effect.suspend(() => takeRemainderLoop(self, min, max, []))); const takeRemainderLoop = (self, min, max, acc) => { @@ -902,22 +1008,33 @@ const takeRemainderLoop = (self, min, max, acc) => { }); }; /** - * Returns the number of messages currently available in the subscription. + * Returns the number of messages currently available in the subscription as an + * `Effect`. + * + * **When to use** + * + * Use when checking a subscription from effectful code and shutdown should + * interrupt the effect. + * + * **Details** + * + * The count includes replay-buffered messages. If the subscription has been + * shut down, the effect interrupts. + * + * **Example** (Checking remaining messages) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * const pubsub = yield* PubSub.bounded(10) * - * // Publish some messages - * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3"]) - * * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) * + * // Publish some messages + * yield* PubSub.publishAll(pubsub, ["msg1", "msg2", "msg3"]) + * * // Check how many messages are available * const count = yield* PubSub.remaining(subscription) * console.log("Messages available:", count) // 3 @@ -931,14 +1048,23 @@ const takeRemainderLoop = (self, min, max, acc) => { * }) * ``` * - * @since 4.0.0 + * @see {@link remainingUnsafe} for a synchronous check that reports shutdown as `Option.none()` + * * @category getters + * @since 4.0.0 */ export const remaining = self => Effect.suspend(() => self.shutdownFlag.current ? Effect.interrupt : Effect.succeed(self.subscription.size() + self.replayWindow.remaining)); /** - * Returns the number of messages currently available in the subscription. + * Synchronously returns the number of messages currently available in the + * subscription, or `Option.none()` when it is shut down. + * + * **When to use** + * + * Use when you need synchronous polling outside a managed workflow and want + * shutdown observed as data instead of interruption. + * + * **Example** (Checking remaining messages synchronously) * - * @example * ```ts * import { PubSub } from "effect" * @@ -958,8 +1084,10 @@ export const remaining = self => Effect.suspend(() => self.shutdownFlag.current * } * ``` * - * @since 4.0.0 + * @see {@link remaining} for the effectful variant that interrupts on shutdown + * * @category getters + * @since 4.0.0 */ export const remainingUnsafe = self => { if (self.shutdownFlag.current) { @@ -1671,14 +1799,29 @@ const ensureCapacity = capacity => { // PubSub.Strategy // ----------------------------------------------------------------------------- /** - * A strategy that applies back pressure to publishers when the `PubSub` is at - * capacity. This guarantees that all subscribers will receive all messages - * published to the `PubSub` while they are subscribed. However, it creates the - * risk that a slow subscriber will slow down the rate at which messages - * are published and received by other subscribers. + * Represents the back-pressure strategy for bounded `PubSub` values. + * + * **When to use** + * + * Use to preserve every message for current subscribers when a bounded custom + * `PubSub` should make publishers wait for capacity instead of dropping or + * evicting messages. + * + * **Details** + * + * Publishers wait when the `PubSub` is at capacity, so all current subscribers + * can receive every published message. + * + * **Gotchas** + * + * A slow subscriber can slow down publishers and other subscribers. + * + * @see {@link bounded} for creating bounded PubSubs with back pressure by default + * @see {@link DroppingStrategy} for dropping new messages when capacity is full + * @see {@link SlidingStrategy} for evicting old messages when capacity is full * - * @since 4.0.0 * @category models + * @since 4.0.0 */ export class BackPressureStrategy { publishers = /*#__PURE__*/MutableList.make(); @@ -1745,17 +1888,26 @@ export class BackPressureStrategy { } } /** - * A strategy that drops new messages when the `PubSub` is at capacity. This - * guarantees that a slow subscriber will not slow down the rate at which - * messages are published. However, it creates the risk that a slow - * subscriber will slow down the rate at which messages are received by - * other subscribers and that subscribers may not receive all messages - * published to the `PubSub` while they are subscribed. - * - * @example + * Represents the dropping strategy for bounded `PubSub` values. + * + * **When to use** + * + * Use to keep publishers fast by dropping new messages when the `PubSub` is at + * capacity. + * + * **Details** + * + * A publish that arrives while the `PubSub` is full is dropped instead of + * waiting for capacity. + * + * **Gotchas** + * + * Subscribers may miss messages published while they are subscribed. + * + * **Example** (Using a dropping strategy) + * * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create PubSub with dropping strategy @@ -1767,24 +1919,25 @@ export class BackPressureStrategy { * strategy: () => new PubSub.DroppingStrategy() * }) * - * // Fill the PubSub - * const pub1 = yield* PubSub.publish(pubsub, "msg1") // true - * const pub2 = yield* PubSub.publish(pubsub, "msg2") // true - * const pub3 = yield* PubSub.publish(pubsub, "msg3") // false (dropped) - * - * console.log("Publication results:", [pub1, pub2, pub3]) // [true, true, false] - * - * // Subscribers will only see the first two messages * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Fill the PubSub + * const pub1 = yield* PubSub.publish(pubsub, "msg1") // true + * const pub2 = yield* PubSub.publish(pubsub, "msg2") // true + * const pub3 = yield* PubSub.publish(pubsub, "msg3") // false (dropped) + * + * console.log("Publication results:", [pub1, pub2, pub3]) // [true, true, false] + * + * // Subscribers will only see the first two messages * const messages = yield* PubSub.takeAll(subscription) * console.log("Received messages:", messages) // ["msg1", "msg2"] * })) * }) * ``` * - * @since 4.0.0 * @category models + * @since 4.0.0 */ export class DroppingStrategy { get shutdown() { @@ -1804,16 +1957,26 @@ export class DroppingStrategy { } } /** - * A strategy that adds new messages and drops old messages when the `PubSub` is - * at capacity. This guarantees that a slow subscriber will not slow down - * the rate at which messages are published and received by other - * subscribers. However, it creates the risk that a slow subscriber will - * not receive some messages published to the `PubSub` while it is subscribed. + * Represents the sliding strategy for bounded `PubSub` values. + * + * **When to use** + * + * Use to keep the most recent messages when the `PubSub` is at capacity. + * + * **Details** + * + * New messages are accepted by evicting older messages from the bounded + * `PubSub`. + * + * **Gotchas** + * + * Slow subscribers may miss older messages that are evicted before they are + * consumed. + * + * **Example** (Using a sliding strategy) * - * @example * ```ts - * import { Effect } from "effect" - * import * as PubSub from "effect/PubSub" + * import { Effect, PubSub } from "effect" * * const program = Effect.gen(function*() { * // Create PubSub with sliding strategy @@ -1825,23 +1988,24 @@ export class DroppingStrategy { * strategy: () => new PubSub.SlidingStrategy() * }) * - * // Publish messages that exceed capacity - * yield* PubSub.publish(pubsub, "msg1") // stored - * yield* PubSub.publish(pubsub, "msg2") // stored - * yield* PubSub.publish(pubsub, "msg3") // "msg1" evicted, "msg3" stored - * yield* PubSub.publish(pubsub, "msg4") // "msg2" evicted, "msg4" stored - * - * // Subscribers will see the most recent messages * yield* Effect.scoped(Effect.gen(function*() { * const subscription = yield* PubSub.subscribe(pubsub) + * + * // Publish messages that exceed capacity + * yield* PubSub.publish(pubsub, "msg1") // stored + * yield* PubSub.publish(pubsub, "msg2") // stored + * yield* PubSub.publish(pubsub, "msg3") // "msg1" evicted, "msg3" stored + * yield* PubSub.publish(pubsub, "msg4") // "msg2" evicted, "msg4" stored + * + * // Subscribers will see the most recent messages * const messages = yield* PubSub.takeAll(subscription) * console.log("Recent messages:", messages) // ["msg3", "msg4"] * })) * }) * ``` * - * @since 4.0.0 * @category models + * @since 4.0.0 */ export class SlidingStrategy { get shutdown() { diff --git a/.opencode/node_modules/effect/dist/PubSub.js.map b/.opencode/node_modules/effect/dist/PubSub.js.map index 1cb58c37d457f1d5af134458e9227fb1dbdb43dd..27989565c84d651b4fd9447a678d7399fbf68a51 100644 --- a/.opencode/node_modules/effect/dist/PubSub.js.map +++ b/.opencode/node_modules/effect/dist/PubSub.js.map @@ -1 +1 @@ -{"version":3,"file":"PubSub.js","names":["Arr","Context","Deferred","Effect","Exit","dual","identity","Latch","MutableList","MutableRef","nextPow2","Option","pipeArguments","Scope","TypeId","SubscriptionTypeId","make","options","sync","makePubSubUnsafe","atomicPubSub","Map","makeUnsafe","strategy","bounded","capacity","makeAtomicBounded","BackPressureStrategy","dropping","DroppingStrategy","sliding","SlidingStrategy","unbounded","makeAtomicUnbounded","ensureCapacity","replayBuffer","replay","ReplayBuffer","Math","ceil","undefined","BoundedPubSubSingle","BoundedPubSubPow2","BoundedPubSubArb","UnboundedPubSub","self","pubsub","size","sizeUnsafe","get","shutdownFlag","isFull","map","isEmpty","shutdown","uninterruptible","withFiber","fiber","set","close","scope","interrupt","id","pipe","andThen","when","shutdownHook","open","asVoid","isShutdown","isShutdownUnsafe","current","awaitShutdown","await","publish","value","suspend","succeed","completeSubscribersUnsafe","subscribers","handleSurplus","publishUnsafe","publishAll","elements","surplus","length","subscribe","contextWith","services","localScope","forkUnsafe","subscription","makeSubscriptionUnsafe","addFinalizer","unsubscribe","addFinalizerExit","exit","as","state","forEach","takeAll","pollers","d","interruptWith","discard","concurrency","tap","delete","onPubSubEmptySpaceUnsafe","take","replayWindow","remaining","message","poll","Empty","pollForItem","loop","pollUpTo","Number","POSITIVE_INFINITY","concat","isArrayNonEmpty","flatMap","item","deferred","Set","add","append","completePollersUnsafe","onInterrupt","remove","void","takeUpTo","max","takeN","takeBetween","min","takeRemainderLoop","acc","bs","push","b","remainingUnsafe","none","some","AbsentValue","Symbol","for","addSubscribers","has","removeSubscribers","SubscriptionImpl","array","publisherIndex","subscriberCount","subscribersIndex","constructor","Array","from","ReplayWindowImpl","emptyReplayWindow","index","offer","offerAll","chunk","fromIterable","n","available","forPubSub","iteratorIndex","publishAllIndex","a","slice","slide","BoundedPubSubArbSubscription","subscriberIndex","unsubscribed","elem","toPoll","builder","pollUpToIndex","mask","BoundedPubSubPow2Subscription","arguments","BoundedPubSubSingleSubscription","publisherHead","next","publisherTail","MAX_SAFE_INTEGER","UnboundedPubSubSubscription","subscriberHead","empty","polled","i","_A","PubSubImpl","Error","publishers","_","last","offerUnsafe","removeUnsafe","keepPolling","publisher","published","doneUnsafe","prepend","strategyCompletePollersUnsafe","strategyCompleteSubscribersUnsafe","iterator","done","filter","_pubsub","_subscribers","_elements","_isShutdown","slidingPublishUnsafe","it","pub","poller","pollResult","pollersSet","head","tail","buffer","fastForward","len","items"],"sources":["../src/PubSub.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,SAASC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAC9C,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,UAAU,MAAM,iBAA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AAM,EAAE;EACflC,OAAO,EAAEA,CAAA,KAAM;CAChB","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"PubSub.js","names":["Arr","Context","Deferred","Effect","Exit","dual","identity","Latch","MutableList","MutableRef","nextPow2","Option","pipeArguments","Scope","TypeId","SubscriptionTypeId","make","options","sync","makePubSubUnsafe","atomicPubSub","Map","makeUnsafe","strategy","bounded","capacity","makeAtomicBounded","BackPressureStrategy","dropping","DroppingStrategy","sliding","SlidingStrategy","unbounded","makeAtomicUnbounded","ensureCapacity","replayBuffer","replay","ReplayBuffer","Math","ceil","undefined","BoundedPubSubSingle","BoundedPubSubPow2","BoundedPubSubArb","UnboundedPubSub","self","pubsub","size","sizeUnsafe","get","shutdownFlag","isFull","map","isEmpty","shutdown","uninterruptible","withFiber","fiber","set","close","scope","interrupt","id","pipe","andThen","when","shutdownHook","open","asVoid","isShutdown","isShutdownUnsafe","current","awaitShutdown","await","publish","value","suspend","succeed","completeSubscribersUnsafe","subscribers","handleSurplus","publishUnsafe","publishAll","elements","surplus","length","subscribe","contextWith","services","localScope","forkUnsafe","subscription","makeSubscriptionUnsafe","addFinalizer","unsubscribe","addFinalizerExit","exit","as","state","forEach","takeAll","pollers","d","interruptWith","discard","concurrency","tap","delete","onPubSubEmptySpaceUnsafe","take","replayWindow","remaining","message","poll","Empty","pollForItem","loop","pollUpTo","Number","POSITIVE_INFINITY","concat","isArrayNonEmpty","flatMap","item","deferred","Set","add","append","completePollersUnsafe","onInterrupt","remove","void","takeUpTo","max","takeN","takeBetween","min","takeRemainderLoop","acc","bs","push","b","remainingUnsafe","none","some","AbsentValue","Symbol","for","addSubscribers","has","removeSubscribers","SubscriptionImpl","array","publisherIndex","subscriberCount","subscribersIndex","constructor","Array","from","ReplayWindowImpl","emptyReplayWindow","index","offer","offerAll","chunk","fromIterable","n","available","forPubSub","iteratorIndex","publishAllIndex","a","slice","slide","BoundedPubSubArbSubscription","subscriberIndex","unsubscribed","elem","toPoll","builder","pollUpToIndex","mask","BoundedPubSubPow2Subscription","arguments","BoundedPubSubSingleSubscription","publisherHead","next","publisherTail","MAX_SAFE_INTEGER","UnboundedPubSubSubscription","subscriberHead","empty","polled","i","_A","PubSubImpl","Error","publishers","_","last","offerUnsafe","removeUnsafe","keepPolling","publisher","published","doneUnsafe","prepend","strategyCompletePollersUnsafe","strategyCompleteSubscribersUnsafe","iterator","done","filter","_pubsub","_subscribers","_elements","_isShutdown","slidingPublishUnsafe","it","pub","poller","pollResult","pollersSet","head","tail","buffer","fastForward","len","items"],"sources":["../src/PubSub.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;AAYA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,SAASC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAC9C,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAC7C,SAASC,QAAQ,QAAQ,aAAa;AACtC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,SAAwBC,aAAa,QAAQ,eAAe;AAC5D,OAAO,KAAKC,KAAK,MAAM,YAAY;AAGnC,MAAMC,MAAM,GAAG,gBAAgB;AA2K/B,MAAMC,kBAAkB,GAAG,6BAA6B;AAmDxD;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMC,IAAI,GACfC,OAGC,IAEDd,MAAM,CAACe,IAAI,CAAC,MACVC,gBAAgB,CACdF,OAAO,CAACG,YAAY,EAAE,EACtB,IAAIC,GAAG,EAAE,EACTR,KAAK,CAACS,UAAU,EAAE,EAClBf,KAAK,CAACe,UAAU,CAAC,KAAK,CAAC,EACvBb,UAAU,CAACO,IAAI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CAACpC,IAAK;IAC3B,OAAO/G,KAAU;EACnB;EACA2D,KAAKA,CAACgC,CAAS;IACb,IAAI,IAAI,CAACvD,SAAS,KAAK,CAAC,EAAE;MACxB,OAAO,EAAE;IACX,CAAC,MAAM,IAAI,IAAI,CAACkD,KAAK,GAAG,IAAI,CAAC+D,MAAM,CAAC/D,KAAK,EAAE;MACzC,IAAI,CAACgE,WAAW,EAAE;IACpB;IACA,MAAMC,GAAG,GAAG5L,IAAI,CAACkG,GAAG,CAAC8B,CAAC,EAAE,IAAI,CAACvD,SAAS,CAAC;IACvC,MAAMoH,KAAK,GAAG,IAAItE,KAAK,CAACqE,GAAG,CAAC;IAC5B,KAAK,IAAIjC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGiC,GAAG,EAAEjC,CAAC,EAAE,EAAE;MAC5B,MAAMtH,KAAK,GAAG,IAAI,CAACmJ,IAAI,CAACnJ,KAAU;MAClC,IAAI,CAACmJ,IAAI,GAAG,IAAI,CAACA,IAAI,CAACpC,IAAK;MAC3ByC,KAAK,CAAClC,CAAC,CAAC,GAAGtH,KAAK;IAClB;IACA,IAAI,CAACoC,SAAS,IAAImH,GAAG;IACrB,OAAOC,KAAK;EACd;EACA/H,OAAOA,CAAA;IACL,OAAO,IAAI,CAACkC,KAAK,CAAC,IAAI,CAACvB,SAAS,CAAC;EACnC;;AAGF,MAAMiD,iBAAiB,GAA+B;EACpDjD,SAAS,EAAE,CAAC;EACZF,IAAI,EAAEA,CAAA,KAAMrE,SAAS;EACrB8F,KAAK,EAAEA,CAAA,KAAM,EAAE;EACflC,OAAO,EAAEA,CAAA,KAAM;CAChB","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Pull.d.ts b/.opencode/node_modules/effect/dist/Pull.d.ts index 45f53d6f14cf3f72e5d59728a6141230fe247781..5766ce7cadfed5f8e909fe5c873b23e1f740cb5a 100644 --- a/.opencode/node_modules/effect/dist/Pull.d.ts +++ b/.opencode/node_modules/effect/dist/Pull.d.ts @@ -1,4 +1,13 @@ /** + * Models one low-level pull step for stream-like consumers. + * + * A `Pull` is an `Effect` that can produce one `A`, fail with an + * ordinary error `E`, or signal end-of-input with `Cause.Done`. The + * separate done signal lets low-level consumers distinguish normal completion + * from failure. This module includes type extractors and helpers for detecting, + * filtering, catching, converting, and matching done signals separately from + * ordinary failures. + * * @since 4.0.0 */ import * as Cause from "./Cause.ts"; @@ -6,113 +15,307 @@ import type { Effect } from "./Effect.ts"; import * as Exit from "./Exit.ts"; import * as Result from "./Result.ts"; /** - * @since 4.0.0 + * An effectful pull step that either produces a value, fails with `E`, or + * signals completion with `Cause.Done`. + * + * **When to use** + * + * Use to model one low-level pull step when a consumer repeatedly evaluates an + * effect that may emit a value, fail normally, or signal normal completion + * through `Cause.Done`. + * + * **Details** + * + * `Pull` represents completion in the error channel so low-level stream + * consumers can distinguish ordinary failures from end-of-input and carry a + * leftover value when needed. + * * @category models + * @since 4.0.0 */ export interface Pull extends Effect, R> { } /** * Extracts the success type from a Pull type. * - * @since 4.0.0 + * **When to use** + * + * Use to derive the value produced by an existing `Pull` when declaring + * reusable type aliases, low-level stream helpers, or function signatures. + * + * @see {@link Error} for extracting the ordinary failure type + * @see {@link Leftover} for extracting the completion leftover type + * @see {@link Services} for extracting the required services type instead + * * @category type extractors + * @since 4.0.0 */ export type Success

= P extends Effect ? _A : never; /** * Extracts the error type from a Pull type, excluding Done errors. * - * @since 4.0.0 + * **When to use** + * + * Use to derive only the ordinary failure type from a `Pull` when declaring + * wrappers or APIs that handle completion separately. + * + * @see {@link Success} for extracting the pulled value type instead + * @see {@link Leftover} for extracting the completion leftover type + * @see {@link Services} for extracting the required services type instead + * @see {@link ExcludeDone} for excluding `Cause.Done` from an error union + * * @category type extractors + * @since 4.0.0 */ export type Error

= P extends Effect ? _E extends Cause.Done ? never : _E : never; /** * Extracts the leftover type from a Pull type. * - * @since 4.0.0 + * **When to use** + * + * Use to derive the completion leftover type from an existing `Pull` when + * declaring reusable type aliases or helper signatures that preserve a pull's + * done value. + * + * @see {@link Success} for extracting the pulled value type instead + * @see {@link Error} for extracting the ordinary failure type, excluding `Cause.Done` + * @see {@link Services} for extracting the required services type instead + * * @category type extractors + * @since 4.0.0 */ export type Leftover

= P extends Effect ? _E extends Cause.Done ? _L : never : never; /** * Extracts the service requirements (context) type from a Pull type. * - * @since 4.0.0 + * **When to use** + * + * Use to derive the context requirements of a generic or inferred `Pull` + * without restating its `R` type parameter. + * + * @see {@link Success} for extracting the pulled value type instead + * @see {@link Error} for extracting the ordinary failure type + * @see {@link Leftover} for extracting the completion leftover type + * * @category type extractors + * @since 4.0.0 */ export type Services

= P extends Effect ? _R : never; /** - * Excludes done errors from an error type union. + * Excludes `Cause.Done` completion signals from an error type union. + * + * **When to use** + * + * Use to describe the ordinary error type that remains after `Cause.Done` + * completion signals have been handled or filtered out of an error union. + * + * @see {@link Error} for extracting ordinary failures from a `Pull` + * @see {@link Leftover} for extracting the completion leftover type * - * @since 4.0.0 * @category type extractors + * @since 4.0.0 */ export type ExcludeDone = Exclude>; /** - * @since 4.0.0 + * Handles `Cause.Done` failures in an effect while leaving ordinary failures + * in the error channel. + * + * **When to use** + * + * Use to recover from a `Cause.Done` completion signal in an effect, such as + * turning a pull leftover value into a successful recovery effect while + * preserving ordinary failures. + * + * **Details** + * + * The handler receives the done leftover value and may recover with a new + * effect. Non-done errors are preserved. + * + * @see {@link matchEffect} for handling success, ordinary failure, and done outcomes explicitly + * @see {@link filterDoneLeftover} for extracting a done leftover from an existing `Cause` + * * @category Done + * @since 4.0.0 */ export declare const catchDone: { /** - * @since 4.0.0 + * Handles `Cause.Done` failures in an effect while leaving ordinary failures + * in the error channel. + * + * **When to use** + * + * Use to recover from a `Cause.Done` completion signal in an effect, such as + * turning a pull leftover value into a successful recovery effect while + * preserving ordinary failures. + * + * **Details** + * + * The handler receives the done leftover value and may recover with a new + * effect. Non-done errors are preserved. + * + * @see {@link matchEffect} for handling success, ordinary failure, and done outcomes explicitly + * @see {@link filterDoneLeftover} for extracting a done leftover from an existing `Cause` + * * @category Done + * @since 4.0.0 */ (f: (leftover: Cause.Done.Extract) => Effect): (self: Effect) => Effect | E2, R | R2>; /** - * @since 4.0.0 + * Handles `Cause.Done` failures in an effect while leaving ordinary failures + * in the error channel. + * + * **When to use** + * + * Use to recover from a `Cause.Done` completion signal in an effect, such as + * turning a pull leftover value into a successful recovery effect while + * preserving ordinary failures. + * + * **Details** + * + * The handler receives the done leftover value and may recover with a new + * effect. Non-done errors are preserved. + * + * @see {@link matchEffect} for handling success, ordinary failure, and done outcomes explicitly + * @see {@link filterDoneLeftover} for extracting a done leftover from an existing `Cause` + * * @category Done + * @since 4.0.0 */ (self: Effect, f: (leftover: Cause.Done.Extract) => Effect): Effect | E2, R | R2>; }; /** - * Checks if a Cause contains any done errors. + * Checks whether a Cause contains any done errors. + * + * **When to use** + * + * Use when you need to test whether a pull failure cause represents normal + * completion and only need a boolean result. + * + * @see {@link isDoneFailure} for checking a single `Cause.Reason` + * @see {@link filterDone} for extracting the `Cause.Done` value from a `Cause` + * @see {@link filterNoDone} for selecting causes with no done failures * - * @since 4.0.0 * @category Done + * @since 4.0.0 */ export declare const isDoneCause: (cause: Cause.Cause) => boolean; /** - * Checks if a Cause failure is a done error. + * Checks whether a `Cause.Reason` is a `Fail` reason whose error is a + * `Cause.Done` signal. + * + * **When to use** + * + * Use when you need to identify done completion reasons while traversing + * `cause.reasons`, before handling ordinary failures. + * + * @see {@link isDoneCause} for checking an entire `Cause` for any done reason + * @see {@link filterDone} for extracting the `Cause.Done` value from a `Cause` * - * @since 4.0.0 * @category Done + * @since 4.0.0 */ export declare const isDoneFailure: (failure: Cause.Reason) => failure is Cause.Fail>; /** - * Filters a Cause to extract only halt errors. + * Finds a `Cause.Done` failure in a `Cause`. + * + * **When to use** + * + * Use to separate `Cause.Done` completion from ordinary causes while preserving + * the typed done value. + * + * **Details** + * + * Returns a successful `Result` with the `Cause.Done` value when one is + * present, otherwise returns a failed `Result` containing the non-done cause. * - * @since 4.0.0 * @category Done + * @since 4.0.0 */ export declare const filterDone: (input: Cause.Cause) => Result.Result, Cause.Cause>>; /** - * Filters a Cause to extract only halt errors. + * Finds a `Cause.Done` failure in a cause whose done value is not used. + * + * **When to use** + * + * Use to detect `Cause.Done` completion in a `Cause` when the completion value + * is not part of the downstream logic. + * + * **Details** + * + * Returns a successful `Result` with the done marker when present, otherwise + * returns a failed `Result` with the non-done cause. + * + * @see {@link filterDone} for preserving the typed `Cause.Done` value when the done payload matters + * @see {@link filterDoneLeftover} for extracting only the done leftover value + * @see {@link filterNoDone} for the inverse filter that succeeds only when no done failure is present * - * @since 4.0.0 * @category Done + * @since 4.0.0 */ export declare const filterDoneVoid: (input: Cause.Cause) => Result.Result>>; /** - * @since 4.0.0 + * Keeps a `Cause` only when it contains no `Cause.Done` failures. + * + * **When to use** + * + * Use to select ordinary failure causes for handling while leaving `Cause.Done` + * completion causes outside that handler. + * + * **Details** + * + * Returns a successful `Result` with the cause when every failure is non-done; + * otherwise returns a failed `Result` with the original cause. + * + * @see {@link filterDone} for the inverse typed done filter + * @see {@link filterDoneVoid} for done detection when the payload is not needed + * * @category Done + * @since 4.0.0 */ export declare const filterNoDone: (input: Cause.Cause) => Result.Result>, Cause.Cause>; /** * Filters a Cause to extract the leftover value from done errors. * - * @since 4.0.0 + * **When to use** + * + * Use to extract only the leftover value carried by a `Cause.Done` completion + * signal. + * * @category Done + * @since 4.0.0 */ export declare const filterDoneLeftover: (cause: Cause.Cause) => Result.Result, Cause.Cause>>; /** - * Converts a Cause into an Exit, extracting halt leftovers as success values. + * Converts a `Cause` into an `Exit`, treating `Cause.Done` as successful + * completion. + * + * **When to use** + * + * Use to produce an `Exit` for finalizing a low-level pull workflow when a + * `Cause.Done` signal should be treated as success and any remaining cause + * should fail. + * + * **Details** + * + * If the cause contains a done value, that leftover becomes the successful + * value. Otherwise the non-done cause becomes the failure cause. + * + * @see {@link filterDone} for extracting the done signal without converting the cause to an `Exit` + * @see {@link matchEffect} for handling `Pull` success, failure, and done outcomes directly * - * @since 4.0.0 * @category Done + * @since 4.0.0 */ export declare const doneExitFromCause: (cause: Cause.Cause) => Exit.Exit, ExcludeDone>; /** * Pattern matches on a Pull, handling success, failure, and done cases. * - * @example + * **When to use** + * + * Use to handle all three `Pull` outcomes with effectful handlers. + * + * **Example** (Matching Pull outcomes) + * * ```ts * import { Cause, Effect, Pull } from "effect" * @@ -125,14 +328,19 @@ export declare const doneExitFromCause: (cause: Cause.Cause) => Exit.Exit< * }) * ``` * - * @since 4.0.0 * @category pattern matching + * @since 4.0.0 */ export declare const matchEffect: { /** * Pattern matches on a Pull, handling success, failure, and done cases. * - * @example + * **When to use** + * + * Use to handle all three `Pull` outcomes with effectful handlers. + * + * **Example** (Matching Pull outcomes) + * * ```ts * import { Cause, Effect, Pull } from "effect" * @@ -145,8 +353,8 @@ export declare const matchEffect: { * }) * ``` * - * @since 4.0.0 * @category pattern matching + * @since 4.0.0 */ (options: { readonly onSuccess: (value: A) => Effect; @@ -156,7 +364,12 @@ export declare const matchEffect: { /** * Pattern matches on a Pull, handling success, failure, and done cases. * - * @example + * **When to use** + * + * Use to handle all three `Pull` outcomes with effectful handlers. + * + * **Example** (Matching Pull outcomes) + * * ```ts * import { Cause, Effect, Pull } from "effect" * @@ -169,8 +382,8 @@ export declare const matchEffect: { * }) * ``` * - * @since 4.0.0 * @category pattern matching + * @since 4.0.0 */ (self: Pull, options: { readonly onSuccess: (value: A) => Effect; diff --git a/.opencode/node_modules/effect/dist/Pull.d.ts.map b/.opencode/node_modules/effect/dist/Pull.d.ts.map index 3c68954e324f0b9664ed09d273659b583c2f40b7..8b027645a7e06217b85db95c2978841c24d55dc4 100644 --- a/.opencode/node_modules/effect/dist/Pull.d.ts.map +++ b/.opencode/node_modules/effect/dist/Pull.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Pull.d.ts","sourceRoot":"","sources":["../src/Pull.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO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AC,KAAK,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;QACpD,QAAQ,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;QACnE,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;KACrD,GACA,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAA;CAYpD,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Pull.js b/.opencode/node_modules/effect/dist/Pull.js index c747d8578d0ba556d4da3fd87479fff80603550a..654d307e6235d91d7aa30abb24344daa8d6fe4f1 100644 --- a/.opencode/node_modules/effect/dist/Pull.js +++ b/.opencode/node_modules/effect/dist/Pull.js @@ -1,4 +1,13 @@ /** + * Models one low-level pull step for stream-like consumers. + * + * A `Pull` is an `Effect` that can produce one `A`, fail with an + * ordinary error `E`, or signal end-of-input with `Cause.Done`. The + * separate done signal lets low-level consumers distinguish normal completion + * from failure. This module includes type extractors and helpers for detecting, + * filtering, catching, converting, and matching done signals separately from + * ordinary failures. + * * @since 4.0.0 */ import * as Cause from "./Cause.js"; @@ -11,55 +20,149 @@ import * as Result from "./Result.js"; // Done // ----------------------------------------------------------------------------- /** - * @since 4.0.0 + * Handles `Cause.Done` failures in an effect while leaving ordinary failures + * in the error channel. + * + * **When to use** + * + * Use to recover from a `Cause.Done` completion signal in an effect, such as + * turning a pull leftover value into a successful recovery effect while + * preserving ordinary failures. + * + * **Details** + * + * The handler receives the done leftover value and may recover with a new + * effect. Non-done errors are preserved. + * + * @see {@link matchEffect} for handling success, ordinary failure, and done outcomes explicitly + * @see {@link filterDoneLeftover} for extracting a done leftover from an existing `Cause` + * * @category Done + * @since 4.0.0 */ export const catchDone = /*#__PURE__*/dual(2, (effect, f) => internalEffect.catchCauseFilter(effect, filterDoneLeftover, l => f(l))); /** - * Checks if a Cause contains any done errors. + * Checks whether a Cause contains any done errors. + * + * **When to use** + * + * Use when you need to test whether a pull failure cause represents normal + * completion and only need a boolean result. + * + * @see {@link isDoneFailure} for checking a single `Cause.Reason` + * @see {@link filterDone} for extracting the `Cause.Done` value from a `Cause` + * @see {@link filterNoDone} for selecting causes with no done failures * - * @since 4.0.0 * @category Done + * @since 4.0.0 */ export const isDoneCause = cause => cause.reasons.some(isDoneFailure); /** - * Checks if a Cause failure is a done error. + * Checks whether a `Cause.Reason` is a `Fail` reason whose error is a + * `Cause.Done` signal. + * + * **When to use** + * + * Use when you need to identify done completion reasons while traversing + * `cause.reasons`, before handling ordinary failures. + * + * @see {@link isDoneCause} for checking an entire `Cause` for any done reason + * @see {@link filterDone} for extracting the `Cause.Done` value from a `Cause` * - * @since 4.0.0 * @category Done + * @since 4.0.0 */ export const isDoneFailure = failure => failure._tag === "Fail" && Cause.isDone(failure.error); /** - * Filters a Cause to extract only halt errors. + * Finds a `Cause.Done` failure in a `Cause`. + * + * **When to use** + * + * Use to separate `Cause.Done` completion from ordinary causes while preserving + * the typed done value. + * + * **Details** + * + * Returns a successful `Result` with the `Cause.Done` value when one is + * present, otherwise returns a failed `Result` containing the non-done cause. * - * @since 4.0.0 * @category Done + * @since 4.0.0 */ export const filterDone = /*#__PURE__*/Filter.composePassthrough(Cause.findError, e => Cause.isDone(e) ? Result.succeed(e) : Result.fail(e)); /** - * Filters a Cause to extract only halt errors. + * Finds a `Cause.Done` failure in a cause whose done value is not used. + * + * **When to use** + * + * Use to detect `Cause.Done` completion in a `Cause` when the completion value + * is not part of the downstream logic. + * + * **Details** + * + * Returns a successful `Result` with the done marker when present, otherwise + * returns a failed `Result` with the non-done cause. + * + * @see {@link filterDone} for preserving the typed `Cause.Done` value when the done payload matters + * @see {@link filterDoneLeftover} for extracting only the done leftover value + * @see {@link filterNoDone} for the inverse filter that succeeds only when no done failure is present * - * @since 4.0.0 * @category Done + * @since 4.0.0 */ export const filterDoneVoid = /*#__PURE__*/Filter.composePassthrough(Cause.findError, e => Cause.isDone(e) ? Result.succeed(e) : Result.fail(e)); /** - * @since 4.0.0 + * Keeps a `Cause` only when it contains no `Cause.Done` failures. + * + * **When to use** + * + * Use to select ordinary failure causes for handling while leaving `Cause.Done` + * completion causes outside that handler. + * + * **Details** + * + * Returns a successful `Result` with the cause when every failure is non-done; + * otherwise returns a failed `Result` with the original cause. + * + * @see {@link filterDone} for the inverse typed done filter + * @see {@link filterDoneVoid} for done detection when the payload is not needed + * * @category Done + * @since 4.0.0 */ export const filterNoDone = /*#__PURE__*/Filter.fromPredicate(cause => cause.reasons.every(failure => !isDoneFailure(failure))); /** * Filters a Cause to extract the leftover value from done errors. * - * @since 4.0.0 + * **When to use** + * + * Use to extract only the leftover value carried by a `Cause.Done` completion + * signal. + * * @category Done + * @since 4.0.0 */ export const filterDoneLeftover = /*#__PURE__*/Filter.composePassthrough(Cause.findError, e => Cause.isDone(e) ? Result.succeed(e.value) : Result.fail(e)); /** - * Converts a Cause into an Exit, extracting halt leftovers as success values. + * Converts a `Cause` into an `Exit`, treating `Cause.Done` as successful + * completion. + * + * **When to use** + * + * Use to produce an `Exit` for finalizing a low-level pull workflow when a + * `Cause.Done` signal should be treated as success and any remaining cause + * should fail. + * + * **Details** + * + * If the cause contains a done value, that leftover becomes the successful + * value. Otherwise the non-done cause becomes the failure cause. + * + * @see {@link filterDone} for extracting the done signal without converting the cause to an `Exit` + * @see {@link matchEffect} for handling `Pull` success, failure, and done outcomes directly * - * @since 4.0.0 * @category Done + * @since 4.0.0 */ export const doneExitFromCause = cause => { const halt = filterDone(cause); @@ -68,7 +171,12 @@ export const doneExitFromCause = cause => { /** * Pattern matches on a Pull, handling success, failure, and done cases. * - * @example + * **When to use** + * + * Use to handle all three `Pull` outcomes with effectful handlers. + * + * **Example** (Matching Pull outcomes) + * * ```ts * import { Cause, Effect, Pull } from "effect" * @@ -81,8 +189,8 @@ export const doneExitFromCause = cause => { * }) * ``` * - * @since 4.0.0 * @category pattern matching + * @since 4.0.0 */ export const matchEffect = /*#__PURE__*/dual(2, (self, options) => internalEffect.matchCauseEffect(self, { onSuccess: options.onSuccess, diff --git a/.opencode/node_modules/effect/dist/Pull.js.map b/.opencode/node_modules/effect/dist/Pull.js.map index b6e3186bb9c36a998aa98d93786738ae76d9bce4..f4678c5506e334edc817b82de24d52460f752545 100644 --- a/.opencode/node_modules/effect/dist/Pull.js.map +++ b/.opencode/node_modules/effect/dist/Pull.js.map @@ -1 +1 @@ -{"version":3,"file":"Pull.js","names":["Cause","Exit","Filter","dual","internalEffect","Result","catchDone","effect","f","catchCauseFilter","filterDoneLeftover","l","isDoneCause","cause","reasons","some","isDoneFailure","failure","_tag","isDone","error","filterDone","composePassthrough","findError","e","succeed","fail","filterDoneVoid","filterNoDone","fromPredicate","every","value","doneExitFromCause","halt","isFailure","success","failCause","matchEffect","self","options","matchCauseEffect","onSuccess","onFailure","onDone"],"sources":["../src/Pull.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,KAAK,MAAM,YAAY;AAEnC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AACtD,OAAO,KAAKC,MAAM,MAAM,aAAa;AAoDrC;AACA;AACA;AAEA;;;;AAIA,OAAO,MAAMC,SAAS,gBAwBlBH,IAAI,CAAC,CAAC,EAAE,CACVI,MAAuB,EACvBC,CAA0D,KAE1DJ,cAAc,CAACK,gBAAgB,CAACF,MAAM,EAAEG,kBAAyB,EAAGC,CAAM,IAAKH,CAAC,CAACG,CAAC,CAAC,CAAQ,CAAC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AO,MAAMQ,iBAAiB,GAAOnB,KAAqB,IAAsD;EAC9G,MAAMoB,IAAI,GAAGZ,UAAU,CAACR,KAAK,CAAC;EAC9B,OAAO,CAACR,MAAM,CAAC6B,SAAS,CAACD,IAAI,CAAC,GAAGhC,IAAI,CAACwB,OAAO,CAACQ,IAAI,CAACE,OAAO,CAACJ,KAAY,CAAC,GAAG9B,IAAI,CAACmC,SAAS,CAACH,IAAI,CAAChB,OAAO,CAAC;AACzG,CAAC;AAED;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMoB,WAAW,gBAsDpBlC,IAAI,CAAC,CAAC,EAAE,CAAiDmC,IAAsB,EAAEC,OAIpF,KACCnC,cAAc,CAACoC,gBAAgB,CAACF,IAAI,EAAE;EACpCG,SAAS,EAAEF,OAAO,CAACE,SAAS;EAC5BC,SAAS,EAAG7B,KAAK,IAAsD;IACrE,MAAMoB,IAAI,GAAGZ,UAAU,CAACR,KAAK,CAAC;IAC9B,OAAO,CAACR,MAAM,CAAC6B,SAAS,CAACD,IAAI,CAAC,GAAGM,OAAO,CAACI,MAAM,CAACV,IAAI,CAACE,OAAO,CAACJ,KAAU,CAAC,GAAGQ,OAAO,CAACG,SAAS,CAACT,IAAI,CAAChB,OAAO,CAAC;EAC5G;CACD,CAAC,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Pull.js","names":["Cause","Exit","Filter","dual","internalEffect","Result","catchDone","effect","f","catchCauseFilter","filterDoneLeftover","l","isDoneCause","cause","reasons","some","isDoneFailure","failure","_tag","isDone","error","filterDone","composePassthrough","findError","e","succeed","fail","filterDoneVoid","filterNoDone","fromPredicate","every","value","doneExitFromCause","halt","isFailure","success","failCause","matchEffect","self","options","matchCauseEffect","onSuccess","onFailure","onDone"],"sources":["../src/Pull.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;AAYA,OAAO,KAAKA,KAAK,MAAM,YAAY;AAEnC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,O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G,SAAS,CAACT,IAAI,CAAChB,OAAO,CAAC;EAC5G;CACD,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Queue.d.ts b/.opencode/node_modules/effect/dist/Queue.d.ts index 2297871e17ce998105b358abbd80b2b7d508c92c..a36344f36bd7ed9b2de0b6092cb2ccdb6899be3d 100644 --- a/.opencode/node_modules/effect/dist/Queue.d.ts +++ b/.opencode/node_modules/effect/dist/Queue.d.ts @@ -1,4 +1,11 @@ /** + * Passes values asynchronously between fibers. + * + * A `Queue` accepts values, hands each value to one consumer in offer + * order, and can complete, fail, interrupt, or shut down. Queues can be bounded + * or unbounded, and bounded queues can suspend, drop, or slide values when + * producers are faster than consumers. + * * @since 3.8.0 */ import * as Arr from "./Array.ts"; @@ -17,53 +24,114 @@ declare const DequeueTypeId = "~effect/Queue/Dequeue"; /** * Type guard to check if a value is a Queue. * - * @since 3.8.0 - * @category Guards + * **When to use** + * + * Use to narrow an unknown value to a full `Queue` before passing it to APIs + * that need both offering and taking capabilities. + * + * @see {@link isEnqueue} for checking values that only need write access + * @see {@link isDequeue} for checking values that only need read access + * + * @category guards + * @since 2.0.0 */ export declare const isQueue: (u: unknown) => u is Queue; /** * Type guard to check if a value is an Enqueue. * - * @since 4.0.0 - * @category Guards + * **When to use** + * + * Use to narrow an unknown value before calling queue operations that require + * write-side access. + * + * **Gotchas** + * + * A full `Queue` also satisfies this guard because every queue includes the + * enqueue side. + * + * @see {@link isQueue} for checking for a full read-write queue handle + * @see {@link isDequeue} for checking for the read side of a queue + * @see {@link asEnqueue} for narrowing an existing `Queue` to its write-only interface + * + * @category guards + * @since 2.0.0 */ export declare const isEnqueue: (u: unknown) => u is Enqueue; /** * Type guard to check if a value is a Dequeue. * - * @since 4.0.0 - * @category Guards + * **When to use** + * + * Use to narrow an unknown value before passing it to read-side queue + * operations. + * + * @see {@link Dequeue} for the read-side queue handle checked by this guard + * @see {@link isQueue} for checking for a full read-write queue handle + * @see {@link isEnqueue} for checking for the write side of a queue + * @see {@link asDequeue} for narrowing an existing `Queue` to its read-only interface + * + * @category guards + * @since 2.0.0 */ export declare const isDequeue: (u: unknown) => u is Dequeue; /** - * Converts a Queue to an Enqueue (write-only interface). + * Converts a `Queue` to its write-only `Enqueue` interface. + * + * **When to use** + * + * Use to expose only the producer side of a `Queue` to code that should offer + * values or signal queue lifecycle. + * + * **Gotchas** * + * This is a type-level capability restriction. It returns the same queue + * object, so it does not hide read operations at runtime. + * + * @see {@link asDequeue} for exposing only the read side of a `Queue` + * @see {@link Enqueue} for the write-only queue handle returned by this conversion + * + * @category converting * @since 4.0.0 - * @category Conversions */ export declare const asEnqueue: (self: Queue) => Enqueue; /** - * Convert a Queue to a Dequeue, allowing only read operations. + * Narrows a `Queue` to a `Dequeue`, exposing the consumer side of the queue. + * + * **When to use** + * + * Use to pass a queue to code that should consume values while keeping + * producer-side operations out of that code's TypeScript type. + * + * **Gotchas** + * + * This is a type-level narrowing operation. It returns the same queue object + * and does not create a runtime wrapper. + * + * @see {@link asEnqueue} for narrowing a queue to its producer side + * @see {@link Dequeue} for the consumer-side queue handle returned by this function * + * @category converting * @since 4.0.0 - * @category Conversions */ export declare const asDequeue: (self: Queue) => Dequeue; /** * An `Enqueue` is a queue that can be offered to. * + * **Details** + * * This interface represents the write-only part of a Queue, allowing you to offer * elements to the queue but not take elements from it. * - * @example + * **Example** (Offering through enqueue handles) + * * ```ts * import { Effect, Queue } from "effect" * * // Function that only needs write access to a queue * const producer = (enqueue: Queue.Enqueue) => * Effect.gen(function*() { - * yield* Queue.offer(enqueue as Queue.Queue, "hello") - * yield* Queue.offerAll(enqueue as Queue.Queue, ["world", "!"]) + * yield* Queue.offer(enqueue, "hello") + * yield* Queue.offerAll(enqueue, ["world", "!"]) * }) * * const program = Effect.gen(function*() { @@ -72,8 +140,8 @@ export declare const asDequeue: (self: Queue) => Dequeue; * }) * ``` * - * @since 4.0.0 - * @category Models + * @category models + * @since 2.0.0 */ export interface Enqueue extends Inspectable { readonly [EnqueueTypeId]: Enqueue.Variance; @@ -85,15 +153,23 @@ export interface Enqueue extends Inspectable { scheduleRunning: boolean; } /** - * @since 4.0.0 - * @category Models + * Companion namespace containing type-level metadata for the `Enqueue` + * write-only queue interface. + * + * @since 2.0.0 */ export declare namespace Enqueue { /** - * Variance interface for Enqueue types, defining the type parameter constraints. + * Type-level variance marker for `Enqueue`. * + * **Details** + * + * `Enqueue` is contravariant in both its offered value type `A` and failure + * type `E`, because values and failures flow into the queue through this + * handle. + * + * @category models * @since 4.0.0 - * @category Models */ interface Variance { _A: Types.Contravariant; @@ -103,12 +179,15 @@ export declare namespace Enqueue { /** * A `Dequeue` is a queue that can be taken from. * + * **Details** + * * This interface represents the read-only part of a Queue, allowing you to take * elements from the queue but not offer elements to it. * - * @example + * **Example** (Taking through dequeue handles) + * * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(10) @@ -125,8 +204,8 @@ export declare namespace Enqueue { * }) * ``` * - * @since 3.8.0 - * @category Models + * @category models + * @since 2.0.0 */ export interface Dequeue extends Inspectable { readonly [DequeueTypeId]: Dequeue.Variance; @@ -138,15 +217,22 @@ export interface Dequeue extends Inspectable { scheduleRunning: boolean; } /** - * @since 4.0.0 - * @category Models + * Companion namespace containing type-level metadata for the `Dequeue` + * read-only queue interface. + * + * @since 2.0.0 */ export declare namespace Dequeue { /** - * Variance interface for Dequeue types, defining the type parameter constraints. + * Type-level variance marker for `Dequeue`. * - * @since 3.8.0 - * @category Models + * **Details** + * + * `Dequeue` is covariant in both the taken value type `A` and failure type + * `E`, because values and failures are observed through this handle. + * + * @category models + * @since 4.0.0 */ interface Variance { _A: Types.Covariant; @@ -156,17 +242,14 @@ export declare namespace Dequeue { /** * A `Queue` is an asynchronous queue that can be offered to and taken from. * - * It also supports signaling that it is done or failed. - * - * **Previously Known As** + * **Details** * - * This API replaces the following from Effect 3.x: + * It also supports signaling that it is done or failed. * - * - `Mailbox` + * **Example** (Offering and taking queue values) * - * @example * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * // Create a bounded queue @@ -185,32 +268,46 @@ export declare namespace Dequeue { * }) * ``` * - * @since 3.8.0 - * @category Models + * @category models + * @since 2.0.0 */ export interface Queue extends Enqueue, Dequeue { readonly [TypeId]: Queue.Variance; } /** - * @since 3.8.0 - * @category Models + * Companion namespace containing type-level metadata and low-level state types + * for `Queue`. + * + * @since 2.0.0 */ export declare namespace Queue { /** - * Variance interface for Queue types, defining the type parameter constraints. + * Type-level variance marker for `Queue`. + * + * **Details** * - * @since 3.8.0 - * @category Models + * A full `Queue` is invariant in both `A` and `E` because the same handle can + * both produce and consume values and failures. + * + * @category models + * @since 4.0.0 */ interface Variance { _A: Types.Invariant; _E: Types.Invariant; } /** - * Represents the internal state of a Queue. + * Tagged state of a `Queue`. + * + * **Details** + * + * `Open` queues can accept offers and takers, `Closing` queues are + * completing with a stored failure exit, and `Done` queues have finished. + * This is low-level metadata exposed by the queue model; most users should + * inspect queues through the public operations. * + * @category models * @since 4.0.0 - * @category Models */ type State = { readonly _tag: "Open"; @@ -228,10 +325,16 @@ export declare namespace Queue { readonly exit: Failure; }; /** - * Represents an entry in the queue's offer buffer. + * Represents a suspended offer waiting to be admitted to a bounded queue. * + * **Details** + * + * An entry is either a single message or a batch with an offset into its + * remaining messages, plus a resume callback that completes the suspended + * offer when the queue can accept more input. + * + * @category models * @since 4.0.0 - * @category Models */ type OfferEntry = { readonly _tag: "Array"; @@ -245,22 +348,19 @@ export declare namespace Queue { }; } /** - * A `Queue` is an asynchronous queue that can be offered to and taken from. + * Creates a `Queue` with optional capacity and overflow strategy. * - * It also supports signaling that it is done or failed. + * **Details** * - * **Previously Known As** + * By default the queue is unbounded and uses the `"suspend"` strategy. Provide + * `capacity` for a bounded queue and choose `"suspend"`, `"dropping"`, or + * `"sliding"` to control what happens when the queue is full. The returned + * queue can be offered to, taken from, failed, ended, interrupted, or shut down. * - * This API replaces the following from Effect 3.x: + * **Example** (Creating queues) * - * - `Mailbox.make` - * - * @since 3.8.0 - * @category Constructors - * @example * ```ts * import { Cause, Effect, Queue } from "effect" - * import * as assert from "node:assert" * * Effect.gen(function*() { * const queue = yield* Queue.make() @@ -272,17 +372,22 @@ export declare namespace Queue { * * // take messages from the queue * const messages = yield* Queue.takeAll(queue) - * assert.deepStrictEqual(messages, [1, 2, 3, 4, 5]) + * console.log(messages) // [1, 2, 3, 4, 5] * * // signal that the queue is done * yield* Queue.end(queue) - * const done = yield* Effect.flip(Queue.takeAll(queue)) - * assert.deepStrictEqual(done, Cause.Done) + * const done = yield* Effect.flip(Queue.take(queue)) + * console.log(Cause.isDone(done)) // true * - * // signal that the queue has failed - * yield* Queue.fail(queue, "boom") + * // signal that another queue has failed + * const failedQueue = yield* Queue.make() + * const failed = yield* Queue.fail(failedQueue, "boom") + * console.log(failed) // true * }) * ``` + * + * @category constructors + * @since 4.0.0 */ export declare const make: (options?: { readonly capacity?: number | undefined; @@ -291,12 +396,15 @@ export declare const make: (options?: { /** * Creates a bounded queue with the specified capacity that uses backpressure strategy. * + * **Details** + * * When the queue reaches capacity, producers will be suspended until space becomes available. * This ensures all messages are processed but may slow down producers. * - * @example + * **Example** (Creating bounded queues) + * * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(5) @@ -310,20 +418,23 @@ export declare const make: (options?: { * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export declare const bounded: (capacity: number) => Effect>; /** * Creates a bounded queue with sliding strategy. When the queue reaches capacity, * new elements are added and the oldest elements are dropped. * - * This strategy prevents producers from being blocked but may result in message loss. - * Useful when you want to maintain a rolling window of the most recent messages. + * **When to use** + * + * Use when you need producer offers not to block and can accept dropping the + * oldest messages, such as when maintaining a rolling window of recent values. + * + * **Example** (Creating sliding queues) * - * @example * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.sliding(3) @@ -341,20 +452,23 @@ export declare const bounded: (capacity: number) => Effect(capacity: number) => Effect>; /** * Creates a bounded queue with dropping strategy. When the queue reaches capacity, * new elements are dropped and the offer operation returns false. * - * This strategy prevents producers from being blocked and preserves existing messages, - * but new messages may be lost when the queue is full. + * **When to use** + * + * Use when you need producer offers not to block while preserving existing + * queued messages, even if new messages may be dropped when the queue is full. + * + * **Example** (Creating dropping queues) * - * @example * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.dropping(2) @@ -373,20 +487,22 @@ export declare const sliding: (capacity: number) => Effect(capacity: number) => Effect>; /** * Creates an unbounded queue that can grow to any size without blocking producers. * - * Unlike bounded queues, unbounded queues never apply backpressure - producers - * can always add messages successfully. This is useful when you want to prioritize - * producer throughput over memory usage control. + * **When to use** + * + * Use when you need producers to add messages without backpressure and accept + * unbounded memory growth. + * + * **Example** (Creating unbounded queues) * - * @example * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.unbounded() @@ -398,7 +514,7 @@ export declare const dropping: (capacity: number) => Effect(capacity: number) => Effect() => Effect>; /** - * Add a message to the queue. Returns `false` if the queue is done. + * Adds a message to the queue. Returns `false` if the queue is done. + * + * **Details** * * For bounded queues, this operation may suspend if the queue is at capacity, * depending on the backpressure strategy. For dropping/sliding queues, it may * return false or succeed immediately by dropping/sliding existing messages. * - * @example + * **Example** (Offering a value) + * * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(3) @@ -436,16 +555,24 @@ export declare const unbounded: () => Effect>; * ``` * * @category Offering - * @since 4.0.0 + * @since 2.0.0 */ export declare const offer: (self: Enqueue, message: Types.NoInfer) => Effect; /** - * Add a message to the queue synchronously. Returns `false` if the queue is done. + * Adds a message to the queue synchronously. Returns `false` if the queue is done. + * + * **When to use** + * + * Use when you are already in synchronous queue internals or a performance + * boundary where wrapping the mutation in `Effect` is intentionally avoided. + * + * **Gotchas** * * This is an unsafe operation that directly modifies the queue without Effect wrapping. * Use this only when you're certain about the synchronous nature of the operation. * - * @example + * **Example** (Offering a value synchronously) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -469,37 +596,53 @@ export declare const offer: (self: Enqueue, message: Types.NoInfer(self: Enqueue, message: Types.NoInfer) => boolean; /** - * Add multiple messages to the queue. Returns the remaining messages that + * Adds multiple messages to the queue. Returns the remaining messages that * were not added. * + * **When to use** + * + * Use when producers can submit a batch at once and need to know which messages + * did not fit under the queue's capacity strategy. + * + * **Details** + * * For bounded queues, this operation may suspend if the queue doesn't have * enough capacity. The operation returns an array of messages that couldn't * be added (empty array means all messages were successfully added). * - * @example + * **Example** (Offering multiple values) + * * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { - * const queue = yield* Queue.bounded(3) + * const queue = yield* Queue.dropping(3) * - * // Try to add more messages than capacity + * // Try to add more messages than capacity without suspending * const remaining1 = yield* Queue.offerAll(queue, [1, 2, 3, 4, 5]) * console.log(remaining1) // [4, 5] - couldn't fit the last 2 * }) * ``` * * @category Offering - * @since 4.0.0 + * @since 2.0.0 */ export declare const offerAll: (self: Enqueue, messages: Iterable) => Effect>; /** - * Add multiple messages to the queue synchronously. Returns the remaining messages that + * Adds multiple messages to the queue synchronously. Returns the remaining messages that * were not added. * + * **When to use** + * + * Use when queue internals or a performance boundary need a synchronous batch + * offer and can handle any messages that do not fit. + * + * **Gotchas** + * * This is an unsafe operation that directly modifies the queue without Effect wrapping. * - * @example + * **Example** (Offering multiple values synchronously) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -522,151 +665,159 @@ export declare const offerAll: (self: Enqueue, messages: Iterable */ export declare const offerAllUnsafe: (self: Enqueue, messages: Iterable) => Array; /** - * Fail the queue with an error. If the queue is already done, `false` is + * Fails the queue with an error. If the queue is already done, `false` is * returned. * - * @example + * **Example** (Failing queues with an error) + * * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(10) * - * // Add some messages - * yield* Queue.offer(queue, 1) - * yield* Queue.offer(queue, 2) - * * // Fail the queue with an error * const failed = yield* Queue.fail(queue, "Something went wrong") * console.log(failed) // true * - * // Subsequent operations will reflect the failure - * // Taking from failed queue will fail with the error + * // Taking from the failed queue fails with the error + * const error = yield* Effect.flip(Queue.take(queue)) + * console.log(error) // "Something went wrong" * }) * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ export declare const fail: (self: Enqueue, error: E) => Effect; /** - * Fail the queue with a cause. If the queue is already done, `false` is + * Fails the queue with a cause. If the queue is already done, `false` is * returned. * - * @example + * **Example** (Failing queues with a cause) + * * ```ts * import { Cause, Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(10) * - * // Add some messages - * yield* Queue.offer(queue, 1) - * * // Create a cause and fail the queue * const cause = Cause.fail("Queue processing failed") * const failed = yield* Queue.failCause(queue, cause) * console.log(failed) // true * - * // The queue is now in failed state with the specified cause + * // The queue is now done with the specified failure cause + * console.log(queue.state._tag) // "Done" * }) * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ export declare const failCause: { /** - * Fail the queue with a cause. If the queue is already done, `false` is + * Fails the queue with a cause. If the queue is already done, `false` is * returned. * - * @example + * **Example** (Failing queues with a cause) + * * ```ts * import { Cause, Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(10) * - * // Add some messages - * yield* Queue.offer(queue, 1) - * * // Create a cause and fail the queue * const cause = Cause.fail("Queue processing failed") * const failed = yield* Queue.failCause(queue, cause) * console.log(failed) // true * - * // The queue is now in failed state with the specified cause + * // The queue is now done with the specified failure cause + * console.log(queue.state._tag) // "Done" * }) * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ (cause: Cause): (self: Enqueue) => Effect; /** - * Fail the queue with a cause. If the queue is already done, `false` is + * Fails the queue with a cause. If the queue is already done, `false` is * returned. * - * @example + * **Example** (Failing queues with a cause) + * * ```ts * import { Cause, Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(10) * - * // Add some messages - * yield* Queue.offer(queue, 1) - * * // Create a cause and fail the queue * const cause = Cause.fail("Queue processing failed") * const failed = yield* Queue.failCause(queue, cause) * console.log(failed) // true * - * // The queue is now in failed state with the specified cause + * // The queue is now done with the specified failure cause + * console.log(queue.state._tag) // "Done" * }) * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ (self: Enqueue, cause: Cause): Effect; }; /** - * Fail the queue with a cause synchronously. If the queue is already done, `false` is + * Fails the queue with a cause synchronously. If the queue is already done, `false` is * returned. * + * **When to use** + * + * Use when queue completion must be driven from synchronous internals while + * preserving the full failure `Cause`. + * + * **Gotchas** + * * This is an unsafe operation that directly modifies the queue without Effect wrapping. * - * @example + * **Example** (Failing queues with a cause synchronously) + * * ```ts - * import { Effect, Cause } from "effect" - * import { Queue } from "effect" + * import { Cause, Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(10) * - * // Add some messages - * Queue.offerUnsafe(queue, 1) - * * // Create a cause and fail the queue synchronously * const cause = Cause.fail("Processing error") * const failed = Queue.failCauseUnsafe(queue, cause) * console.log(failed) // true * - * // The queue is now in failed state + * // The queue is now done with the specified failure cause * console.log(queue.state._tag) // "Done" * }) * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ export declare const failCauseUnsafe: (self: Enqueue, cause: Cause) => boolean; /** - * Signal that the queue is complete. If the queue is already done, `false` is - * returned. + * Signals queue completion. + * + * **When to use** + * + * Use to stop accepting new offers while allowing already queued messages to be + * consumed. + * + * **Details** + * + * Returns `false` if the queue is already done. + * + * **Example** (Ending queues) * - * @example * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -691,17 +842,28 @@ export declare const failCauseUnsafe: (self: Enqueue, cause: Cause(self: Enqueue) => Effect; /** - * Signal that the queue is complete synchronously. If the queue is already done, `false` is - * returned. + * Signals queue completion synchronously. + * + * **When to use** + * + * Use when implementing low-level queue integrations that must complete a queue + * without wrapping the operation in `Effect`. + * + * **Details** + * + * Returns `false` if the queue is already done. + * + * **Gotchas** * * This is an unsafe operation that directly modifies the queue without Effect wrapping. * - * @example + * **Example** (Ending queues synchronously) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -717,22 +879,31 @@ export declare const end: (self: Enqueue) => Effect; * const ended = Queue.endUnsafe(queue) * console.log(ended) // true * - * // The queue is now done + * // Existing messages can still be consumed while the queue is closing + * console.log(queue.state._tag) // "Closing" + * + * Queue.takeUnsafe(queue) + * Queue.takeUnsafe(queue) + * + * // After buffered messages are consumed, the queue is done * console.log(queue.state._tag) // "Done" * }) * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ export declare const endUnsafe: (self: Enqueue) => boolean; /** * Interrupts the queue gracefully, transitioning it to a closing state. * + * **Details** + * * This operation stops accepting new offers but allows existing messages to be consumed. * Once all messages are drained, the queue transitions to the Done state with an interrupt cause. * - * @example + * **Example** (Interrupting queues gracefully) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -764,17 +935,23 @@ export declare const endUnsafe: (self: Enqueue) => boolean; * }) * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ export declare const interrupt: (self: Enqueue) => Effect; /** - * Shutdown the queue, canceling any pending operations. - * If the queue is already done, `false` is returned. + * Shuts down the queue immediately, discarding buffered messages and resuming + * pending operations. + * + * **Details** + * + * The operation is idempotent and returns `true`, including when the queue has + * already been shut down or completed. + * + * **Example** (Shutting down queues) * - * @example * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(2) @@ -783,10 +960,7 @@ export declare const interrupt: (self: Enqueue) => Effect; * yield* Queue.offer(queue, 1) * yield* Queue.offer(queue, 2) * - * // Try to add more than capacity (will be pending) - * const pendingOffer = Queue.offer(queue, 3) - * - * // Shutdown cancels pending operations and clears the queue + * // Shutdown clears buffered messages and prevents further offers * const wasShutdown = yield* Queue.shutdown(queue) * console.log(wasShutdown) // true * @@ -796,15 +970,20 @@ export declare const interrupt: (self: Enqueue) => Effect; * }) * ``` * - * @category Completion - * @since 4.0.0 + * @category completion + * @since 2.0.0 */ export declare const shutdown: (self: Enqueue) => Effect; /** - * Take all messages from the queue, returning an empty array if the queue - * is empty or done. + * Takes and returns all currently buffered messages without waiting for more. + * + * **Details** + * + * Returns an empty array when the queue is empty or has completed normally. If + * the queue has failed, the effect fails with the queue's error. + * + * **Example** (Clearing queued values) * - * @example * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -828,17 +1007,26 @@ export declare const shutdown: (self: Enqueue) => Effect; * }) * ``` * - * @category Taking + * @category taking * @since 4.0.0 */ export declare const clear: (self: Dequeue) => Effect, Pull.ExcludeDone>; /** - * Take all messages from the queue, or wait for messages to be available. + * Takes all currently available messages, waiting until at least one message + * is available when the queue is empty. + * + * **When to use** + * + * Use when consumers should process the next non-empty batch of buffered + * messages instead of repeatedly taking one message at a time. * - * If the queue is done, the `done` flag will be `true`. If the queue - * fails, the Effect will fail with the error. + * **Details** + * + * Returns a non-empty array. If the queue completes or fails before a message + * can be taken, the effect fails with the queue's terminal error. + * + * **Example** (Taking all available values) * - * @example * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -854,14 +1042,15 @@ export declare const clear: (self: Dequeue) => Effect, Pull * }) * ``` * - * @category Taking - * @since 4.0.0 + * @category taking + * @since 2.0.0 */ export declare const takeAll: (self: Dequeue) => Effect, E>; /** - * Take all messages from the queue, until the queue has errored or is done. + * Takes all messages from the queue, until the queue has errored or is done. + * + * **Example** (Collecting values until completion) * - * @example * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -879,18 +1068,22 @@ export declare const takeAll: (self: Dequeue) => Effect(self: Dequeue) => Effect, Pull.ExcludeDone>; /** - * Take a specified number of messages from the queue. It will only take - * up to the capacity of the queue. + * Takes up to `n` messages from the queue. + * + * **Details** + * + * The operation may wait until enough messages are available to satisfy the + * queue's batching rules. If `n` is less than or equal to zero, it succeeds + * with an empty array. If the queue completes or fails before messages can be + * taken, the effect fails with the queue's terminal error. * - * If the queue is done, the `done` flag will be `true`. If the queue - * fails, the Effect will fail with the error. + * **Example** (Taking a fixed number of values) * - * @example * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -908,27 +1101,28 @@ export declare const collect: (self: Dequeue) => Effect(self: Dequeue, n: number) => Effect, E>; /** - * Take a variable number of messages from the queue, between specified min and max. - * It will only take up to the capacity of the queue. + * Takes between `min` and `max` messages from the queue. + * + * **Details** * - * If the queue is done, the `done` flag will be `true`. If the queue - * fails, the Effect will fail with the error. + * The operation waits when fewer than the required minimum messages are + * available. It returns at most `max` messages. If the queue completes or fails + * before the minimum can be satisfied, the effect fails with the queue's + * terminal error. + * + * **Example** (Taking a bounded batch of values) * - * @example * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -951,18 +1145,21 @@ export declare const takeN: (self: Dequeue, n: number) => Effect(self: Dequeue, min: number, max: number) => Effect, E>; /** - * Take a single message from the queue, or wait for a message to be + * Takes a single message from the queue, or wait for a message to be * available. * + * **Details** + * * If the queue is done, it will fail with `Done`. If the * queue fails, the Effect will fail with the error. * - * @example + * **Example** (Taking one value) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -981,7 +1178,7 @@ export declare const takeBetween: (self: Dequeue, min: number, max: * // End the queue * yield* Queue.end(queue) * - * // Taking from ended queue fails with None + * // Taking from an ended queue fails with Done * const result = yield* Effect.match(Queue.take(queue), { * onFailure: (error: Cause.Done) => true, * onSuccess: (value: string) => false @@ -990,16 +1187,21 @@ export declare const takeBetween: (self: Dequeue, min: number, max: * }) * ``` * - * @category Taking - * @since 4.0.0 + * @category taking + * @since 2.0.0 */ export declare const take: (self: Dequeue) => Effect; /** - * Tries to take an item from the queue without blocking. + * Attempts to take one item from the queue without waiting. + * + * **Details** + * + * Returns `Option.some` when an item is immediately available. Returns + * `Option.none` when no item is available, when the queue is done, or when the + * immediate take observes a queue failure. * - * Returns `Option.some` with the item if available, or `Option.none` if the queue is empty or done. + * **Example** (Polling without blocking) * - * @example * ```ts * import { Effect, Option, Queue } from "effect" * @@ -1019,16 +1221,19 @@ export declare const take: (self: Dequeue) => Effect; * }) * ``` * - * @category Taking - * @since 4.0.0 + * @category taking + * @since 2.0.0 */ export declare const poll: (self: Dequeue) => Effect>; /** - * Views the next item without removing it. + * Peeks at the next item without removing it. + * + * **Details** * * Blocks until an item is available. If the queue is done or fails, the error is propagated. * - * @example + * **Example** (Peeking at the next value) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -1042,21 +1247,26 @@ export declare const poll: (self: Dequeue) => Effect(self: Dequeue) => Effect; /** - * Take a single message from the queue synchronously, or wait for a message to be - * available. + * Attempts to take one message from the queue synchronously. * - * If the queue is done, it will fail with `Done`. If the - * queue fails, the Effect will fail with the error. - * Returns `undefined` if no message is immediately available. + * **When to use** + * + * Use when polling queue internals must not suspend or register a waiting taker, + * and `undefined` is an acceptable result for an empty queue. + * + * **Details** + * + * Returns an `Exit` for an immediately available message or for the queue's + * terminal state. Returns `undefined` when no message is immediately available. + * This operation does not wait or register a taker. * - * This is an unsafe operation that directly accesses the queue without Effect wrapping. + * **Example** (Taking one value synchronously) * - * @example * ```ts * import { Effect, Queue } from "effect" * @@ -1081,25 +1291,50 @@ export declare const peek: (self: Dequeue) => Effect; * }) * ``` * - * @category Taking + * @category taking * @since 4.0.0 */ export declare const takeUnsafe: (self: Dequeue) => Exit | undefined; declare const await_: (self: Dequeue) => Effect>; export { /** - * Wait for the queue to be done. + * Waits until a queue reaches the `Done` state. * - * @category Completion + * **When to use** + * + * Use to suspend a fiber until no further values can be taken from the queue + * and its terminal outcome is known. + * + * **Details** + * + * The effect succeeds with `void` for normal `Done` completion. Other + * terminal causes are preserved, so failures and interruptions complete this + * effect with the same terminal outcome. + * + * **Gotchas** + * + * A queue can be closing before it is done. `await` resumes at `Done`, not at + * the first completion signal, so buffered messages may need to be drained + * first. + * + * @see {@link end} for signaling normal completion while preserving buffered messages for consumers + * @see {@link fail} for signaling an error while preserving buffered messages for consumers + * @see {@link interrupt} for graceful interruption after buffered messages are drained + * @see {@link shutdown} for immediately discarding buffered messages and resuming pending operations + * + * @category completion * @since 4.0.0 */ await_ as await }; /** - * Check the size of the queue. + * Returns the current number of buffered messages in the queue. * - * If the queue is complete, it will return `None`. + * **Details** + * + * Completed queues report a size of `0`. + * + * **Example** (Checking queue size) * - * @example * ```ts * import { Cause, Effect, Option, Queue } from "effect" * @@ -1126,14 +1361,15 @@ await_ as await }; * }) * ``` * - * @category Size - * @since 4.0.0 + * @category sizes + * @since 2.0.0 */ export declare const size: (self: Dequeue) => Effect; /** - * Check if the queue is full. + * Checks whether the queue is full. + * + * **Example** (Checking if queues are full) * - * @example * ```ts * import { Cause, Effect, Option, Queue } from "effect" * @@ -1149,17 +1385,25 @@ export declare const size: (self: Dequeue) => Effect; * }) * ``` * - * @category Size - * @since 4.0.0 + * @category sizes + * @since 2.0.0 */ export declare const isFull: (self: Dequeue) => Effect; /** - * Check the size of the queue synchronously. + * Returns the current number of buffered messages in the queue synchronously. * - * If the queue is complete, it will return `None`. - * This is an unsafe operation that directly accesses the queue without Effect wrapping. + * **When to use** + * + * Use when you need an immediate `Queue` size snapshot for diagnostics or + * internals and do not need the read wrapped in `Effect`. + * + * **Details** + * + * Completed queues report a size of `0`. This unsafe operation reads the queue + * state directly without Effect wrapping. + * + * **Example** (Checking queue size synchronously) * - * @example * ```ts * import { Cause, Effect, Option, Queue } from "effect" * @@ -1188,14 +1432,20 @@ export declare const isFull: (self: Dequeue) => Effect; * }) * ``` * - * @category Size + * @category sizes * @since 4.0.0 */ export declare const sizeUnsafe: (self: Dequeue) => number; /** - * Check if the queue is full synchronously. + * Checks whether the queue is full synchronously. + * + * **When to use** + * + * Use when an immediate `Queue` capacity snapshot is needed outside effectful + * code and racing queue changes are acceptable. + * + * **Example** (Checking fullness synchronously) * - * @example * ```ts * import { Cause, Effect, Option, Queue } from "effect" * @@ -1211,15 +1461,16 @@ export declare const sizeUnsafe: (self: Dequeue) => number; * }) * ``` * - * @category Size + * @category sizes * @since 4.0.0 */ export declare const isFullUnsafe: (self: Dequeue) => boolean; /** - * Run an `Effect` into a `Queue`, where success ends the queue and failure + * Runs an `Effect` into a `Queue`, where success ends the queue and failure * fails the queue. * - * @example + * **Example** (Running effects into queues) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -1245,15 +1496,16 @@ export declare const isFullUnsafe: (self: Dequeue) => boolean; * }) * ``` * - * @since 3.8.0 - * @category Completion + * @category completion + * @since 4.0.0 */ export declare const into: { /** - * Run an `Effect` into a `Queue`, where success ends the queue and failure + * Runs an `Effect` into a `Queue`, where success ends the queue and failure * fails the queue. * - * @example + * **Example** (Running effects into queues) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -1279,15 +1531,16 @@ export declare const into: { * }) * ``` * - * @since 3.8.0 - * @category Completion + * @category completion + * @since 4.0.0 */ (self: Enqueue): (effect: Effect) => Effect; /** - * Run an `Effect` into a `Queue`, where success ends the queue and failure + * Runs an `Effect` into a `Queue`, where success ends the queue and failure * fails the queue. * - * @example + * **Example** (Running effects into queues) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -1313,8 +1566,8 @@ export declare const into: { * }) * ``` * - * @since 3.8.0 - * @category Completion + * @category completion + * @since 4.0.0 */ (effect: Effect, self: Enqueue): Effect; }; diff --git a/.opencode/node_modules/effect/dist/Queue.d.ts.map b/.opencode/node_modules/effect/dist/Queue.d.ts.map index ba33302eddcbf6347f02aa1ea110b83a4df7a24f..84c7243e453c333914d8686df236aeb7e39c1711 100644 --- a/.opencode/node_modules/effect/dist/Queue.d.ts.map +++ b/.opencode/node_modules/effect/dist/Queue.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Queue.d.ts","sourceRoot":"","sources":["../src/Queue.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,GAAG,MAAM,YAAY,CAAA;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAE9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAInD,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAExC,QAAA,MAAM,MAAM,kBAAkB,CAAA;AAC9B,QAAA,MAAM,aAAa,0BAA0B,CAAA;AAC7C,QAAA,MAAM,aAAa,0BAA0B,CAAA;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAC9C,GAAG,OAAO,KACT,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAA2B,CAAA;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAChD,GAAG,OAAO,KACT,CAAC,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,CAAkC,CAAA;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAChD,GA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,GAAI,CAAC,EAAE,CAAC,EAAE,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,KAAG,OAA6C,CAAA;AAEtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,IAAI,EAAE;IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,EAAE,EAAE,EACvD,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,KACvB,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAAA;IAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAAA;CAajH,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Queue.js b/.opencode/node_modules/effect/dist/Queue.js index cd27655a3767c93489dcb80bc79a2da92c98caea..cbda8a119602471a3d9a523cbdb4bea49df65196 100644 --- a/.opencode/node_modules/effect/dist/Queue.js +++ b/.opencode/node_modules/effect/dist/Queue.js @@ -1,4 +1,11 @@ /** + * Passes values asynchronously between fibers. + * + * A `Queue` accepts values, hands each value to one consumer in offer + * order, and can complete, fail, interrupt, or shut down. Queues can be bounded + * or unbounded, and bounded queues can suspend, drop, or slide values when + * producers are faster than consumers. + * * @since 3.8.0 */ import * as Arr from "./Array.js"; @@ -16,36 +23,94 @@ const DequeueTypeId = "~effect/Queue/Dequeue"; /** * Type guard to check if a value is a Queue. * - * @since 3.8.0 - * @category Guards + * **When to use** + * + * Use to narrow an unknown value to a full `Queue` before passing it to APIs + * that need both offering and taking capabilities. + * + * @see {@link isEnqueue} for checking values that only need write access + * @see {@link isDequeue} for checking values that only need read access + * + * @category guards + * @since 2.0.0 */ export const isQueue = u => hasProperty(u, TypeId); /** * Type guard to check if a value is an Enqueue. * - * @since 4.0.0 - * @category Guards + * **When to use** + * + * Use to narrow an unknown value before calling queue operations that require + * write-side access. + * + * **Gotchas** + * + * A full `Queue` also satisfies this guard because every queue includes the + * enqueue side. + * + * @see {@link isQueue} for checking for a full read-write queue handle + * @see {@link isDequeue} for checking for the read side of a queue + * @see {@link asEnqueue} for narrowing an existing `Queue` to its write-only interface + * + * @category guards + * @since 2.0.0 */ export const isEnqueue = u => hasProperty(u, EnqueueTypeId); /** * Type guard to check if a value is a Dequeue. * - * @since 4.0.0 - * @category Guards + * **When to use** + * + * Use to narrow an unknown value before passing it to read-side queue + * operations. + * + * @see {@link Dequeue} for the read-side queue handle checked by this guard + * @see {@link isQueue} for checking for a full read-write queue handle + * @see {@link isEnqueue} for checking for the write side of a queue + * @see {@link asDequeue} for narrowing an existing `Queue` to its read-only interface + * + * @category guards + * @since 2.0.0 */ export const isDequeue = u => hasProperty(u, DequeueTypeId); /** - * Converts a Queue to an Enqueue (write-only interface). + * Converts a `Queue` to its write-only `Enqueue` interface. + * + * **When to use** + * + * Use to expose only the producer side of a `Queue` to code that should offer + * values or signal queue lifecycle. + * + * **Gotchas** + * + * This is a type-level capability restriction. It returns the same queue + * object, so it does not hide read operations at runtime. * + * @see {@link asDequeue} for exposing only the read side of a `Queue` + * @see {@link Enqueue} for the write-only queue handle returned by this conversion + * + * @category converting * @since 4.0.0 - * @category Conversions */ export const asEnqueue = self => self; /** - * Convert a Queue to a Dequeue, allowing only read operations. + * Narrows a `Queue` to a `Dequeue`, exposing the consumer side of the queue. + * + * **When to use** + * + * Use to pass a queue to code that should consume values while keeping + * producer-side operations out of that code's TypeScript type. + * + * **Gotchas** + * + * This is a type-level narrowing operation. It returns the same queue object + * and does not create a runtime wrapper. + * + * @see {@link asEnqueue} for narrowing a queue to its producer side + * @see {@link Dequeue} for the consumer-side queue handle returned by this function * + * @category converting * @since 4.0.0 - * @category Conversions */ export const asDequeue = identity; const variance = { @@ -66,22 +131,19 @@ const QueueProto = { } }; /** - * A `Queue` is an asynchronous queue that can be offered to and taken from. + * Creates a `Queue` with optional capacity and overflow strategy. * - * It also supports signaling that it is done or failed. + * **Details** * - * **Previously Known As** + * By default the queue is unbounded and uses the `"suspend"` strategy. Provide + * `capacity` for a bounded queue and choose `"suspend"`, `"dropping"`, or + * `"sliding"` to control what happens when the queue is full. The returned + * queue can be offered to, taken from, failed, ended, interrupted, or shut down. * - * This API replaces the following from Effect 3.x: + * **Example** (Creating queues) * - * - `Mailbox.make` - * - * @since 3.8.0 - * @category Constructors - * @example * ```ts * import { Cause, Effect, Queue } from "effect" - * import * as assert from "node:assert" * * Effect.gen(function*() { * const queue = yield* Queue.make() @@ -93,17 +155,22 @@ const QueueProto = { * * // take messages from the queue * const messages = yield* Queue.takeAll(queue) - * assert.deepStrictEqual(messages, [1, 2, 3, 4, 5]) + * console.log(messages) // [1, 2, 3, 4, 5] * * // signal that the queue is done * yield* Queue.end(queue) - * const done = yield* Effect.flip(Queue.takeAll(queue)) - * assert.deepStrictEqual(done, Cause.Done) + * const done = yield* Effect.flip(Queue.take(queue)) + * console.log(Cause.isDone(done)) // true * - * // signal that the queue has failed - * yield* Queue.fail(queue, "boom") + * // signal that another queue has failed + * const failedQueue = yield* Queue.make() + * const failed = yield* Queue.fail(failedQueue, "boom") + * console.log(failed) // true * }) * ``` + * + * @category constructors + * @since 4.0.0 */ export const make = options => core.withFiber(fiber => { const self = Object.create(QueueProto); @@ -123,12 +190,15 @@ export const make = options => core.withFiber(fiber => { /** * Creates a bounded queue with the specified capacity that uses backpressure strategy. * + * **Details** + * * When the queue reaches capacity, producers will be suspended until space becomes available. * This ensures all messages are processed but may slow down producers. * - * @example + * **Example** (Creating bounded queues) + * * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(5) @@ -142,8 +212,8 @@ export const make = options => core.withFiber(fiber => { * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export const bounded = capacity => make({ capacity @@ -152,12 +222,15 @@ export const bounded = capacity => make({ * Creates a bounded queue with sliding strategy. When the queue reaches capacity, * new elements are added and the oldest elements are dropped. * - * This strategy prevents producers from being blocked but may result in message loss. - * Useful when you want to maintain a rolling window of the most recent messages. + * **When to use** + * + * Use when you need producer offers not to block and can accept dropping the + * oldest messages, such as when maintaining a rolling window of recent values. + * + * **Example** (Creating sliding queues) * - * @example * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.sliding(3) @@ -175,8 +248,8 @@ export const bounded = capacity => make({ * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export const sliding = capacity => make({ capacity, @@ -186,12 +259,15 @@ export const sliding = capacity => make({ * Creates a bounded queue with dropping strategy. When the queue reaches capacity, * new elements are dropped and the offer operation returns false. * - * This strategy prevents producers from being blocked and preserves existing messages, - * but new messages may be lost when the queue is full. + * **When to use** + * + * Use when you need producer offers not to block while preserving existing + * queued messages, even if new messages may be dropped when the queue is full. + * + * **Example** (Creating dropping queues) * - * @example * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.dropping(2) @@ -210,8 +286,8 @@ export const sliding = capacity => make({ * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export const dropping = capacity => make({ capacity, @@ -220,13 +296,15 @@ export const dropping = capacity => make({ /** * Creates an unbounded queue that can grow to any size without blocking producers. * - * Unlike bounded queues, unbounded queues never apply backpressure - producers - * can always add messages successfully. This is useful when you want to prioritize - * producer throughput over memory usage control. + * **When to use** + * + * Use when you need producers to add messages without backpressure and accept + * unbounded memory growth. + * + * **Example** (Creating unbounded queues) * - * @example * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.unbounded() @@ -238,7 +316,7 @@ export const dropping = capacity => make({ * * // Check current size * const size = yield* Queue.size(queue) - * console.log(size) // Some(5) + * console.log(size) // 5 * * // Take all messages * const messages = yield* Queue.takeAll(queue) @@ -246,20 +324,23 @@ export const dropping = capacity => make({ * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export const unbounded = () => make(); /** - * Add a message to the queue. Returns `false` if the queue is done. + * Adds a message to the queue. Returns `false` if the queue is done. + * + * **Details** * * For bounded queues, this operation may suspend if the queue is at capacity, * depending on the backpressure strategy. For dropping/sliding queues, it may * return false or succeed immediately by dropping/sliding existing messages. * - * @example + * **Example** (Offering a value) + * * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(3) @@ -276,7 +357,7 @@ export const unbounded = () => make(); * ``` * * @category Offering - * @since 4.0.0 + * @since 2.0.0 */ export const offer = (self, message) => internalEffect.suspend(() => { if (self.state._tag !== "Open") { @@ -303,12 +384,20 @@ export const offer = (self, message) => internalEffect.suspend(() => { return exitTrue; }); /** - * Add a message to the queue synchronously. Returns `false` if the queue is done. + * Adds a message to the queue synchronously. Returns `false` if the queue is done. + * + * **When to use** + * + * Use when you are already in synchronous queue internals or a performance + * boundary where wrapping the mutation in `Effect` is intentionally avoided. + * + * **Gotchas** * * This is an unsafe operation that directly modifies the queue without Effect wrapping. * Use this only when you're certain about the synchronous nature of the operation. * - * @example + * **Example** (Offering a value synchronously) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -350,28 +439,36 @@ export const offerUnsafe = (self, message) => { return true; }; /** - * Add multiple messages to the queue. Returns the remaining messages that + * Adds multiple messages to the queue. Returns the remaining messages that * were not added. * + * **When to use** + * + * Use when producers can submit a batch at once and need to know which messages + * did not fit under the queue's capacity strategy. + * + * **Details** + * * For bounded queues, this operation may suspend if the queue doesn't have * enough capacity. The operation returns an array of messages that couldn't * be added (empty array means all messages were successfully added). * - * @example + * **Example** (Offering multiple values) + * * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { - * const queue = yield* Queue.bounded(3) + * const queue = yield* Queue.dropping(3) * - * // Try to add more messages than capacity + * // Try to add more messages than capacity without suspending * const remaining1 = yield* Queue.offerAll(queue, [1, 2, 3, 4, 5]) * console.log(remaining1) // [4, 5] - couldn't fit the last 2 * }) * ``` * * @category Offering - * @since 4.0.0 + * @since 2.0.0 */ export const offerAll = (self, messages) => internalEffect.suspend(() => { if (self.state._tag !== "Open") { @@ -386,12 +483,20 @@ export const offerAll = (self, messages) => internalEffect.suspend(() => { return offerRemainingArray(self, remaining); }); /** - * Add multiple messages to the queue synchronously. Returns the remaining messages that + * Adds multiple messages to the queue synchronously. Returns the remaining messages that * were not added. * + * **When to use** + * + * Use when queue internals or a performance boundary need a synchronous batch + * offer and can handle any messages that do not fit. + * + * **Gotchas** + * * This is an unsafe operation that directly modifies the queue without Effect wrapping. * - * @example + * **Example** (Offering multiple values synchronously) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -441,88 +546,89 @@ export const offerAllUnsafe = (self, messages) => { return remaining; }; /** - * Fail the queue with an error. If the queue is already done, `false` is + * Fails the queue with an error. If the queue is already done, `false` is * returned. * - * @example + * **Example** (Failing queues with an error) + * * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(10) * - * // Add some messages - * yield* Queue.offer(queue, 1) - * yield* Queue.offer(queue, 2) - * * // Fail the queue with an error * const failed = yield* Queue.fail(queue, "Something went wrong") * console.log(failed) // true * - * // Subsequent operations will reflect the failure - * // Taking from failed queue will fail with the error + * // Taking from the failed queue fails with the error + * const error = yield* Effect.flip(Queue.take(queue)) + * console.log(error) // "Something went wrong" * }) * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ export const fail = (self, error) => failCause(self, core.causeFail(error)); /** - * Fail the queue with a cause. If the queue is already done, `false` is + * Fails the queue with a cause. If the queue is already done, `false` is * returned. * - * @example + * **Example** (Failing queues with a cause) + * * ```ts * import { Cause, Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(10) * - * // Add some messages - * yield* Queue.offer(queue, 1) - * * // Create a cause and fail the queue * const cause = Cause.fail("Queue processing failed") * const failed = yield* Queue.failCause(queue, cause) * console.log(failed) // true * - * // The queue is now in failed state with the specified cause + * // The queue is now done with the specified failure cause + * console.log(queue.state._tag) // "Done" * }) * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ export const failCause = /*#__PURE__*/dual(2, (self, cause) => internalEffect.sync(() => failCauseUnsafe(self, cause))); /** - * Fail the queue with a cause synchronously. If the queue is already done, `false` is + * Fails the queue with a cause synchronously. If the queue is already done, `false` is * returned. * + * **When to use** + * + * Use when queue completion must be driven from synchronous internals while + * preserving the full failure `Cause`. + * + * **Gotchas** + * * This is an unsafe operation that directly modifies the queue without Effect wrapping. * - * @example + * **Example** (Failing queues with a cause synchronously) + * * ```ts - * import { Effect, Cause } from "effect" - * import { Queue } from "effect" + * import { Cause, Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(10) * - * // Add some messages - * Queue.offerUnsafe(queue, 1) - * * // Create a cause and fail the queue synchronously * const cause = Cause.fail("Processing error") * const failed = Queue.failCauseUnsafe(queue, cause) * console.log(failed) // true * - * // The queue is now in failed state + * // The queue is now done with the specified failure cause * console.log(queue.state._tag) // "Done" * }) * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ export const failCauseUnsafe = (self, cause) => { @@ -543,10 +649,19 @@ export const failCauseUnsafe = (self, cause) => { return true; }; /** - * Signal that the queue is complete. If the queue is already done, `false` is - * returned. + * Signals queue completion. + * + * **When to use** + * + * Use to stop accepting new offers while allowing already queued messages to be + * consumed. + * + * **Details** + * + * Returns `false` if the queue is already done. + * + * **Example** (Ending queues) * - * @example * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -571,17 +686,28 @@ export const failCauseUnsafe = (self, cause) => { * }) * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ export const end = self => failCause(self, core.causeFail(core.Done())); /** - * Signal that the queue is complete synchronously. If the queue is already done, `false` is - * returned. + * Signals queue completion synchronously. + * + * **When to use** + * + * Use when implementing low-level queue integrations that must complete a queue + * without wrapping the operation in `Effect`. + * + * **Details** + * + * Returns `false` if the queue is already done. + * + * **Gotchas** * * This is an unsafe operation that directly modifies the queue without Effect wrapping. * - * @example + * **Example** (Ending queues synchronously) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -597,22 +723,31 @@ export const end = self => failCause(self, core.causeFail(core.Done())); * const ended = Queue.endUnsafe(queue) * console.log(ended) // true * - * // The queue is now done + * // Existing messages can still be consumed while the queue is closing + * console.log(queue.state._tag) // "Closing" + * + * Queue.takeUnsafe(queue) + * Queue.takeUnsafe(queue) + * + * // After buffered messages are consumed, the queue is done * console.log(queue.state._tag) // "Done" * }) * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ export const endUnsafe = self => failCauseUnsafe(self, core.causeFail(core.Done())); /** * Interrupts the queue gracefully, transitioning it to a closing state. * + * **Details** + * * This operation stops accepting new offers but allows existing messages to be consumed. * Once all messages are drained, the queue transitions to the Done state with an interrupt cause. * - * @example + * **Example** (Interrupting queues gracefully) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -644,17 +779,23 @@ export const endUnsafe = self => failCauseUnsafe(self, core.causeFail(core.Done( * }) * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ export const interrupt = self => core.withFiber(fiber => failCause(self, internalEffect.causeInterrupt(fiber.id))); /** - * Shutdown the queue, canceling any pending operations. - * If the queue is already done, `false` is returned. + * Shuts down the queue immediately, discarding buffered messages and resuming + * pending operations. + * + * **Details** + * + * The operation is idempotent and returns `true`, including when the queue has + * already been shut down or completed. + * + * **Example** (Shutting down queues) * - * @example * ```ts - * import { Cause, Effect, Queue } from "effect" + * import { Effect, Queue } from "effect" * * const program = Effect.gen(function*() { * const queue = yield* Queue.bounded(2) @@ -663,10 +804,7 @@ export const interrupt = self => core.withFiber(fiber => failCause(self, interna * yield* Queue.offer(queue, 1) * yield* Queue.offer(queue, 2) * - * // Try to add more than capacity (will be pending) - * const pendingOffer = Queue.offer(queue, 3) - * - * // Shutdown cancels pending operations and clears the queue + * // Shutdown clears buffered messages and prevents further offers * const wasShutdown = yield* Queue.shutdown(queue) * console.log(wasShutdown) // true * @@ -676,8 +814,8 @@ export const interrupt = self => core.withFiber(fiber => failCause(self, interna * }) * ``` * - * @category Completion - * @since 4.0.0 + * @category completion + * @since 2.0.0 */ export const shutdown = self => internalEffect.sync(() => { if (self.state._tag === "Done") { @@ -699,10 +837,15 @@ export const shutdown = self => internalEffect.sync(() => { return true; }); /** - * Take all messages from the queue, returning an empty array if the queue - * is empty or done. + * Takes and returns all currently buffered messages without waiting for more. + * + * **Details** + * + * Returns an empty array when the queue is empty or has completed normally. If + * the queue has failed, the effect fails with the queue's error. + * + * **Example** (Clearing queued values) * - * @example * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -726,7 +869,7 @@ export const shutdown = self => internalEffect.sync(() => { * }) * ``` * - * @category Taking + * @category taking * @since 4.0.0 */ export const clear = self => internalEffect.suspend(() => { @@ -741,12 +884,21 @@ export const clear = self => internalEffect.suspend(() => { return internalEffect.succeed(messages); }); /** - * Take all messages from the queue, or wait for messages to be available. + * Takes all currently available messages, waiting until at least one message + * is available when the queue is empty. + * + * **When to use** + * + * Use when consumers should process the next non-empty batch of buffered + * messages instead of repeatedly taking one message at a time. * - * If the queue is done, the `done` flag will be `true`. If the queue - * fails, the Effect will fail with the error. + * **Details** + * + * Returns a non-empty array. If the queue completes or fails before a message + * can be taken, the effect fails with the queue's terminal error. + * + * **Example** (Taking all available values) * - * @example * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -762,14 +914,15 @@ export const clear = self => internalEffect.suspend(() => { * }) * ``` * - * @category Taking - * @since 4.0.0 + * @category taking + * @since 2.0.0 */ export const takeAll = self => takeBetween(self, 1, Number.POSITIVE_INFINITY); /** - * Take all messages from the queue, until the queue has errored or is done. + * Takes all messages from the queue, until the queue has errored or is done. + * + * **Example** (Collecting values until completion) * - * @example * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -787,7 +940,7 @@ export const takeAll = self => takeBetween(self, 1, Number.POSITIVE_INFINITY); * }) * ``` * - * @category Taking + * @category taking * @since 4.0.0 */ export const collect = self => internalEffect.suspend(() => { @@ -803,13 +956,17 @@ export const collect = self => internalEffect.suspend(() => { }), () => internalEffect.void), out); }); /** - * Take a specified number of messages from the queue. It will only take - * up to the capacity of the queue. + * Takes up to `n` messages from the queue. + * + * **Details** * - * If the queue is done, the `done` flag will be `true`. If the queue - * fails, the Effect will fail with the error. + * The operation may wait until enough messages are available to satisfy the + * queue's batching rules. If `n` is less than or equal to zero, it succeeds + * with an empty array. If the queue completes or fails before messages can be + * taken, the effect fails with the queue's terminal error. + * + * **Example** (Taking a fixed number of values) * - * @example * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -827,27 +984,28 @@ export const collect = self => internalEffect.suspend(() => { * const next2 = yield* Queue.takeN(queue, 2) * console.log(next2) // [4, 5] * - * // End the queue before taking; now it can return fewer than requested - * yield* Queue.end(queue) - * - * // Take remaining messages (takes 2, even though we asked for 5) - * const remaining = yield* Queue.takeN(queue, 5) + * // Take remaining messages + * const remaining = yield* Queue.takeN(queue, 2) * console.log(remaining) // [6, 7] * }) * ``` * - * @category Taking - * @since 4.0.0 + * @category taking + * @since 2.0.0 */ export const takeN = (self, n) => takeBetween(self, n, n); /** - * Take a variable number of messages from the queue, between specified min and max. - * It will only take up to the capacity of the queue. + * Takes between `min` and `max` messages from the queue. * - * If the queue is done, the `done` flag will be `true`. If the queue - * fails, the Effect will fail with the error. + * **Details** + * + * The operation waits when fewer than the required minimum messages are + * available. It returns at most `max` messages. If the queue completes or fails + * before the minimum can be satisfied, the effect fails with the queue's + * terminal error. + * + * **Example** (Taking a bounded batch of values) * - * @example * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -870,18 +1028,21 @@ export const takeN = (self, n) => takeBetween(self, n, n); * }) * ``` * - * @category Taking - * @since 4.0.0 + * @category taking + * @since 2.0.0 */ export const takeBetween = (self, min, max) => internalEffect.suspend(() => takeBetweenUnsafe(self, min, max) ?? internalEffect.andThen(awaitTake(self), takeBetween(self, 1, max))); /** - * Take a single message from the queue, or wait for a message to be + * Takes a single message from the queue, or wait for a message to be * available. * + * **Details** + * * If the queue is done, it will fail with `Done`. If the * queue fails, the Effect will fail with the error. * - * @example + * **Example** (Taking one value) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -900,7 +1061,7 @@ export const takeBetween = (self, min, max) => internalEffect.suspend(() => take * // End the queue * yield* Queue.end(queue) * - * // Taking from ended queue fails with None + * // Taking from an ended queue fails with Done * const result = yield* Effect.match(Queue.take(queue), { * onFailure: (error: Cause.Done) => true, * onSuccess: (value: string) => false @@ -909,16 +1070,21 @@ export const takeBetween = (self, min, max) => internalEffect.suspend(() => take * }) * ``` * - * @category Taking - * @since 4.0.0 + * @category taking + * @since 2.0.0 */ export const take = self => internalEffect.suspend(() => takeUnsafe(self) ?? internalEffect.andThen(awaitTake(self), take(self))); /** - * Tries to take an item from the queue without blocking. + * Attempts to take one item from the queue without waiting. + * + * **Details** * - * Returns `Option.some` with the item if available, or `Option.none` if the queue is empty or done. + * Returns `Option.some` when an item is immediately available. Returns + * `Option.none` when no item is available, when the queue is done, or when the + * immediate take observes a queue failure. + * + * **Example** (Polling without blocking) * - * @example * ```ts * import { Effect, Option, Queue } from "effect" * @@ -938,8 +1104,8 @@ export const take = self => internalEffect.suspend(() => takeUnsafe(self) ?? int * }) * ``` * - * @category Taking - * @since 4.0.0 + * @category taking + * @since 2.0.0 */ export const poll = self => internalEffect.suspend(() => { const result = takeUnsafe(self); @@ -952,11 +1118,14 @@ export const poll = self => internalEffect.suspend(() => { return internalEffect.succeed(Option.none()); }); /** - * Views the next item without removing it. + * Peeks at the next item without removing it. + * + * **Details** * * Blocks until an item is available. If the queue is done or fails, the error is propagated. * - * @example + * **Example** (Peeking at the next value) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -970,7 +1139,7 @@ export const poll = self => internalEffect.suspend(() => { * }) * ``` * - * @category Taking + * @category taking * @since 4.0.0 */ export const peek = self => internalEffect.suspend(() => { @@ -983,16 +1152,21 @@ export const peek = self => internalEffect.suspend(() => { return internalEffect.andThen(awaitTake(self), peek(self)); }); /** - * Take a single message from the queue synchronously, or wait for a message to be - * available. + * Attempts to take one message from the queue synchronously. * - * If the queue is done, it will fail with `Done`. If the - * queue fails, the Effect will fail with the error. - * Returns `undefined` if no message is immediately available. + * **When to use** * - * This is an unsafe operation that directly accesses the queue without Effect wrapping. + * Use when polling queue internals must not suspend or register a waiting taker, + * and `undefined` is an acceptable result for an empty queue. + * + * **Details** + * + * Returns an `Exit` for an immediately available message or for the queue's + * terminal state. Returns `undefined` when no message is immediately available. + * This operation does not wait or register a taker. + * + * **Example** (Taking one value synchronously) * - * @example * ```ts * import { Effect, Queue } from "effect" * @@ -1017,7 +1191,7 @@ export const peek = self => internalEffect.suspend(() => { * }) * ``` * - * @category Taking + * @category taking * @since 4.0.0 */ export const takeUnsafe = self => { @@ -1054,18 +1228,43 @@ const await_ = self => internalEffect.callback(resume => { }); export { /** - * Wait for the queue to be done. + * Waits until a queue reaches the `Done` state. + * + * **When to use** + * + * Use to suspend a fiber until no further values can be taken from the queue + * and its terminal outcome is known. * - * @category Completion + * **Details** + * + * The effect succeeds with `void` for normal `Done` completion. Other + * terminal causes are preserved, so failures and interruptions complete this + * effect with the same terminal outcome. + * + * **Gotchas** + * + * A queue can be closing before it is done. `await` resumes at `Done`, not at + * the first completion signal, so buffered messages may need to be drained + * first. + * + * @see {@link end} for signaling normal completion while preserving buffered messages for consumers + * @see {@link fail} for signaling an error while preserving buffered messages for consumers + * @see {@link interrupt} for graceful interruption after buffered messages are drained + * @see {@link shutdown} for immediately discarding buffered messages and resuming pending operations + * + * @category completion * @since 4.0.0 */ await_ as await }; /** - * Check the size of the queue. + * Returns the current number of buffered messages in the queue. + * + * **Details** * - * If the queue is complete, it will return `None`. + * Completed queues report a size of `0`. + * + * **Example** (Checking queue size) * - * @example * ```ts * import { Cause, Effect, Option, Queue } from "effect" * @@ -1092,14 +1291,15 @@ await_ as await }; * }) * ``` * - * @category Size - * @since 4.0.0 + * @category sizes + * @since 2.0.0 */ export const size = self => internalEffect.sync(() => sizeUnsafe(self)); /** - * Check if the queue is full. + * Checks whether the queue is full. + * + * **Example** (Checking if queues are full) * - * @example * ```ts * import { Cause, Effect, Option, Queue } from "effect" * @@ -1115,17 +1315,25 @@ export const size = self => internalEffect.sync(() => sizeUnsafe(self)); * }) * ``` * - * @category Size - * @since 4.0.0 + * @category sizes + * @since 2.0.0 */ export const isFull = self => internalEffect.sync(() => isFullUnsafe(self)); /** - * Check the size of the queue synchronously. + * Returns the current number of buffered messages in the queue synchronously. + * + * **When to use** + * + * Use when you need an immediate `Queue` size snapshot for diagnostics or + * internals and do not need the read wrapped in `Effect`. * - * If the queue is complete, it will return `None`. - * This is an unsafe operation that directly accesses the queue without Effect wrapping. + * **Details** + * + * Completed queues report a size of `0`. This unsafe operation reads the queue + * state directly without Effect wrapping. + * + * **Example** (Checking queue size synchronously) * - * @example * ```ts * import { Cause, Effect, Option, Queue } from "effect" * @@ -1154,14 +1362,20 @@ export const isFull = self => internalEffect.sync(() => isFullUnsafe(self)); * }) * ``` * - * @category Size + * @category sizes * @since 4.0.0 */ export const sizeUnsafe = self => self.state._tag === "Done" ? 0 : self.messages.length; /** - * Check if the queue is full synchronously. + * Checks whether the queue is full synchronously. + * + * **When to use** + * + * Use when an immediate `Queue` capacity snapshot is needed outside effectful + * code and racing queue changes are acceptable. + * + * **Example** (Checking fullness synchronously) * - * @example * ```ts * import { Cause, Effect, Option, Queue } from "effect" * @@ -1177,15 +1391,16 @@ export const sizeUnsafe = self => self.state._tag === "Done" ? 0 : self.messages * }) * ``` * - * @category Size + * @category sizes * @since 4.0.0 */ export const isFullUnsafe = self => sizeUnsafe(self) === self.capacity; /** - * Run an `Effect` into a `Queue`, where success ends the queue and failure + * Runs an `Effect` into a `Queue`, where success ends the queue and failure * fails the queue. * - * @example + * **Example** (Running effects into queues) + * * ```ts * import { Cause, Effect, Queue } from "effect" * @@ -1211,8 +1426,8 @@ export const isFullUnsafe = self => sizeUnsafe(self) === self.capacity; * }) * ``` * - * @since 3.8.0 - * @category Completion + * @category completion + * @since 4.0.0 */ export const into = /*#__PURE__*/dual(2, (effect, self) => internalEffect.uninterruptibleMask(restore => internalEffect.matchCauseEffect(restore(effect), { onFailure: cause => failCause(self, cause), diff --git a/.opencode/node_modules/effect/dist/Queue.js.map b/.opencode/node_modules/effect/dist/Queue.js.map index aa3ab47f69a1335a9dc30e28a3a92f23c3d770e0..f0223b2e2a83a553636298dedff4b80b12a26a83 100644 --- a/.opencode/node_modules/effect/dist/Queue.js.map +++ b/.opencode/node_modules/effect/dist/Queue.js.map @@ -1 +1 @@ -{"version":3,"file":"Queue.js","names":["Arr","constant","constTrue","dual","identity","core","PipeInspectableProto","internalEffect","MutableList","Option","hasProperty","Pull","TypeId","EnqueueTypeId","DequeueTypeId","isQueue","u","isEnqueue","isDequeue","asEnqueue","self","asDequeue","variance","_A","_E","QueueProto","toJSON","_id","state","_tag","size","sizeUnsafe","make","options","withFiber","fiber","Object","create","dispatcher","currentDispatcher","capacity","Number","POSITIVE_INFINITY","strategy","messages","scheduleRunning","takers","Set","offers","awaiters","succeed","bounded","sliding","dropping","unbounded","offer","message","suspend","exitFalse","length","append","releaseTakers","exitTrue","offerRemainingSingle","take","scheduleReleaseTaker","offerUnsafe","offerAll","fromIterable","remaining","offerAllUnsafe","exitSucceed","offerRemainingArray","appendAll","takeN","free","i","push","fail","error","failCause","causeFail","cause","sync","failCauseUnsafe","exit","exitFailCause","exitZipRight","exitFailDone","finalize","end","Done","endUnsafe","interrupt","causeInterrupt","id","shutdown","clear","exitInterrupt","entry","resume","slice","offset","isDoneCause","takeAllUnsafe","releaseCapacity","takeAll","takeBetween","collect","out","empty","as","catchDone","whileLoop","while","body","step","items","void","n","min","max","takeBetweenUnsafe","andThen","awaitTake","takeUnsafe","poll","result","undefined","none","some","value","peek","head","array","await_","callback","exitVoid","add","delete","await","isFull","isFullUnsafe","into","effect","uninterruptibleMask","restore","matchCauseEffect","onFailure","onSuccess","_","exitFail","taker","scheduleTask","Math","openState","awaiter"],"sources":["../src/Queue.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,GAAG,MAAM,YAAY;AAIjC,SAASC,QAAQ,EAAEC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAEnE,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AACtD,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,OAAO,KAAKC,IAAI,MAAM,WAAW;AAIjC,MAAMC,MAAM,GAAG,eAAe;AAC9B,MAAMC,aAAa,GAAG,uBAAuB;AAC7C,MAAMC,aAAa,GAAG,uBAAuB;AAE7C;;;;;;AAMA,OAAO,MAAMC,OAAO,GAClBC,CAAU,IACWN,WAAW,CAACM,CAAC,EAAEJ,MAAM,CAAC;AAE7C;;;;;;AAMA,OAAO,MAAMK,SAAS,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AC5C,IAAI,CAACwB,QAAQ,CAAE,CAAC;IACnD6D,eAAe,CAACrF,IAAI,CAAC;IACrB,OAAOwB,QAAQ;EACjB;EACA,OAAO,EAAE;AACX,CAAC;AAED,MAAM6C,QAAQ,GAAGA,CAAOrE,IAAmC,EAAEiE,IAAuB,KAAI;EACtF,IAAIjE,IAAI,CAACQ,KAAK,CAACC,IAAI,KAAK,MAAM,EAAE;IAC9B;EACF;EACA,MAAM8H,SAAS,GAAGvI,IAAI,CAACQ,KAAK;EAC5BR,IAAI,CAACQ,KAAK,GAAG;IAAEC,IAAI,EAAE,MAAM;IAAEwD;EAAI,CAAE;EACnC,KAAK,MAAMmE,KAAK,IAAIG,SAAS,CAAC7G,MAAM,EAAE;IACpC0G,KAAK,CAACnE,IAAI,CAAC;EACb;EACAsE,SAAS,CAAC7G,MAAM,CAACmD,KAAK,EAAE;EACxB,KAAK,MAAM2D,OAAO,IAAID,SAAS,CAAC1G,QAAQ,EAAE;IACxC2G,OAAO,CAACvE,IAAI,CAAC;EACf;EACAsE,SAAS,CAAC1G,QAAQ,CAACgD,KAAK,EAAE;AAC5B,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Queue.js","names":["Arr","constant","constTrue","dual","identity","core","PipeInspectableProto","internalEffect","MutableList","Option","hasProperty","Pull","TypeId","EnqueueTypeId","DequeueTypeId","isQueue","u","isEnqueue","isDequeue","asEnqueue","self","asDequeue","variance","_A","_E","QueueProto","toJSON","_id","state","_tag","size","sizeUnsafe","make","options","withFiber","fiber","Object","create","dispatcher","currentDispatcher","capacity","Number","POSITIVE_INFINITY","strategy","messages","scheduleRunning","takers","Set","offers","awaiters","succeed","bounded","sliding","dropping","unbounded","offer","message","suspend","exitFalse","length","append","releaseTakers","exitTrue","offerRemainingSingle","take","scheduleReleaseTaker","offerUnsafe","offerAll","fromIterable","remaining","offerAllUnsafe","exitSucceed","offerRemainingArray","appendAll","takeN","free","i","push","fail","error","failCause","causeFail","cause","sync","failCauseUnsafe","exit","exitFailCause","exitZipRight","exitFailDone","finalize","end","Done","endUnsafe","interrupt","causeInterrupt","id","shutdown","clear","exitInterrupt","entry","resume","slice","offset","isDoneCause","takeAllUnsafe","releaseCapacity","takeAll","takeBetween","collect","out","empty","as","catchDone","whileLoop","while","body","step","items","void","n","min","max","takeBetweenUnsafe","andThen","awaitTake","takeUnsafe","poll","result","undefined","none","some","value","peek","head","array","await_","callback","exitVoid","add","delete","await","isFull","isFullUnsafe","into","effect","uninterruptibleMask","restore","matchCauseEffect","onFailure","onSuccess","_","exitFail","taker","scheduleTask","Math","openState","awaiter"],"sources":["../src/Queue.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;AAUA,OAAO,KAAKA,GAAG,MAAM,YAAY;AAIjC,SAASC,QAAQ,EAAEC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAEnE,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AACtD,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,OAAO,KAAKC,IAAI,MAAM,WAAW;AAIjC,MAAMC,MAAM,GAAG,eAAe;AAC9B,MAAMC,aAAa,GAAG,uBAAuB;AAC7C,MAAMC,aAAa,GAAG,uBAAuB;AAE7C;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,OAAO,GAClBC,CAAU,IACWN,WAAW,CAACM,CAAC,EAAEJ,MAAM,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMK,SAAS,GACpBD,CAAU,IACaN,WAAW,CAACM,CAAC,EAAEH,aAAa,CAAC;AAEtD;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMK,SAAS,GACpBF,CAAU,IACaN,WAAW,CAACM,CAAC,EAAEF,aAAa,C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,GAAG,CAAC;IACjB,MAAMI,QAAQ,GAAG,CAACpC,WAAW,CAACwD,IAAI,CAAC5C,IAAI,CAACwB,QAAQ,CAAE,CAAC;IACnD6D,eAAe,CAACrF,IAAI,CAAC;IACrB,OAAOwB,QAAQ;EACjB;EACA,OAAO,EAAE;AACX,CAAC;AAED,MAAM6C,QAAQ,GAAGA,CAAOrE,IAAmC,EAAEiE,IAAuB,KAAI;EACtF,IAAIjE,IAAI,CAACQ,KAAK,CAACC,IAAI,KAAK,MAAM,EAAE;IAC9B;EACF;EACA,MAAM8H,SAAS,GAAGvI,IAAI,CAACQ,KAAK;EAC5BR,IAAI,CAACQ,KAAK,GAAG;IAAEC,IAAI,EAAE,MAAM;IAAEwD;EAAI,CAAE;EACnC,KAAK,MAAMmE,KAAK,IAAIG,SAAS,CAAC7G,MAAM,EAAE;IACpC0G,KAAK,CAACnE,IAAI,CAAC;EACb;EACAsE,SAAS,CAAC7G,MAAM,CAACmD,KAAK,EAAE;EACxB,KAAK,MAAM2D,OAAO,IAAID,SAAS,CAAC1G,QAAQ,EAAE;IACxC2G,OAAO,CAACvE,IAAI,CAAC;EACf;EACAsE,SAAS,CAAC1G,QAAQ,CAACgD,KAAK,EAAE;AAC5B,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Random.d.ts b/.opencode/node_modules/effect/dist/Random.d.ts index 113c751d4a088e1f5d037ca08a0d8af6645c9447..15f38567eb98206229a4d58c950d0bf5c450ecba 100644 --- a/.opencode/node_modules/effect/dist/Random.d.ts +++ b/.opencode/node_modules/effect/dist/Random.d.ts @@ -1,32 +1,31 @@ /** - * The Random module provides a service for generating random numbers in Effect - * programs. It offers a testable and composable way to work with randomness, - * supporting integers, floating-point numbers, and range-based generation. + * Provides pseudo-random generation through an Effect service. * - * @example - * ```ts - * import { Effect, Random } from "effect" - * - * const program = Effect.gen(function*() { - * const randomFloat = yield* Random.next - * console.log("Random float:", randomFloat) - * - * const randomInt = yield* Random.nextInt - * console.log("Random integer:", randomInt) - * - * const diceRoll = yield* Random.nextIntBetween(1, 6) - * console.log("Dice roll:", diceRoll) - * }) - * ``` + * This module exposes effectful generators for booleans, doubles, safe + * integers, bounded numbers, shuffling, and deterministic seeded runs. Because + * random generation is a service, tests and applications can replace the + * generator used by Effect programs. * * @since 4.0.0 */ import type * as Context from "./Context.ts"; import * as Effect from "./Effect.ts"; /** - * Represents a service for generating random numbers. + * Represents a service for generating pseudo-random numbers. + * + * **When to use** + * + * Use to access or provide the random-number generator service used by Effect + * programs. + * + * **Gotchas** + * + * The default implementation is based on `Math.random` and is not + * cryptographically secure. Replace the service with a cryptographically secure + * implementation before using these generators for security-sensitive values. + * + * **Example** (Accessing the random service) * - * @example * ```ts * import { Effect, Random } from "effect" * @@ -34,26 +33,30 @@ import * as Effect from "./Effect.ts"; * const float = yield* Random.next * const integer = yield* Random.nextInt * const inRange = yield* Random.nextIntBetween(1, 100) - * const uuid = yield* Random.nextUUIDv4 * * console.log("Float:", float) * console.log("Integer:", integer) * console.log("In range:", inRange) - * console.log("UUID:", uuid) * }) * ``` * - * @since 4.0.0 * @category Random Number Generators + * @since 2.0.0 */ export declare const Random: Context.Reference<{ nextIntUnsafe(): number; nextDoubleUnsafe(): number; }>; /** - * Generates a random number between 0 (inclusive) and 1 (inclusive). + * Generates a random number between 0 (inclusive) and 1 (exclusive). + * + * **When to use** + * + * Use to generate a pseudo-random floating-point number in the standard + * `[0, 1)` range. + * + * **Example** (Generating a random number) * - * @example * ```ts * import { Effect, Random } from "effect" * @@ -63,14 +66,19 @@ export declare const Random: Context.Reference<{ * }) * ``` * - * @since 4.0.0 * @category Random Number Generators + * @since 2.0.0 */ export declare const next: Effect.Effect; /** * Generates a random boolean value. * - * @example + * **When to use** + * + * Use to make a pseudo-random true-or-false choice. + * + * **Example** (Generating a random boolean) + * * ```ts * import { Effect, Random } from "effect" * @@ -80,15 +88,21 @@ export declare const next: Effect.Effect; * }) * ``` * - * @since 4.0.0 * @category Random Number Generators + * @since 2.0.0 */ export declare const nextBoolean: Effect.Effect; /** * Generates a random integer between `Number.MIN_SAFE_INTEGER` (inclusive) * and `Number.MAX_SAFE_INTEGER` (inclusive). * - * @example + * **When to use** + * + * Use to generate a pseudo-random safe integer across the full safe-integer + * range. + * + * **Example** (Generating a random integer) + * * ```ts * import { Effect, Random } from "effect" * @@ -98,14 +112,19 @@ export declare const nextBoolean: Effect.Effect; * }) * ``` * - * @since 4.0.0 * @category Random Number Generators + * @since 2.0.0 */ export declare const nextInt: Effect.Effect; /** - * Generates a random number between `min` (inclusive) and `max` (inclusive). + * Generates a random number between `min` (inclusive) and `max` (exclusive). + * + * **When to use** + * + * Use to generate a pseudo-random floating-point number within a numeric range. + * + * **Example** (Generating a bounded random number) * - * @example * ```ts * import { Effect, Random } from "effect" * @@ -115,17 +134,25 @@ export declare const nextInt: Effect.Effect; * }) * ``` * - * @since 4.0.0 * @category Random Number Generators + * @since 4.0.0 */ export declare const nextBetween: (min: number, max: number) => Effect.Effect; /** - * Generates a random number between `min` (inclusive) and `max` (inclusive). + * Generates a random integer between `min` and `max`. + * + * **When to use** + * + * Use to generate a pseudo-random integer within a rounded numeric range. + * + * **Details** * - * Set `options.halfOpen: true` to generate in the half-open range - * `[min, max)`. + * The lower bound is rounded up with `Math.ceil` and the upper bound is + * rounded down with `Math.floor`. By default the range is inclusive; set + * `options.halfOpen: true` to exclude the upper bound. + * + * **Example** (Generating a bounded random integer) * - * @example * ```ts * import { Effect, Random } from "effect" * @@ -138,8 +165,8 @@ export declare const nextBetween: (min: number, max: number) => Effect.Effect(elements: Iterable) => Effect.Effect>; /** - * Generates a random UUID (v4) string. + * Seeds the pseudo-random number generator with the specified value. * - * @example - * ```ts - * import { Effect, Random } from "effect" + * **When to use** * - * const program = Effect.gen(function*() { - * const uuid = yield* Random.nextUUIDv4 - * console.log("UUID:", uuid) - * }) - * ``` + * Use to run an effect with a deterministic pseudo-random sequence. * - * @since 4.0.0 - * @category Random Number Generators - */ -export declare const nextUUIDv4: Effect.Effect; -/** - * Seeds the pseudorandom number generator with the specified value. + * **Details** + * + * Using the same seed produces the same random sequence, which is useful for + * tests and reproducible simulations. + * + * **Gotchas** + * + * Use an unpredictable seed when uniqueness or unpredictability matters. * - * Take care to select a seed wit hhigh entropy to avoid issues with the - * quality of random number generation. + * **Example** (Seeding random generation) * - * @example * ```ts * import { Effect, Random } from "effect" * @@ -203,17 +229,28 @@ export declare const nextUUIDv4: Effect.Effect; * Effect.runPromise(seeded2) * ``` * - * @since 4.0.0 * @category Seeding + * @since 4.0.0 */ export declare const withSeed: { /** - * Seeds the pseudorandom number generator with the specified value. + * Seeds the pseudo-random number generator with the specified value. + * + * **When to use** + * + * Use to run an effect with a deterministic pseudo-random sequence. + * + * **Details** * - * Take care to select a seed wit hhigh entropy to avoid issues with the - * quality of random number generation. + * Using the same seed produces the same random sequence, which is useful for + * tests and reproducible simulations. + * + * **Gotchas** + * + * Use an unpredictable seed when uniqueness or unpredictability matters. + * + * **Example** (Seeding random generation) * - * @example * ```ts * import { Effect, Random } from "effect" * @@ -232,17 +269,28 @@ export declare const withSeed: { * Effect.runPromise(seeded2) * ``` * - * @since 4.0.0 * @category Seeding + * @since 4.0.0 */ (seed: string | number): (self: Effect.Effect) => Effect.Effect; /** - * Seeds the pseudorandom number generator with the specified value. + * Seeds the pseudo-random number generator with the specified value. + * + * **When to use** + * + * Use to run an effect with a deterministic pseudo-random sequence. + * + * **Details** + * + * Using the same seed produces the same random sequence, which is useful for + * tests and reproducible simulations. * - * Take care to select a seed wit hhigh entropy to avoid issues with the - * quality of random number generation. + * **Gotchas** + * + * Use an unpredictable seed when uniqueness or unpredictability matters. + * + * **Example** (Seeding random generation) * - * @example * ```ts * import { Effect, Random } from "effect" * @@ -261,8 +309,8 @@ export declare const withSeed: { * Effect.runPromise(seeded2) * ``` * - * @since 4.0.0 * @category Seeding + * @since 4.0.0 */ (self: Effect.Effect, seed: string | number): Effect.Effect; }; diff --git a/.opencode/node_modules/effect/dist/Random.d.ts.map b/.opencode/node_modules/effect/dist/Random.d.ts.map index 19e69c1e1ae0602da14fc61e72608dcf213969d0..953a20b2c436399a5666940b8458820a3318b81c 100644 --- a/.opencode/node_modules/effect/dist/Random.d.ts.map +++ b/.opencode/node_modules/effect/dist/Random.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Random.d.ts","sourceRoot":"","sources":["../src/Random.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAKrC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC;IACrC,aAAa,IAAI,MAAM,CAAA;IACvB,gBAAgB,IAAI,MAAM,CAAA;CAC3B,CAAiB,CAAA;AAKlB;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAA2C,CAAA;AAElF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAiD,CAAA;AAEhG;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAwC,CAAA;AAElF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,KAAK,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CACd,CAAA;AAE7D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,UAAU;IACjE,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAC5B,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAOvB,CAAA;AAED;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K,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IAC1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;CAI3B,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Random.js b/.opencode/node_modules/effect/dist/Random.js index 4160921d4c18bd46bb393d36e0a13d292617c71e..6750ac7186efb6f4d49517732d4ca91b6cb7b2fd 100644 --- a/.opencode/node_modules/effect/dist/Random.js +++ b/.opencode/node_modules/effect/dist/Random.js @@ -3,9 +3,21 @@ import { dual } from "./Function.js"; import * as random from "./internal/random.js"; import * as Predicate from "./Predicate.js"; /** - * Represents a service for generating random numbers. + * Represents a service for generating pseudo-random numbers. + * + * **When to use** + * + * Use to access or provide the random-number generator service used by Effect + * programs. + * + * **Gotchas** + * + * The default implementation is based on `Math.random` and is not + * cryptographically secure. Replace the service with a cryptographically secure + * implementation before using these generators for security-sensitive values. + * + * **Example** (Accessing the random service) * - * @example * ```ts * import { Effect, Random } from "effect" * @@ -13,24 +25,28 @@ import * as Predicate from "./Predicate.js"; * const float = yield* Random.next * const integer = yield* Random.nextInt * const inRange = yield* Random.nextIntBetween(1, 100) - * const uuid = yield* Random.nextUUIDv4 * * console.log("Float:", float) * console.log("Integer:", integer) * console.log("In range:", inRange) - * console.log("UUID:", uuid) * }) * ``` * - * @since 4.0.0 * @category Random Number Generators + * @since 2.0.0 */ export const Random = random.Random; const randomWith = f => Effect.withFiber(fiber => Effect.succeed(f(fiber.getRef(Random)))); /** - * Generates a random number between 0 (inclusive) and 1 (inclusive). + * Generates a random number between 0 (inclusive) and 1 (exclusive). + * + * **When to use** + * + * Use to generate a pseudo-random floating-point number in the standard + * `[0, 1)` range. + * + * **Example** (Generating a random number) * - * @example * ```ts * import { Effect, Random } from "effect" * @@ -40,14 +56,19 @@ const randomWith = f => Effect.withFiber(fiber => Effect.succeed(f(fiber.getRef( * }) * ``` * - * @since 4.0.0 * @category Random Number Generators + * @since 2.0.0 */ export const next = /*#__PURE__*/randomWith(r => r.nextDoubleUnsafe()); /** * Generates a random boolean value. * - * @example + * **When to use** + * + * Use to make a pseudo-random true-or-false choice. + * + * **Example** (Generating a random boolean) + * * ```ts * import { Effect, Random } from "effect" * @@ -57,15 +78,21 @@ export const next = /*#__PURE__*/randomWith(r => r.nextDoubleUnsafe()); * }) * ``` * - * @since 4.0.0 * @category Random Number Generators + * @since 2.0.0 */ export const nextBoolean = /*#__PURE__*/randomWith(r => r.nextDoubleUnsafe() > 0.5); /** * Generates a random integer between `Number.MIN_SAFE_INTEGER` (inclusive) * and `Number.MAX_SAFE_INTEGER` (inclusive). * - * @example + * **When to use** + * + * Use to generate a pseudo-random safe integer across the full safe-integer + * range. + * + * **Example** (Generating a random integer) + * * ```ts * import { Effect, Random } from "effect" * @@ -75,14 +102,19 @@ export const nextBoolean = /*#__PURE__*/randomWith(r => r.nextDoubleUnsafe() > 0 * }) * ``` * - * @since 4.0.0 * @category Random Number Generators + * @since 2.0.0 */ export const nextInt = /*#__PURE__*/randomWith(r => r.nextIntUnsafe()); /** - * Generates a random number between `min` (inclusive) and `max` (inclusive). + * Generates a random number between `min` (inclusive) and `max` (exclusive). + * + * **When to use** + * + * Use to generate a pseudo-random floating-point number within a numeric range. + * + * **Example** (Generating a bounded random number) * - * @example * ```ts * import { Effect, Random } from "effect" * @@ -92,17 +124,25 @@ export const nextInt = /*#__PURE__*/randomWith(r => r.nextIntUnsafe()); * }) * ``` * - * @since 4.0.0 * @category Random Number Generators + * @since 4.0.0 */ export const nextBetween = (min, max) => randomWith(r => r.nextDoubleUnsafe() * (max - min) + min); /** - * Generates a random number between `min` (inclusive) and `max` (inclusive). + * Generates a random integer between `min` and `max`. + * + * **When to use** + * + * Use to generate a pseudo-random integer within a rounded numeric range. + * + * **Details** * - * Set `options.halfOpen: true` to generate in the half-open range - * `[min, max)`. + * The lower bound is rounded up with `Math.ceil` and the upper bound is + * rounded down with `Math.floor`. By default the range is inclusive; set + * `options.halfOpen: true` to exclude the upper bound. + * + * **Example** (Generating a bounded random integer) * - * @example * ```ts * import { Effect, Random } from "effect" * @@ -115,8 +155,8 @@ export const nextBetween = (min, max) => randomWith(r => r.nextDoubleUnsafe() * * }) * ``` * - * @since 4.0.0 * @category Random Number Generators + * @since 2.0.0 */ export const nextIntBetween = (min, max, options) => { const extra = options?.halfOpen === true ? 0 : 1; @@ -129,7 +169,12 @@ export const nextIntBetween = (min, max, options) => { /** * Uses the pseudo-random number generator to shuffle the specified iterable. * - * @example + * **When to use** + * + * Use to randomly reorder an iterable using the active `Random` service. + * + * **Example** (Shuffling values) + * * ```ts * import { Effect, Random } from "effect" * @@ -139,8 +184,8 @@ export const nextIntBetween = (min, max, options) => { * }) * ``` * - * @since 4.0.0 * @category Random Number Generators + * @since 2.0.0 */ export const shuffle = elements => randomWith(r => { const buffer = Array.from(elements); @@ -153,43 +198,23 @@ export const shuffle = elements => randomWith(r => { return buffer; }); /** - * Generates a random UUID (v4) string. + * Seeds the pseudo-random number generator with the specified value. * - * @example - * ```ts - * import { Effect, Random } from "effect" + * **When to use** * - * const program = Effect.gen(function*() { - * const uuid = yield* Random.nextUUIDv4 - * console.log("UUID:", uuid) - * }) - * ``` + * Use to run an effect with a deterministic pseudo-random sequence. * - * @since 4.0.0 - * @category Random Number Generators - */ -export const nextUUIDv4 = /*#__PURE__*/randomWith(r => { - // Generate 16 random bytes (128 bits) for UUID - const bytes = []; - for (let i = 0; i < 16; i++) { - // Get unsigned byte [0, 255] from nextInt (signed 32-bit) - bytes.push(r.nextIntUnsafe() >>> 0 & 0xFF); - } - // Set version to 4 (bits 12-15 of time_hi_and_version) - bytes[6] = bytes[6] & 0x0F | 0x40; - // Set variant to RFC 4122 (bits 6-7 of clock_seq_hi_and_reserved) - bytes[8] = bytes[8] & 0x3F | 0x80; - // Format as UUID string: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx - const hex = n => n.toString(16).padStart(2, "0"); - return [bytes.slice(0, 4).map(hex).join(""), bytes.slice(4, 6).map(hex).join(""), bytes.slice(6, 8).map(hex).join(""), bytes.slice(8, 10).map(hex).join(""), bytes.slice(10, 16).map(hex).join("")].join("-"); -}); -/** - * Seeds the pseudorandom number generator with the specified value. + * **Details** + * + * Using the same seed produces the same random sequence, which is useful for + * tests and reproducible simulations. + * + * **Gotchas** * - * Take care to select a seed wit hhigh entropy to avoid issues with the - * quality of random number generation. + * Use an unpredictable seed when uniqueness or unpredictability matters. + * + * **Example** (Seeding random generation) * - * @example * ```ts * import { Effect, Random } from "effect" * @@ -208,8 +233,8 @@ export const nextUUIDv4 = /*#__PURE__*/randomWith(r => { * Effect.runPromise(seeded2) * ``` * - * @since 4.0.0 * @category Seeding + * @since 4.0.0 */ export const withSeed = /*#__PURE__*/dual(2, (self, seed) => Effect.provideService(self, Random, ISAAC_CSPRNG(seed))); /*/////////////////////////////////////////////////////////////////////////////////////////////////// @@ -388,7 +413,7 @@ function ISAAC_CSPRNG(userSeed) { } } /** - * Returns a signed, random integer in the range [-2^31, 2^31]. + * Returns a signed, random integer in the range [-2^31, 2^31). */ function nextInt32() { if (!generation--) { @@ -398,13 +423,7 @@ function ISAAC_CSPRNG(userSeed) { return result[generation]; } function nextIntUnsafe() { - // Get 32 bits (unsigned) - const low = nextInt32() >>> 0; // [0, 2^32-1] - // Get 21 more bits for a total of 53 - const high = nextInt32() & 0x1FFFFF; // [0, 2^21-1] - // Combine: high bits * 2^32 + low bits, then shift to signed range - // This gives [0, 2^53-1], subtract 2^52 to center around 0 - return high * 0x100000000 + low - 0x10000000000000; + return Math.floor(nextDoubleUnsafe() * (Number.MAX_SAFE_INTEGER - Number.MIN_SAFE_INTEGER + 1)) + Number.MIN_SAFE_INTEGER; } /** * Returns a 53-bit fraction in the range [0, 1). @@ -414,7 +433,7 @@ function ISAAC_CSPRNG(userSeed) { const lo = nextInt32() >>> 0; // full 32 bits // 53-bit integer const combined = hi * 4294967296 + lo; - return combined / 9007199254740991; // [0, 1) + return combined / 0x20000000000000; // [0, 1) } return { nextIntUnsafe, @@ -438,83 +457,15 @@ function add32(x, y) { // return (0xBE02 << 16) | (0x14579 & 0xffff) = 0xBE024579 return msb << 16 | lsb & 0xffff; } +const seedEncoder = /*#__PURE__*/new TextEncoder(); /** - * Convert a UTF-16 strings to UTF-8 encoded 32-bit integers (little-endian). + * Convert a string to UTF-8 encoded 32-bit integers (little-endian). */ function toIntArray(seed) { - let c1 = 0; // First UTF-16 code unit - let c2 = 0; // Second UTF-16 code unit (for surrogate pairs) - let unicode = 0; // Combined unicode code point from surrogate pair - const result = []; // Result array of 32-bit integers - const buffer = []; // Temporary buffer for the UTF-8 bytes (max 4 bytes) - const length = seed.length - 1; - let index = 0; - while (index < length) { - c1 = seed.charCodeAt(index++); - c2 = seed.charCodeAt(index + 1); - // 0x0000 - 0x007f: ASCII, single byte UTF-8: 0xxxxxxxx - // Example: 'A' (0x41) -> [0x41] - if (c1 < 0x0080) { - buffer.push(c1); - } // - // 0x0080 - 0x07ff: Two byte UTF-8: 110xxxxx 10xxxxxx - // Example: '¢' (0xA2) -> [0xC2, 0xA2] - else if (c1 < 0x0800) { - // First byte: upper 5 bits + 110xxxxx marker - // 0xA2 >>> 6 (0x02), & 0x1f = 0x02, | 0xc0 = 0xC2 - buffer.push(c1 >>> 6 & 0x1f | 0xc0); - // Second byte: lower 6 bits + 10xxxxxxxx marker - // 0xA2 & 0x3f = 0x22, | 0x80 = 0xA2 - buffer.push(c1 >>> 0 & 0x3f | 0x80); - } // - // 0x0800 - 0xffff (non-surrogate): Three byte UTF-8: 1110xxxx 10xxxxxx 10xxxxxx - // Example: '€' (0x20AC) -> [0xE2, 0x82, 0xAC] - else if ((c1 & 0xf800) != 0xd800) { - // First byte: top 4 bits + 1110xxxx marker - // 0x20AC >>> 12 = 0x02, & 0x0f = 0x02, | 0xe0 = 0xE2 - buffer.push(c1 >>> 12 & 0x0f | 0xe0); - // Second byte: middle 6 bits + 10xxxxxx marker - // 0x20AC >>> 6 = 0x82, & 0x3f = 0x02, | 0x80 = 0x82 - buffer.push(c1 >>> 6 & 0x3f | 0x80); - // Third byte: lower 6 bits + 10xxxxxx marker - // 0x20AC & 0x3f = 0x2C, | 0x80 = 0xAC - buffer.push(c1 >>> 0 & 0x3f | 0x80); - } // - // 0xd800 - 0xdfff: Surrogate pairs, four byte UTF-8: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - // Example: '𐍈' (U+10348, surrogates 0xD800 0xDF48) -> [0xF0, 0x90, 0x8D, 0x88] - else if ((c1 & 0xfc00) == 0xd800 && (c2 & 0xfc00) == 0xdc00) { - // Decode surrogate pair: combine 10 bits from each + 0x10000 - // ((0xDF48 & 0x3f) | ((0xD800 & 0x3f) << 10)) + 0x10000 = 0x10348 - unicode = (c2 & 0x3f | (c1 & 0x3f) << 10) + 0x10000; - // First byte: top 3 bits + 11110xxx marker - // 0x10348 >>> 18 = 0x00, & 0x07 = 0x00, | 0xf0 = 0xF0 - buffer.push(unicode >>> 18 & 0x07 | 0xf0); - // Second byte: next 6 bits + 10xxxxxx marker - // 0x10348 >>> 12 = 0x10, & 0x3f = 0x10, | 0x80 = 0x90 - buffer.push(unicode >>> 12 & 0x3f | 0x80); - // Third byte: next 6 bits + 10xxxxxx marker - // 0x10348 >>> 6 = 0x40D, & 0x3f = 0x0D, | 0x80 = 0x8D - buffer.push(unicode >>> 6 & 0x3f | 0x80); - // Fourth byte: lower 6 bits + 10xxxxxx marker - // 0x10348 & 0x3f = 0x08, | 0x80 = 0x88 - buffer.push(unicode >>> 0 & 0x3f | 0x80); - index++; // Skip second surrogate - } else { - // invalid char - } - // Pack 4 UTF-8 bytes -> 32-bit int (little-endian) - // Example: [0xE2, 0x82, 0xAC, 0x00] -> 0x00ACE2E2 - if (buffer.length > 3) { - result.push(buffer.shift() << 0 | - // Byte 0 at bits 0-7: 0xE2 << 0 = 0x000000E2 - buffer.shift() << 8 | - // Byte 1 at bits 8-15: 0x82 << 8 = 0x00008200 - buffer.shift() << 16 | - // Byte 2 at bits 16-23: 0xAC << 16 = 0x00AC0000 - buffer.shift() << 24 // Byte 3 at bits 24-31: 0x00 << 24 = 0x00000000 - ); - // Result: 0x00AC82E2 - } + const bytes = seedEncoder.encode(seed); + const result = []; + for (let index = 0; index < bytes.length; index += 4) { + result.push((bytes[index] ?? 0) << 0 | (bytes[index + 1] ?? 0) << 8 | (bytes[index + 2] ?? 0) << 16 | (bytes[index + 3] ?? 0) << 24); } return result; } diff --git a/.opencode/node_modules/effect/dist/Random.js.map b/.opencode/node_modules/effect/dist/Random.js.map index b3fd2a5fafd5c2bf157aab43c45e31e9b0e15fd6..ef8875edfd1d8a2c0fb35c7f06d5382b240b5eb6 100644 --- a/.opencode/node_modules/effect/dist/Random.js.map +++ b/.opencode/node_modules/effect/dist/Random.js.map @@ -1 +1 @@ -{"version":3,"file":"Random.js","names":["Effect","dual","random","Predicate","Random","randomWith","f","withFiber","fiber","succeed","getRef","next","r","nextDoubleUnsafe","nextBoolean","nextInt","nextIntUnsafe","nextBetween","min","max","nextIntBetween","options","extra","halfOpen","minInt","Math","ceil","maxInt","floor","shuffle","elements","buffer","Array","from","i","length","index","value","nextUUIDv4","bytes","push","hex","n","toString","padStart","slice","map","join","withSeed","self","seed","provideService","ISAAC_CSPRNG","userSeed","memory","result","accumulator","lastResult","generation","counter","internalSeed","isUndefined","getInitialSeed","uint32a","Uint32Array","crypto","getRandomValues","reset","magicNumber","a","b","c","d","e","g","h","isString","toIntArray","mix","add32","pnrg","x","y","abs","nextInt32","low","high","hi","lo","combined","lsb","msb","c1","c2","unicode","charCodeAt","shift"],"sources":["../src/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,GAAI,IAAI,CAAC;MAC7C;MACA;MACA/D,MAAM,CAACS,IAAI,CAAGsD,OAAO,KAAK,CAAC,GAAI,IAAI,GAAI,IAAI,CAAC;MAC5C;MACA;MACA/D,MAAM,CAACS,IAAI,CAAGsD,OAAO,KAAK,CAAC,GAAI,IAAI,GAAI,IAAI,CAAC;MAC5C1D,KAAK,EAAE,EAAC;IACV,CAAC,MAAM;MACL;IAAA;IAGF;IACA;IACA,IAAIL,MAAM,CAACI,MAAM,GAAG,CAAC,EAAE;MACrBoB,MAAM,CAACf,IAAI,CACRT,MAAM,CAACiE,KAAK,EAAG,IAAI,CAAC;MAAI;MACtBjE,MAAM,CAACiE,KAAK,EAAG,IAAI,CAAE;MAAG;MACxBjE,MAAM,CAACiE,KAAK,EAAG,IAAI,EAAG;MAAG;MACzBjE,MAAM,CAACiE,KAAK,EAAG,IAAI,EAAG,CAAC;OAC3B;MACD;IACF;EACF;EAEA,OAAOzC,MAAM;AACf","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Random.js","names":["Effect","dual","random","Predicate","Random","randomWith","f","withFiber","fiber","succeed","getRef","next","r","nextDoubleUnsafe","nextBoolean","nextInt","nextIntUnsafe","nextBetween","min","max","nextIntBetween","options","extra","halfOpen","minInt","Math","ceil","maxInt","floor","shuffle","elements","buffer","Array","from","i","length","index","value","withSeed","self","seed","provideService","ISAAC_CSPRNG","userSeed","memory","result","accumulator","lastResult","generation","counter","internalSeed","isUndefined","getInitialSeed","uint32a","Uint32Array","crypto","getRandomValues","reset","magicNumber","a","b","c","d","e","g","h","isString","toIntArray","mix","add32","pnrg","n","x","y","abs","nextInt32","Number","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","hi","lo","combined","lsb","msb","seedEncoder","TextEncoder","bytes","encode","push"],"sources":["../src/Random.ts"],"sourcesContent":[null],"mappings":"AAWA,OAAO,KAAKA,MAAM,MAAM,aAAa;AACrC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,MAAM,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CAAC,IAAI,CAAC,KAAK,EAAG,CAClC;EACH;EAEA,OAAOS,MAAM;AACf","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/RcMap.d.ts b/.opencode/node_modules/effect/dist/RcMap.d.ts index 120705c2cef37ed94988ef084ac5d66251de64f7..5e10d982eb475f1c961c99e8178a41dfa10c2936 100644 --- a/.opencode/node_modules/effect/dist/RcMap.d.ts +++ b/.opencode/node_modules/effect/dist/RcMap.d.ts @@ -1,4 +1,14 @@ /** + * Shares scoped resources by key and releases them when no one is using them. + * + * An `RcMap` runs a lookup effect the first time a key is requested, shares the + * in-progress or acquired resource with other callers for the same key, and + * tracks each caller through its current `Scope`. When the last scope for a key + * closes, the resource can be released, kept alive for an idle time, or removed + * by capacity limits or explicit invalidation. It is meant for resource + * lifecycles such as clients, sessions, and connections, not as a general + * mutable cache. + * * @since 3.5.0 */ import * as Cause from "./Cause.ts"; @@ -16,9 +26,13 @@ declare const TypeId = "~effect/RcMap"; * of resources indexed by keys. Resources are lazily acquired and automatically * released when no longer in use. * - * @since 3.5.0 - * @category models - * @example + * **When to use** + * + * Use to share scoped resources by key while automatically releasing them after + * their last active reference is gone. + * + * **Example** (Inspecting a reference-counted map) + * * ```ts * import { Effect, RcMap } from "effect" * @@ -43,6 +57,12 @@ declare const TypeId = "~effect/RcMap"; * console.log(`Capacity: ${dbConnectionMap.capacity}`) * }).pipe(Effect.scoped) * ``` + * + * @see {@link make} for creating an `RcMap` + * @see {@link get} for acquiring or retaining a resource by key + * + * @category models + * @since 3.5.0 */ export interface RcMap extends Pipeable { readonly [TypeId]: typeof TypeId; @@ -57,69 +77,41 @@ export interface RcMap extends Pipeable { * Represents the internal state of an RcMap, which can be either Open (active) * or Closed (shutdown and no longer accepting operations). * + * **When to use** + * + * Use when typing code that inspects an `RcMap`'s `state` field and narrows + * between open and closed lifecycle states. + * + * @see {@link RcMap} for the map value that exposes this state + * @see {@link State.Open} for the active state with entries + * @see {@link State.Closed} for the shutdown state + * + * @category models * @since 4.0.0 - * @category Models - * @example - * ```ts - * import type { RcMap } from "effect" - * - * // State is a union type that can be either: - * declare const openState: RcMap.State.Open - * declare const closedState: RcMap.State.Closed - * - * // Check the state type - * declare const state: RcMap.State - * if (state._tag === "Open") { - * // Access the internal map when open - * console.log("Map is open, contains entries") - * } else { - * // State is closed - * console.log("Map is closed") - * } - * ``` */ export type State = State.Open | State.Closed; /** * Namespace containing the internal state types for RcMap. * - * @since 4.0.0 - * @category Models - * @example - * ```ts - * import type { RcMap } from "effect" + * **When to use** * - * // The State namespace contains types for RcMap internal state: - * // - Open: Contains the active resource map - * // - Closed: Indicates the map is shut down - * // - Entry: Individual resource entries with metadata + * Use when referring to the concrete open, closed, and entry state shapes used + * by `RcMap`. * - * declare const openState: RcMap.State.Open - * declare const closedState: RcMap.State.Closed - * declare const entry: RcMap.State.Entry - * ``` + * @since 4.0.0 */ export declare namespace State { /** * Represents the open/active state of an RcMap, containing the actual * resource map that stores entries. * + * **When to use** + * + * Use when handling an `RcMap` that can still accept operations and contains + * stored entries. + * + * @category models * @since 4.0.0 - * @category Models - * @example - * ```ts - * import type { RcMap } from "effect" - * import * as MutableHashMap from "effect/MutableHashMap" - * - * // State.Open contains the active resource map - * declare const openState: RcMap.State.Open - * - * // Access the internal map when state is open - * if (openState._tag === "Open") { - * // The map contains Entry objects indexed by keys - * const hasKey = MutableHashMap.has(openState.map, "someKey") - * console.log(`Map contains key: ${hasKey}`) - * } - * ``` */ interface Open { readonly _tag: "Open"; @@ -129,21 +121,12 @@ export declare namespace State { * Represents the closed state of an RcMap, indicating that the map has been * shut down and will no longer accept new operations. * - * @since 4.0.0 - * @category Models - * @example - * ```ts - * import type { RcMap } from "effect" + * **When to use** * - * // State.Closed indicates the RcMap is shut down - * declare const closedState: RcMap.State.Closed + * Use when handling an `RcMap` after its owning scope has closed. * - * // Check for closed state - * if (closedState._tag === "Closed") { - * console.log("RcMap is closed, no operations allowed") - * // Any attempt to get resources will result in interruption - * } - * ``` + * @category models + * @since 4.0.0 */ interface Closed { readonly _tag: "Closed"; @@ -152,26 +135,13 @@ export declare namespace State { * Represents an individual entry in the RcMap, containing the resource's * metadata including reference count, expiration time, and lifecycle management. * - * @since 4.0.0 - * @category Models - * @example - * ```ts - * import type { RcMap } from "effect" - * - * // Entry contains all metadata for a resource in the map - * declare const entry: RcMap.State.Entry + * **When to use** * - * // Entry properties: - * // - deferred: Promise-like structure for the resource value - * // - scope: Manages the resource's lifecycle - * // - finalizer: Effect to run when cleaning up - * // - fiber: Optional background fiber for expiration - * // - expiresAt: Timestamp when resource expires - * // - refCount: Number of active references + * Use when inspecting the stored resource, reference count, and idle lifecycle + * metadata for a single key. * - * console.log(`Reference count: ${entry.refCount}`) - * console.log(`Expires at: ${entry.expiresAt}`) - * ``` + * @category models + * @since 4.0.0 */ interface Entry { readonly deferred: Deferred.Deferred; @@ -184,20 +154,24 @@ export declare namespace State { } } /** - * An `RcMap` can contain multiple reference counted resources that can be indexed + * Creates an `RcMap` that can contain multiple reference counted resources that can be indexed * by a key. The resources are lazily acquired on the first call to `get` and * released when the last reference is released. * - * Complex keys can extend `Equal` and `Hash` to allow lookups by value. + * **When to use** + * + * Use to create a scoped reference-counted map for resources that should be + * acquired once per key and shared while in use. * - * **Options** + * **Details** + * + * Complex keys can extend `Equal` and `Hash` to allow lookups by value. * * - `capacity`: The maximum number of resources that can be held in the map. * - `idleTimeToLive`: When the reference count reaches zero, the resource will be released after this duration. * - * @since 3.5.0 - * @category models - * @example + * **Example** (Creating a reference-counted map) + * * ```ts * import { Effect, RcMap } from "effect" * @@ -218,23 +192,33 @@ export declare namespace State { * ) * }) * ``` + * + * @see {@link get} for acquiring or retaining a resource by key + * @see {@link invalidate} for removing a resource from the map + * + * @category models + * @since 3.5.0 */ export declare const make: { /** - * An `RcMap` can contain multiple reference counted resources that can be indexed + * Creates an `RcMap` that can contain multiple reference counted resources that can be indexed * by a key. The resources are lazily acquired on the first call to `get` and * released when the last reference is released. * - * Complex keys can extend `Equal` and `Hash` to allow lookups by value. + * **When to use** + * + * Use to create a scoped reference-counted map for resources that should be + * acquired once per key and shared while in use. + * + * **Details** * - * **Options** + * Complex keys can extend `Equal` and `Hash` to allow lookups by value. * * - `capacity`: The maximum number of resources that can be held in the map. * - `idleTimeToLive`: When the reference count reaches zero, the resource will be released after this duration. * - * @since 3.5.0 - * @category models - * @example + * **Example** (Creating a reference-counted map) + * * ```ts * import { Effect, RcMap } from "effect" * @@ -255,6 +239,12 @@ export declare const make: { * ) * }) * ``` + * + * @see {@link get} for acquiring or retaining a resource by key + * @see {@link invalidate} for removing a resource from the map + * + * @category models + * @since 3.5.0 */ (options: { readonly lookup: (key: K) => Effect.Effect; @@ -262,20 +252,24 @@ export declare const make: { readonly capacity?: undefined; }): Effect.Effect, never, Scope.Scope | R>; /** - * An `RcMap` can contain multiple reference counted resources that can be indexed + * Creates an `RcMap` that can contain multiple reference counted resources that can be indexed * by a key. The resources are lazily acquired on the first call to `get` and * released when the last reference is released. * - * Complex keys can extend `Equal` and `Hash` to allow lookups by value. + * **When to use** * - * **Options** + * Use to create a scoped reference-counted map for resources that should be + * acquired once per key and shared while in use. + * + * **Details** + * + * Complex keys can extend `Equal` and `Hash` to allow lookups by value. * * - `capacity`: The maximum number of resources that can be held in the map. * - `idleTimeToLive`: When the reference count reaches zero, the resource will be released after this duration. * - * @since 3.5.0 - * @category models - * @example + * **Example** (Creating a reference-counted map) + * * ```ts * import { Effect, RcMap } from "effect" * @@ -296,6 +290,12 @@ export declare const make: { * ) * }) * ``` + * + * @see {@link get} for acquiring or retaining a resource by key + * @see {@link invalidate} for removing a resource from the map + * + * @category models + * @since 3.5.0 */ (options: { readonly lookup: (key: K) => Effect.Effect; @@ -304,13 +304,22 @@ export declare const make: { }): Effect.Effect, never, Scope.Scope | R>; }; /** - * Retrieves a value from the RcMap by key. If the resource doesn't exist, it will be - * acquired using the lookup function. The resource is reference counted and will be - * released when the scope closes. + * Gets the resource for a key, acquiring it with the map's lookup function when + * the key is not already cached. + * + * **When to use** + * + * Use to acquire or retain the resource for a key within the current scope. + * + * **Details** + * + * The resource's reference count is incremented for the current `Scope`, and a + * release finalizer is added to that scope. When the current scope closes, the + * reference is released; the resource is closed when the last reference is + * released, subject to the map's idle time-to-live setting. + * + * **Example** (Acquiring a resource) * - * @since 3.5.0 - * @category combinators - * @example * ```ts * import { Effect, RcMap } from "effect" * @@ -328,16 +337,31 @@ export declare const make: { * console.log(resource) // "Resource: database" * }).pipe(Effect.scoped) * ``` + * + * @see {@link make} for creating the reference-counted map + * @see {@link invalidate} for removing a resource by key + * + * @category combinators + * @since 3.5.0 */ export declare const get: { /** - * Retrieves a value from the RcMap by key. If the resource doesn't exist, it will be - * acquired using the lookup function. The resource is reference counted and will be - * released when the scope closes. + * Gets the resource for a key, acquiring it with the map's lookup function when + * the key is not already cached. + * + * **When to use** + * + * Use to acquire or retain the resource for a key within the current scope. + * + * **Details** + * + * The resource's reference count is incremented for the current `Scope`, and a + * release finalizer is added to that scope. When the current scope closes, the + * reference is released; the resource is closed when the last reference is + * released, subject to the map's idle time-to-live setting. + * + * **Example** (Acquiring a resource) * - * @since 3.5.0 - * @category combinators - * @example * ```ts * import { Effect, RcMap } from "effect" * @@ -355,16 +379,31 @@ export declare const get: { * console.log(resource) // "Resource: database" * }).pipe(Effect.scoped) * ``` + * + * @see {@link make} for creating the reference-counted map + * @see {@link invalidate} for removing a resource by key + * + * @category combinators + * @since 3.5.0 */ (key: K): (self: RcMap) => Effect.Effect; /** - * Retrieves a value from the RcMap by key. If the resource doesn't exist, it will be - * acquired using the lookup function. The resource is reference counted and will be - * released when the scope closes. + * Gets the resource for a key, acquiring it with the map's lookup function when + * the key is not already cached. + * + * **When to use** + * + * Use to acquire or retain the resource for a key within the current scope. + * + * **Details** + * + * The resource's reference count is incremented for the current `Scope`, and a + * release finalizer is added to that scope. When the current scope closes, the + * reference is released; the resource is closed when the last reference is + * released, subject to the map's idle time-to-live setting. + * + * **Example** (Acquiring a resource) * - * @since 3.5.0 - * @category combinators - * @example * ```ts * import { Effect, RcMap } from "effect" * @@ -382,15 +421,28 @@ export declare const get: { * console.log(resource) // "Resource: database" * }).pipe(Effect.scoped) * ``` + * + * @see {@link make} for creating the reference-counted map + * @see {@link invalidate} for removing a resource by key + * + * @category combinators + * @since 3.5.0 */ (self: RcMap, key: K): Effect.Effect; }; /** - * Returns an array of all keys currently stored in the RcMap. + * Returns an iterable of all keys currently stored in the `RcMap`. + * + * **When to use** + * + * Use to inspect which keys currently have stored resources in an `RcMap`. + * + * **Details** + * + * If the `RcMap` has been closed, the effect is interrupted. + * + * **Example** (Listing keys) * - * @since 3.5.0 - * @category combinators - * @example * ```ts * import { Effect, RcMap } from "effect" * @@ -409,15 +461,23 @@ export declare const get: { * console.log(allKeys) // ["foo", "bar", "baz"] * }).pipe(Effect.scoped) * ``` + * + * @see {@link has} for checking one key without enumerating all keys + * + * @category combinators + * @since 3.8.0 */ export declare const keys: (self: RcMap) => Effect.Effect>; /** * Invalidates and removes a specific key from the RcMap. If the resource is not * currently in use (reference count is 0), it will be immediately released. * - * @since 3.5.0 - * @category combinators - * @example + * **When to use** + * + * Use to remove a resource by key so the next access performs a fresh lookup. + * + * **Example** (Invalidating a resource) + * * ```ts * import { Effect, RcMap } from "effect" * @@ -441,15 +501,24 @@ export declare const keys: (self: RcMap) => Effect.Effect(key: K): (self: RcMap) => Effect.Effect; /** * Invalidates and removes a specific key from the RcMap. If the resource is not * currently in use (reference count is 0), it will be immediately released. * - * @since 3.5.0 - * @category combinators - * @example + * **When to use** + * + * Use to remove a resource by key so the next access performs a fresh lookup. + * + * **Example** (Invalidating a resource) + * * ```ts * import { Effect, RcMap } from "effect" * @@ -505,22 +583,88 @@ export declare const invalidate: { * yield* RcMap.get(map, "cache") * }).pipe(Effect.scoped) * ``` + * + * @see {@link get} for acquiring or retaining the resource for a key + * @see {@link touch} for extending the idle lifetime without removing the entry + * + * @category combinators + * @since 3.13.0 */ (self: RcMap, key: K): Effect.Effect; }; /** - * @since 3.17.7 + * Returns whether the `RcMap` currently contains an entry for the specified + * key. + * + * **When to use** + * + * Use to check whether a key is already present in an `RcMap` without running + * the lookup function or acquiring a missing resource. + * + * **Details** + * + * This operation only checks the current map state. + * + * **Gotchas** + * + * Closed maps return `false`, so `false` does not distinguish a missing key + * from a closed map. + * + * @see {@link get} for acquiring or retaining the resource for a key + * @see {@link keys} for enumerating all currently stored keys + * * @category combinators + * @since 3.17.7 */ export declare const has: { /** - * @since 3.17.7 + * Returns whether the `RcMap` currently contains an entry for the specified + * key. + * + * **When to use** + * + * Use to check whether a key is already present in an `RcMap` without running + * the lookup function or acquiring a missing resource. + * + * **Details** + * + * This operation only checks the current map state. + * + * **Gotchas** + * + * Closed maps return `false`, so `false` does not distinguish a missing key + * from a closed map. + * + * @see {@link get} for acquiring or retaining the resource for a key + * @see {@link keys} for enumerating all currently stored keys + * * @category combinators + * @since 3.17.7 */ (key: K): (self: RcMap) => Effect.Effect; /** - * @since 3.17.7 + * Returns whether the `RcMap` currently contains an entry for the specified + * key. + * + * **When to use** + * + * Use to check whether a key is already present in an `RcMap` without running + * the lookup function or acquiring a missing resource. + * + * **Details** + * + * This operation only checks the current map state. + * + * **Gotchas** + * + * Closed maps return `false`, so `false` does not distinguish a missing key + * from a closed map. + * + * @see {@link get} for acquiring or retaining the resource for a key + * @see {@link keys} for enumerating all currently stored keys + * * @category combinators + * @since 3.17.7 */ (self: RcMap, key: K): Effect.Effect; }; @@ -529,9 +673,12 @@ export declare const has: { * `idleTimeToLive` configured, calling `touch` will reset the expiration * timer for the specified key. * - * @since 3.5.0 - * @category combinators - * @example + * **When to use** + * + * Use to keep an idle resource alive longer without acquiring a new reference. + * + * **Example** (Extending resource idle time) + * * ```ts * import { Effect, RcMap } from "effect" * @@ -556,6 +703,11 @@ export declare const has: { * // from the time it was touched * }).pipe(Effect.scoped) * ``` + * + * @see {@link invalidate} for removing the resource instead of extending it + * + * @category combinators + * @since 3.13.0 */ export declare const touch: { /** @@ -563,9 +715,12 @@ export declare const touch: { * `idleTimeToLive` configured, calling `touch` will reset the expiration * timer for the specified key. * - * @since 3.5.0 - * @category combinators - * @example + * **When to use** + * + * Use to keep an idle resource alive longer without acquiring a new reference. + * + * **Example** (Extending resource idle time) + * * ```ts * import { Effect, RcMap } from "effect" * @@ -590,6 +745,11 @@ export declare const touch: { * // from the time it was touched * }).pipe(Effect.scoped) * ``` + * + * @see {@link invalidate} for removing the resource instead of extending it + * + * @category combinators + * @since 3.13.0 */ (key: K): (self: RcMap) => Effect.Effect; /** @@ -597,9 +757,12 @@ export declare const touch: { * `idleTimeToLive` configured, calling `touch` will reset the expiration * timer for the specified key. * - * @since 3.5.0 - * @category combinators - * @example + * **When to use** + * + * Use to keep an idle resource alive longer without acquiring a new reference. + * + * **Example** (Extending resource idle time) + * * ```ts * import { Effect, RcMap } from "effect" * @@ -624,6 +787,11 @@ export declare const touch: { * // from the time it was touched * }).pipe(Effect.scoped) * ``` + * + * @see {@link invalidate} for removing the resource instead of extending it + * + * @category combinators + * @since 3.13.0 */ (self: RcMap, key: K): Effect.Effect; }; diff --git a/.opencode/node_modules/effect/dist/RcMap.d.ts.map b/.opencode/node_modules/effect/dist/RcMap.d.ts.map index cd0fd690867637dc3ecc4a0c2056374cffdb6844..ef6249f7614147321bfc1197ec74b200ee547154 100644 --- a/.opencode/node_modules/effect/dist/RcMap.d.ts.map +++ b/.opencode/node_modules/effect/dist/RcMap.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"RcMap.d.ts","sourceRoot":"","sources":["../src/RcMap.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAEnC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,K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;;;;;;;;;OAuBG;IACH,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACnE;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;CAQhE,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,KAAK,EAAE;IAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAChE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;CAgB7D,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/RcMap.js b/.opencode/node_modules/effect/dist/RcMap.js index 28c05c1762a53fd047f2ff372cdd4584c5ac7e1c..004a6c1418bd76681274d2f969319d137d21ce7d 100644 --- a/.opencode/node_modules/effect/dist/RcMap.js +++ b/.opencode/node_modules/effect/dist/RcMap.js @@ -1,4 +1,14 @@ /** + * Shares scoped resources by key and releases them when no one is using them. + * + * An `RcMap` runs a lookup effect the first time a key is requested, shares the + * in-progress or acquired resource with other callers for the same key, and + * tracks each caller through its current `Scope`. When the last scope for a key + * closes, the resource can be released, kept alive for an idle time, or removed + * by capacity limits or explicit invalidation. It is meant for resource + * lifecycles such as clients, sessions, and connections, not as a general + * mutable cache. + * * @since 3.5.0 */ import * as Cause from "./Cause.js"; @@ -30,20 +40,24 @@ const makeUnsafe = options => ({ } }); /** - * An `RcMap` can contain multiple reference counted resources that can be indexed + * Creates an `RcMap` that can contain multiple reference counted resources that can be indexed * by a key. The resources are lazily acquired on the first call to `get` and * released when the last reference is released. * - * Complex keys can extend `Equal` and `Hash` to allow lookups by value. + * **When to use** + * + * Use to create a scoped reference-counted map for resources that should be + * acquired once per key and shared while in use. * - * **Options** + * **Details** + * + * Complex keys can extend `Equal` and `Hash` to allow lookups by value. * * - `capacity`: The maximum number of resources that can be held in the map. * - `idleTimeToLive`: When the reference count reaches zero, the resource will be released after this duration. * - * @since 3.5.0 - * @category models - * @example + * **Example** (Creating a reference-counted map) + * * ```ts * import { Effect, RcMap } from "effect" * @@ -64,6 +78,12 @@ const makeUnsafe = options => ({ * ) * }) * ``` + * + * @see {@link get} for acquiring or retaining a resource by key + * @see {@link invalidate} for removing a resource from the map + * + * @category models + * @since 3.5.0 */ export const make = options => Effect.withFiber(fiber => { const context = fiber.context; @@ -89,13 +109,22 @@ export const make = options => Effect.withFiber(fiber => { }), self); }); /** - * Retrieves a value from the RcMap by key. If the resource doesn't exist, it will be - * acquired using the lookup function. The resource is reference counted and will be - * released when the scope closes. + * Gets the resource for a key, acquiring it with the map's lookup function when + * the key is not already cached. + * + * **When to use** + * + * Use to acquire or retain the resource for a key within the current scope. + * + * **Details** + * + * The resource's reference count is incremented for the current `Scope`, and a + * release finalizer is added to that scope. When the current scope closes, the + * reference is released; the resource is closed when the last reference is + * released, subject to the map's idle time-to-live setting. + * + * **Example** (Acquiring a resource) * - * @since 3.5.0 - * @category combinators - * @example * ```ts * import { Effect, RcMap } from "effect" * @@ -113,6 +142,12 @@ export const make = options => Effect.withFiber(fiber => { * console.log(resource) // "Resource: database" * }).pipe(Effect.scoped) * ``` + * + * @see {@link make} for creating the reference-counted map + * @see {@link invalidate} for removing a resource by key + * + * @category combinators + * @since 3.5.0 */ export const get = /*#__PURE__*/dual(2, (self, key) => Effect.uninterruptibleMask(restore => { if (self.state._tag === "Closed") { @@ -179,11 +214,18 @@ const release = (self, key, entry) => Effect.withFiber(fiber => { return Effect.void; }); /** - * Returns an array of all keys currently stored in the RcMap. + * Returns an iterable of all keys currently stored in the `RcMap`. + * + * **When to use** + * + * Use to inspect which keys currently have stored resources in an `RcMap`. + * + * **Details** + * + * If the `RcMap` has been closed, the effect is interrupted. + * + * **Example** (Listing keys) * - * @since 3.5.0 - * @category combinators - * @example * ```ts * import { Effect, RcMap } from "effect" * @@ -202,6 +244,11 @@ const release = (self, key, entry) => Effect.withFiber(fiber => { * console.log(allKeys) // ["foo", "bar", "baz"] * }).pipe(Effect.scoped) * ``` + * + * @see {@link has} for checking one key without enumerating all keys + * + * @category combinators + * @since 3.8.0 */ export const keys = self => { return Effect.suspend(() => self.state._tag === "Closed" ? Effect.interrupt : Effect.succeed(MutableHashMap.keys(self.state.map))); @@ -210,9 +257,12 @@ export const keys = self => { * Invalidates and removes a specific key from the RcMap. If the resource is not * currently in use (reference count is 0), it will be immediately released. * - * @since 3.5.0 - * @category combinators - * @example + * **When to use** + * + * Use to remove a resource by key so the next access performs a fresh lookup. + * + * **Example** (Invalidating a resource) + * * ```ts * import { Effect, RcMap } from "effect" * @@ -236,6 +286,12 @@ export const keys = self => { * yield* RcMap.get(map, "cache") * }).pipe(Effect.scoped) * ``` + * + * @see {@link get} for acquiring or retaining the resource for a key + * @see {@link touch} for extending the idle lifetime without removing the entry + * + * @category combinators + * @since 3.13.0 */ export const invalidate = /*#__PURE__*/dual(2, /*#__PURE__*/Effect.fnUntraced(function* (self, key) { if (self.state._tag === "Closed") return; @@ -248,8 +304,28 @@ export const invalidate = /*#__PURE__*/dual(2, /*#__PURE__*/Effect.fnUntraced(fu yield* Scope.close(entry.scope, Exit.void); }, Effect.uninterruptible)); /** - * @since 3.17.7 + * Returns whether the `RcMap` currently contains an entry for the specified + * key. + * + * **When to use** + * + * Use to check whether a key is already present in an `RcMap` without running + * the lookup function or acquiring a missing resource. + * + * **Details** + * + * This operation only checks the current map state. + * + * **Gotchas** + * + * Closed maps return `false`, so `false` does not distinguish a missing key + * from a closed map. + * + * @see {@link get} for acquiring or retaining the resource for a key + * @see {@link keys} for enumerating all currently stored keys + * * @category combinators + * @since 3.17.7 */ export const has = /*#__PURE__*/dual(2, (self, key) => Effect.sync(() => { if (self.state._tag === "Closed") return false; @@ -260,9 +336,12 @@ export const has = /*#__PURE__*/dual(2, (self, key) => Effect.sync(() => { * `idleTimeToLive` configured, calling `touch` will reset the expiration * timer for the specified key. * - * @since 3.5.0 - * @category combinators - * @example + * **When to use** + * + * Use to keep an idle resource alive longer without acquiring a new reference. + * + * **Example** (Extending resource idle time) + * * ```ts * import { Effect, RcMap } from "effect" * @@ -287,6 +366,11 @@ export const has = /*#__PURE__*/dual(2, (self, key) => Effect.sync(() => { * // from the time it was touched * }).pipe(Effect.scoped) * ``` + * + * @see {@link invalidate} for removing the resource instead of extending it + * + * @category combinators + * @since 3.13.0 */ export const touch = /*#__PURE__*/dual(2, (self, key) => Effect.clockWith(clock => { if (self.state._tag === "Closed") { diff --git a/.opencode/node_modules/effect/dist/RcMap.js.map b/.opencode/node_modules/effect/dist/RcMap.js.map index 47db82e2875b68e79be0abc78e17b64558fb8a8b..25c1ffef7988d1fbd8a7828e7227be7cad26b2bc 100644 --- a/.opencode/node_modules/effect/dist/RcMap.js.map +++ b/.opencode/node_modules/effect/dist/RcMap.js.map @@ -1 +1 @@ -{"version":3,"file":"RcMap.js","names":["Cause","Clock","Context","Deferred","Duration","Effect","Exit","Fiber","constant","dual","flow","MutableHashMap","pipeArguments","Scope","TypeId","makeUnsafe","options","lookup","context","scope","idleTimeToLive","capacity","state","_tag","map","empty","pipe","arguments","make","withFiber","fiber","get","self","fromInputUnsafe","zero","Math","max","Number","POSITIVE_INFINITY","as","addFinalizerExit","void","forEach","entry","exit","close","tap","sync","clear","key","uninterruptibleMask","restore","interrupt","parent","getCurrent","o","value","refCount","isFinite","size","fail","ExceededCapacityError","deferred","finalizer","undefined","expiresAt","release","set","Map","mapUnsafe","runForkWith","runIn","addObserver","doneUnsafe","getUnsafe","addFinalizer","andThen","await","has","isZero","remove","clock","getRef","currentTimeMillisUnsafe","toMillis","interruptibleMask","loop","now","remaining","flatMap","sleep","millis","ensuring","keys","suspend","succeed","invalidate","fnUntraced","uninterruptible","touch","clockWith"],"sources":["../src/RcMap.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,SAASC,KAAK,QAAQ,YAAY;AAClC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,QAAQ,EAAEC,IAAI,EAAEC,IAAI,QAAQ,eAAe;AACpD,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AAErD,SAASC,aAAa,QAAQ,eAAe;AAC7C,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,MAAMC,MAAM,GAAG,eAAe;AAmL9B,MAAMC,UAAU,GAAaC,OAM5B,KAAsB;EACrB,CAACF,MAAM,GAAGA,MAAM;EAChBG,MAAM,EAAED,OAAO,CAACC,MAAM;EACtBC,OAAO,EAAEF,OAAO,CAACE,OAAO;EACxBC,KAAK,EAAEH,OAAO,CAACG,KAAK;EACpBC,cAA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AAC,EAAEpC,MAAM,CAAC6F,eAAe,CAAC,CAC3B;AAED;;;;AAIA,OAAO,MAAMpB,GAAG,gBAWZrE,IAAI,CACN,CAAC,EACD,CAAUuB,IAAoB,EAAEiB,GAAM,KACpC5C,MAAM,CAAC0C,IAAI,CAAC,MAAK;EACf,IAAIf,IAAI,CAACV,KAAK,CAACC,IAAI,KAAK,QAAQ,EAAE,OAAO,KAAK;EAC9C,OAAOZ,cAAc,CAACmE,GAAG,CAAC9C,IAAI,CAACV,KAAK,CAACE,GAAG,EAAEyB,GAAG,CAAC;AAChD,CAAC,CAAC,CACL;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,OAAO,MAAMkD,KAAK,gBAqEd1F,IAAI,CACN,CAAC,EACD,CAAUuB,IAAoB,EAAEiB,GAAM,KACpC5C,MAAM,CAAC+F,SAAS,CAAEnB,KAAK,IAAI;EACzB,IAAIjD,IAAI,CAACV,KAAK,CAACC,IAAI,KAAK,QAAQ,EAAE;IAChC,OAAOlB,MAAM,CAACoC,IAAI;EACpB;EACA,MAAMc,CAAC,GAAG5C,cAAc,CAACoB,GAAG,CAACC,IAAI,CAACV,KAAK,CAACE,GAAG,EAAEyB,GAAG,CAAC;EACjD,IAAIM,CAAC,CAAChC,IAAI,KAAK,MAAM,IAAInB,QAAQ,CAAC2E,MAAM,CAACxB,CAAC,CAACC,KAAK,CAACpC,cAAc,CAAC,EAAE;IAChE,OAAOf,MAAM,CAACoC,IAAI;EACpB;EACA,MAAME,KAAK,GAAGY,CAAC,CAACC,KAAK;EACrBb,KAAK,CAACsB,SAAS,GAAGgB,KAAK,CAACE,uBAAuB,EAAE,GAAG/E,QAAQ,CAACgF,QAAQ,CAACzC,KAAK,CAACvB,cAAc,CAAC;EAC3F,OAAOf,MAAM,CAACoC,IAAI;AACpB,CAAC,CAAC,CACL","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"RcMap.js","names":["Cause","Clock","Context","Deferred","Duration","Effect","Exit","Fiber","constant","dual","flow","MutableHashMap","pipeArguments","Scope","TypeId","makeUnsafe","options","lookup","context","scope","idleTimeToLive","capacity","state","_tag","map","empty","pipe","arguments","make","withFiber","fiber","get","self","fromInputUnsafe","zero","Math","max","Number","POSITIVE_INFINITY","as","addFinalizerExit","void","forEach","entry","exit","close","tap","sync","clear","key","uninterruptibleMask","restore","interrupt","parent","getCurrent","o","value","refCount","isFinite","size","fail","ExceededCapacityError","deferred","finalizer","undefined","expiresAt","release","set","Map","mapUnsafe","runForkWith","runIn","addObserver","doneUnsafe","getUnsafe","addFinalizer","andThen","await","has","isZero","remove","clock","getRef","currentTimeMillisUnsafe","toMillis","interruptibleMask","loop","now","remaining","flatMap","sleep","millis","ensuring","keys","suspend","succeed","invalidate","fnUntraced","uninterruptible","touch","clockWith"],"sources":["../src/RcMap.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;AAaA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,SAASC,KAAK,QAAQ,YAAY;AAClC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,QAAQ,EAAEC,IAAI,EAAEC,IAAI,QAAQ,eAAe;AACpD,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AAErD,SAASC,aAAa,QAAQ,eAAe;AAC7C,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,MAAMC,MAAM,GAAG,eAAe;AA2I9B,MAAMC,UAAU,GAAaC,OAM5B,KAAsB;EACrB,CAACF,MAAM,GAAGA,MAAM;EAChBG,MAAM,EAAED,OAAO,CAACC,MAAM;EACtBC,OAAO,EAAEF,OAAO,CAACE,OAAO;EACxBC,KAAK,EAAEH,OAAO,CAAC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AI;AACpB,CAAC,CAAC,CACL","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/RcRef.d.ts b/.opencode/node_modules/effect/dist/RcRef.d.ts index 48e9bd958c7c0f38a9ed2c6b0206b5a61424fbdd..4db5650754cf39d55d95cec28636a81f8c2c8d70 100644 --- a/.opencode/node_modules/effect/dist/RcRef.d.ts +++ b/.opencode/node_modules/effect/dist/RcRef.d.ts @@ -1,4 +1,11 @@ /** + * Reference-counted handles for sharing one scoped resource across many scoped + * users. An `RcRef` acquires the resource lazily the first time `get` + * needs it, reuses that value while it is borrowed or kept idle, and finalizes + * it when the final borrowing scope closes unless an idle timeout keeps it + * available. The module also provides `invalidate` for forcing the next `get` + * to acquire a fresh resource. + * * @since 3.5.0 */ import type * as Duration from "./Duration.ts"; @@ -10,13 +17,19 @@ declare const TypeId = "~effect/RcRef"; /** * A reference counted reference that manages resource lifecycle. * + * **When to use** + * + * Use to share a scoped resource across active users with reference-counted + * acquisition and release. + * + * **Details** + * * An RcRef wraps a resource that can be acquired and released multiple times. * The resource is lazily acquired on the first call to `get` and automatically * released when the last reference is released. * - * @since 3.5.0 - * @category models - * @example + * **Example** (Sharing a lazily acquired resource) + * * ```ts * import { Effect, RcRef } from "effect" * @@ -40,14 +53,18 @@ declare const TypeId = "~effect/RcRef"; * return [connection1, connection2] * }) * ``` + * + * @category models + * @since 3.5.0 */ export interface RcRef extends Pipeable { readonly [TypeId]: RcRef.Variance; } /** - * @since 3.5.0 - * @category models - * @example + * Namespace containing type-level members associated with `RcRef`. + * + * **Example** (Referencing namespace types) + * * ```ts * import type { RcRef } from "effect" * @@ -55,21 +72,26 @@ export interface RcRef extends Pipeable { * type MyRcRef = RcRef.RcRef * type MyVariance = RcRef.RcRef.Variance * ``` + * + * @since 3.5.0 */ export declare namespace RcRef { /** - * @since 3.5.0 - * @category models - * @example - * ```ts - * import type { RcRef } from "effect" + * Type-level variance marker for `RcRef`. + * + * **When to use** * - * // Variance interface defines covariance for type parameters - * type StringRcRefVariance = RcRef.RcRef.Variance + * Use to carry the value and error type parameters for `RcRef` in Effect's + * type machinery. * - * // Shows that both A and E are covariant - * declare const variance: StringRcRefVariance - * ``` + * **Details** + * + * This interface records the covariant value and error types carried by an + * `RcRef`. It is used by Effect's type machinery and is not normally + * referenced directly by users. + * + * @category models + * @since 3.5.0 */ interface Variance { readonly _A: Types.Covariant; @@ -77,17 +99,23 @@ export declare namespace RcRef { } } /** - * Create an `RcRef` from an acquire `Effect`. + * Creates an `RcRef` from an acquire effect. * - * An RcRef wraps a reference counted resource that can be acquired and released - * multiple times. + * **When to use** * - * The resource is lazily acquired on the first call to `get` and released when - * the last reference is released. + * Use to create a lazily acquired, reference-counted resource from an acquire + * effect. + * + * **Details** + * + * The resource is acquired lazily on the first `get` and shared by subsequent + * gets while it remains cached. Each `get` adds a reference to the current + * `Scope`. When the last reference is released, the resource is closed + * immediately by default, or after `idleTimeToLive` when that option is + * provided. + * + * **Example** (Creating a reference-counted resource) * - * @since 3.5.0 - * @category constructors - * @example * ```ts * import { Effect, RcRef } from "effect" * @@ -107,6 +135,9 @@ export declare namespace RcRef { * ) * }) * ``` + * + * @category constructors + * @since 3.5.0 */ export declare const make: (options: { readonly acquire: Effect.Effect; @@ -117,15 +148,22 @@ export declare const make: (options: { readonly idleTimeToLive?: Duration.Input | undefined; }) => Effect.Effect, never, R | Scope>; /** - * Get the value from an RcRef. + * Gets the value from an `RcRef`, acquiring it first if needed. * - * This will acquire the resource if it hasn't been acquired yet, or increment - * the reference count if it has. The resource will be automatically released - * when the returned scope is closed. + * **When to use** + * + * Use to borrow the current resource within a `Scope`, acquiring it first if + * necessary. + * + * **Details** + * + * The reference count is incremented for the current `Scope`, and a release + * finalizer is added to that scope. When the current scope closes, the + * reference is released; the resource is closed when the final reference is + * released, subject to any configured idle time-to-live. + * + * **Example** (Sharing one acquired value) * - * @since 3.5.0 - * @category combinators - * @example * ```ts * import { Effect, RcRef } from "effect" * @@ -148,11 +186,32 @@ export declare const make: (options: { * return value1 * }) * ``` + * + * @category combinators + * @since 3.5.0 */ export declare const get: (self: RcRef) => Effect.Effect; /** - * @since 3.19.6 + * Invalidates the currently cached resource, if one has been acquired. + * + * **When to use** + * + * Use to force future `RcRef.get` calls to acquire a fresh resource when the + * currently cached resource should no longer be reused. + * + * **Details** + * + * After invalidation, the next `get` acquires a fresh resource. + * + * **Gotchas** + * + * Invalidation does not revoke resources already borrowed by active scopes; + * those remain usable until their scopes close. + * + * @see {@link get} for acquiring the current cached resource or the fresh resource after invalidation + * * @category combinators + * @since 3.19.6 */ export declare const invalidate: (self: RcRef) => Effect.Effect; export {}; diff --git a/.opencode/node_modules/effect/dist/RcRef.d.ts.map b/.opencode/node_modules/effect/dist/RcRef.d.ts.map index ee3eaffa03dc718d860e8b2518c1112ff2afa323..c2363edf9dfabb44e57babeb6e3bcf1e6c45b929 100644 --- a/.opencode/node_modules/effect/dist/RcRef.d.ts.map +++ b/.opencode/node_modules/effect/dist/RcRef.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"RcRef.d.ts","sourceRoot":"","sources":["../src/RcRef.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAE1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAExC,QAAA,MAAM,MAAM,kBAAkB,CAAA;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,KAAK,CAAE,SAAQ,QAAQ;IAC3D,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,QAAQ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SAAS,CAAA;CACrD,KACE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAiB,CAAA;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAgB,CAAA;AAExF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAuB,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/RcRef.js b/.opencode/node_modules/effect/dist/RcRef.js index 65786a67320ef161954f6ba6aad28d732b7726f5..c8c1fa7b58f314df8104a4f5caa81fde0fce6f51 100644 --- a/.opencode/node_modules/effect/dist/RcRef.js +++ b/.opencode/node_modules/effect/dist/RcRef.js @@ -1,17 +1,23 @@ import * as internal from "./internal/rcRef.js"; const TypeId = "~effect/RcRef"; /** - * Create an `RcRef` from an acquire `Effect`. + * Creates an `RcRef` from an acquire effect. * - * An RcRef wraps a reference counted resource that can be acquired and released - * multiple times. + * **When to use** * - * The resource is lazily acquired on the first call to `get` and released when - * the last reference is released. + * Use to create a lazily acquired, reference-counted resource from an acquire + * effect. + * + * **Details** + * + * The resource is acquired lazily on the first `get` and shared by subsequent + * gets while it remains cached. Each `get` adds a reference to the current + * `Scope`. When the last reference is released, the resource is closed + * immediately by default, or after `idleTimeToLive` when that option is + * provided. + * + * **Example** (Creating a reference-counted resource) * - * @since 3.5.0 - * @category constructors - * @example * ```ts * import { Effect, RcRef } from "effect" * @@ -31,18 +37,28 @@ const TypeId = "~effect/RcRef"; * ) * }) * ``` + * + * @category constructors + * @since 3.5.0 */ export const make = internal.make; /** - * Get the value from an RcRef. + * Gets the value from an `RcRef`, acquiring it first if needed. * - * This will acquire the resource if it hasn't been acquired yet, or increment - * the reference count if it has. The resource will be automatically released - * when the returned scope is closed. + * **When to use** + * + * Use to borrow the current resource within a `Scope`, acquiring it first if + * necessary. + * + * **Details** + * + * The reference count is incremented for the current `Scope`, and a release + * finalizer is added to that scope. When the current scope closes, the + * reference is released; the resource is closed when the final reference is + * released, subject to any configured idle time-to-live. + * + * **Example** (Sharing one acquired value) * - * @since 3.5.0 - * @category combinators - * @example * ```ts * import { Effect, RcRef } from "effect" * @@ -65,11 +81,32 @@ export const make = internal.make; * return value1 * }) * ``` + * + * @category combinators + * @since 3.5.0 */ export const get = internal.get; /** - * @since 3.19.6 + * Invalidates the currently cached resource, if one has been acquired. + * + * **When to use** + * + * Use to force future `RcRef.get` calls to acquire a fresh resource when the + * currently cached resource should no longer be reused. + * + * **Details** + * + * After invalidation, the next `get` acquires a fresh resource. + * + * **Gotchas** + * + * Invalidation does not revoke resources already borrowed by active scopes; + * those remain usable until their scopes close. + * + * @see {@link get} for acquiring the current cached resource or the fresh resource after invalidation + * * @category combinators + * @since 3.19.6 */ export const invalidate = internal.invalidate; //# sourceMappingURL=RcRef.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/RcRef.js.map b/.opencode/node_modules/effect/dist/RcRef.js.map index fdebd1d8ad8b94a763cf5d50a72a3baad702d90b..c64afadcbfe58e4b3509b1a358d233e03c1735fa 100644 --- a/.opencode/node_modules/effect/dist/RcRef.js.map +++ b/.opencode/node_modules/effect/dist/RcRef.js.map @@ -1 +1 @@ -{"version":3,"file":"RcRef.js","names":["internal","TypeId","make","get","invalidate"],"sources":["../src/RcRef.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,qBAAqB;AAK/C,MAAMC,MAAM,GAAG,eAAe;AAyE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,MAAMC,IAAI,GASmCF,QAAQ,CAACE,IAAI;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,OAAO,MAAMC,GAAG,GAA4DH,QAAQ,CAACG,GAAG;AAExF;;;;AAIA,OAAO,MAAMC,UAAU,GAAqDJ,QAAQ,CAACI,UAAU","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"RcRef.js","names":["internal","TypeId","make","get","invalidate"],"sources":["../src/RcRef.ts"],"sourcesContent":[null],"mappings":"AAYA,OAAO,KAAKA,QAAQ,MAAM,qBAAqB;AAK/C,MAAMC,MAAM,GAAG,eAAe;AAwF9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,OAAO,MAAMC,IAAI,GASmCF,QAAQ,CAACE,IAAI;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,OAAO,MAAMC,GAAG,GAA4DH,QAAQ,CAACG,GAAG;AAExF;;;;;;;;;;;;;;;;;;;;;;AAsBA,OAAO,MAAMC,UAAU,GAAqDJ,QAAQ,CAACI,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Record.d.ts b/.opencode/node_modules/effect/dist/Record.d.ts index 9f567b366fb0bdb728443247a941a7cc4d96932d..513492b3d3cfabacb034317a59c09566d5b62284 100644 --- a/.opencode/node_modules/effect/dist/Record.d.ts +++ b/.opencode/node_modules/effect/dist/Record.d.ts @@ -1,5 +1,11 @@ /** - * This module provides utility functions for working with records in TypeScript. + * Works with plain JavaScript records as immutable key/value dictionaries. + * + * A record is an object whose keys are strings or symbols. This module includes + * helpers for construction, lookup, updates, mapping, filtering, folding, + * set-like combination, and typed conversions between records and iterable + * entries. Helpers that change values return new records instead of mutating the + * input. * * @since 2.0.0 */ @@ -14,7 +20,8 @@ import type { NoInfer } from "./Types.ts"; * Represents a readonly record with keys of type `K` and values of type `A`. * This is the foundational type for immutable key-value mappings in Effect. * - * @example + * **Example** (Defining a readonly record type) + * * ```ts * import type { Record } from "effect" * @@ -37,7 +44,8 @@ export type ReadonlyRecord = { * Namespace containing utility types for working with readonly records. * These types help with type-level operations on record keys and values. * - * @example + * **Example** (Using readonly record helper types) + * * ```ts * import type { Record } from "effect" * @@ -48,7 +56,6 @@ export type ReadonlyRecord = { * type CommonKeys = Record.ReadonlyRecord.IntersectKeys<"a" | "b", "b" | "c"> // "b" * ``` * - * @category models * @since 2.0.0 */ export declare namespace ReadonlyRecord { @@ -59,7 +66,8 @@ export declare namespace ReadonlyRecord { * Represents a type that converts literal string keys to generic string type and symbol keys to generic symbol type. * This is useful for maintaining type safety while allowing flexible key types in record operations. * - * @example + * **Example** (Converting literal keys to non-literal keys) + * * ```ts * import type { Record } from "effect" * @@ -78,7 +86,8 @@ export declare namespace ReadonlyRecord { * Represents the intersection of two key types, handling both literal and non-literal string keys. * This type is used in record operations that need to compute overlapping keys. * - * @example + * **Example** (Intersecting record keys) + * * ```ts * import type { Record } from "effect" * @@ -98,15 +107,23 @@ export declare namespace ReadonlyRecord { * Type lambda for readonly records, used in higher-kinded type operations. * This enables records to work with generic type constructors and functors. * - * @example - * ```ts - * import type { Record } from "effect" - * - * // The type lambda allows records to be used as higher-kinded types - * type RecordTypeLambda = Record.ReadonlyRecordTypeLambda<"key1" | "key2"> + * **Example** (Applying a readonly record type lambda) * - * // This enables mapping over the type parameter - * type StringRecord = RecordTypeLambda["type"] // ReadonlyRecord<"key1" | "key2", Target> + * ```ts + * import type { HKT, Record } from "effect" + * + * type Settings = HKT.Kind< + * Record.ReadonlyRecordTypeLambda<"port" | "retries">, + * never, + * never, + * never, + * number + * > + * + * const defaults: Settings = { + * port: 3000, + * retries: 3 + * } * ``` * * @category type lambdas @@ -118,7 +135,8 @@ export interface ReadonlyRecordTypeLambda extends Typ /** * Creates a new, empty record. * - * @example + * **Example** (Creating an empty record) + * * ```ts * import { Record } from "effect" * @@ -136,9 +154,10 @@ export interface ReadonlyRecordTypeLambda extends Typ */ export declare const empty: () => Record, V>; /** - * Determine if a record is empty. + * Determines if a mutable record is empty. + * + * **Example** (Checking for an empty record) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -152,9 +171,10 @@ export declare const empty: () => */ export declare const isEmptyRecord: (self: Record) => self is Record; /** - * Determine if a record is empty. + * Determines if a readonly record is empty. + * + * **Example** (Checking for an empty readonly record) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -171,7 +191,8 @@ export declare const isEmptyReadonlyRecord: (self: Readonly * Takes an iterable and a projection function and returns a record. * The projection function maps each value of the iterable to a tuple of a key and a value, which is then added to the resulting record. * - * @example + * **Example** (Building a record from mapped iterable values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -192,7 +213,8 @@ export declare const fromIterableWith: { * Takes an iterable and a projection function and returns a record. * The projection function maps each value of the iterable to a tuple of a key and a value, which is then added to the resulting record. * - * @example + * **Example** (Building a record from mapped iterable values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -213,7 +235,8 @@ export declare const fromIterableWith: { * Takes an iterable and a projection function and returns a record. * The projection function maps each value of the iterable to a tuple of a key and a value, which is then added to the resulting record. * - * @example + * **Example** (Building a record from mapped iterable values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -234,7 +257,8 @@ export declare const fromIterableWith: { /** * Creates a new record from an iterable, utilizing the provided function to determine the key for each element. * - * @example + * **Example** (Building a record keyed by iterable values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -260,10 +284,13 @@ export declare const fromIterableBy: (items: Itera /** * Builds a record from an iterable of key-value pairs. * + * **Details** + * * If there are conflicting keys when using `fromEntries`, the last occurrence of the key/value pair will overwrite the * previous ones. So the resulting record will only have the value of the last occurrence of each key. * - * @example + * **Example** (Building a record from entries) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -273,14 +300,15 @@ export declare const fromIterableBy: (items: Itera * assert.deepStrictEqual(Record.fromEntries(input), { a: 1, b: 2 }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const fromEntries: (entries: Iterable) => Record, Entry[1]>; /** * Transforms the values of a record into an `Array` with a custom mapping function. * - * @example + * **Example** (Collecting mapped record values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -292,14 +320,15 @@ export declare const fromEntries: (f: (key: K, a: A) => B): (self: ReadonlyRecord) => Array; /** * Transforms the values of a record into an `Array` with a custom mapping function. * - * @example + * **Example** (Collecting mapped record values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -330,7 +360,7 @@ export declare const collect: { * ], ["c", 3]]) * ``` * - * @category conversions + * @category converting * @since 2.0.0 */ (self: ReadonlyRecord, f: (key: K, a: A) => B): Array; @@ -338,7 +368,8 @@ export declare const collect: { /** * Takes a record and returns an array of tuples containing its keys and values. * - * @example + * **Example** (Converting a record to entries) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -347,14 +378,15 @@ export declare const collect: { * assert.deepStrictEqual(Record.toEntries(x), [["a", 1], ["b", 2], ["c", 3]]) * ``` * - * @category conversions + * @category converting * @since 2.0.0 */ export declare const toEntries: (self: ReadonlyRecord) => Array<[K, A]>; /** * Returns the number of key/value pairs in a record. * - * @example + * **Example** (Getting the record size) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -367,9 +399,10 @@ export declare const toEntries: (self: ReadonlyRecord */ export declare const size: (self: ReadonlyRecord) => number; /** - * Check if a given `key` exists in a record. + * Checks whether a given `key` exists in a record. + * + * **Example** (Checking key membership) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -383,9 +416,10 @@ export declare const size: (self: ReadonlyRecord) => */ export declare const has: { /** - * Check if a given `key` exists in a record. + * Checks whether a given `key` exists in a record. + * + * **Example** (Checking key membership) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -399,9 +433,10 @@ export declare const has: { */ (key: NoInfer): (self: ReadonlyRecord) => boolean; /** - * Check if a given `key` exists in a record. + * Checks whether a given `key` exists in a record. + * + * **Example** (Checking key membership) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -416,9 +451,10 @@ export declare const has: { (self: ReadonlyRecord, key: NoInfer): boolean; }; /** - * Retrieve a value at a particular key from a record, returning it wrapped in an `Option`. + * Retrieves a value at a particular key from a record safely, returning it wrapped in an `Option`. + * + * **Example** (Getting a value as an Option) * - * @example * ```ts * import { Option, Record as R } from "effect" * import * as assert from "node:assert" @@ -434,9 +470,10 @@ export declare const has: { */ export declare const get: { /** - * Retrieve a value at a particular key from a record, returning it wrapped in an `Option`. + * Retrieves a value at a particular key from a record safely, returning it wrapped in an `Option`. + * + * **Example** (Getting a value as an Option) * - * @example * ```ts * import { Option, Record as R } from "effect" * import * as assert from "node:assert" @@ -452,9 +489,10 @@ export declare const get: { */ (key: NoInfer): (self: ReadonlyRecord) => Option.Option; /** - * Retrieve a value at a particular key from a record, returning it wrapped in an `Option`. + * Retrieves a value at a particular key from a record safely, returning it wrapped in an `Option`. + * + * **Example** (Getting a value as an Option) * - * @example * ```ts * import { Option, Record as R } from "effect" * import * as assert from "node:assert" @@ -471,10 +509,11 @@ export declare const get: { (self: ReadonlyRecord, key: NoInfer): Option.Option; }; /** - * Apply a function to the element at the specified key, creating a new record, + * Applies a function to the element at the specified key safely, creating a new record, * or return `Option.none()` if the key doesn't exist. * - * @example + * **Example** (Modifying a value at a key) + * * ```ts * import { Record } from "effect" * @@ -486,15 +525,16 @@ export declare const get: { * Record.modify(input, "b", f) // Option.none() * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ export declare const modify: { /** - * Apply a function to the element at the specified key, creating a new record, + * Applies a function to the element at the specified key safely, creating a new record, * or return `Option.none()` if the key doesn't exist. * - * @example + * **Example** (Modifying a value at a key) + * * ```ts * import { Record } from "effect" * @@ -506,15 +546,16 @@ export declare const modify: { * Record.modify(input, "b", f) // Option.none() * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ (key: NoInfer, f: (a: A) => B): (self: ReadonlyRecord) => Option.Option>; /** - * Apply a function to the element at the specified key, creating a new record, + * Applies a function to the element at the specified key safely, creating a new record, * or return `Option.none()` if the key doesn't exist. * - * @example + * **Example** (Modifying a value at a key) + * * ```ts * import { Record } from "effect" * @@ -526,15 +567,22 @@ export declare const modify: { * Record.modify(input, "b", f) // Option.none() * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ (self: ReadonlyRecord, key: NoInfer, f: (a: A) => B): Option.Option>; }; /** - * Replaces a value in the record with the new value passed as parameter. + * Replaces the value at an existing key safely and returns the updated record in + * `Option.some`. + * + * **Details** + * + * If the key is not present, returns `Option.none()` and leaves the record + * unchanged. + * + * **Example** (Replacing a value at a key) * - * @example * ```ts * import { Record } from "effect" * @@ -542,14 +590,21 @@ export declare const modify: { * Record.replace(Record.empty(), "a", 10) // Option.none() * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ export declare const replace: { /** - * Replaces a value in the record with the new value passed as parameter. + * Replaces the value at an existing key safely and returns the updated record in + * `Option.some`. + * + * **Details** + * + * If the key is not present, returns `Option.none()` and leaves the record + * unchanged. + * + * **Example** (Replacing a value at a key) * - * @example * ```ts * import { Record } from "effect" * @@ -557,14 +612,21 @@ export declare const replace: { * Record.replace(Record.empty(), "a", 10) // Option.none() * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ (key: NoInfer, b: B): (self: ReadonlyRecord) => Option.Option>; /** - * Replaces a value in the record with the new value passed as parameter. + * Replaces the value at an existing key safely and returns the updated record in + * `Option.some`. + * + * **Details** + * + * If the key is not present, returns `Option.none()` and leaves the record + * unchanged. + * + * **Example** (Replacing a value at a key) * - * @example * ```ts * import { Record } from "effect" * @@ -572,16 +634,25 @@ export declare const replace: { * Record.replace(Record.empty(), "a", 10) // Option.none() * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ (self: ReadonlyRecord, key: NoInfer, b: B): Option.Option>; }; /** - * If the given key exists in the record, returns a new record with the key removed. - * If the key does not exist, returns a shallow copy of the original record. + * Removes a key from a record. + * + * **When to use** + * + * Use to create a shallow copy of a record without one property. + * + * **Details** + * + * If the key is not present, the result is still a shallow copy of the original + * record. + * + * **Example** (Removing a key) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -589,15 +660,24 @@ export declare const replace: { * assert.deepStrictEqual(Record.remove({ a: 1, b: 2 }, "a"), { b: 2 }) * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ export declare const remove: { /** - * If the given key exists in the record, returns a new record with the key removed. - * If the key does not exist, returns a shallow copy of the original record. + * Removes a key from a record. + * + * **When to use** + * + * Use to create a shallow copy of a record without one property. + * + * **Details** + * + * If the key is not present, the result is still a shallow copy of the original + * record. + * + * **Example** (Removing a key) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -605,15 +685,24 @@ export declare const remove: { * assert.deepStrictEqual(Record.remove({ a: 1, b: 2 }, "a"), { b: 2 }) * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ (key: X): (self: ReadonlyRecord) => Record, A>; /** - * If the given key exists in the record, returns a new record with the key removed. - * If the key does not exist, returns a shallow copy of the original record. + * Removes a key from a record. + * + * **When to use** + * + * Use to create a shallow copy of a record without one property. + * + * **Details** + * + * If the key is not present, the result is still a shallow copy of the original + * record. + * + * **Example** (Removing a key) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -621,17 +710,18 @@ export declare const remove: { * assert.deepStrictEqual(Record.remove({ a: 1, b: 2 }, "a"), { b: 2 }) * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ (self: ReadonlyRecord, key: X): Record, A>; }; /** - * Retrieves the value of the property with the given `key` from a record and returns an `Option` + * Retrieves the value of the property with the given `key` from a record safely and returns an `Option` * of a tuple with the value and the record with the removed property. * If the key is not present, returns `Option.none()`. * - * @example + * **Example** (Popping a value and removing its key) + * * ```ts * import { Record } from "effect" * @@ -641,16 +731,17 @@ export declare const remove: { * Record.pop(input, "c") // Option.none() * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ export declare const pop: { /** - * Retrieves the value of the property with the given `key` from a record and returns an `Option` + * Retrieves the value of the property with the given `key` from a record safely and returns an `Option` * of a tuple with the value and the record with the removed property. * If the key is not present, returns `Option.none()`. * - * @example + * **Example** (Popping a value and removing its key) + * * ```ts * import { Record } from "effect" * @@ -660,16 +751,17 @@ export declare const pop: { * Record.pop(input, "c") // Option.none() * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ (key: X): (self: ReadonlyRecord) => Option.Option<[A, Record, A>]>; /** - * Retrieves the value of the property with the given `key` from a record and returns an `Option` + * Retrieves the value of the property with the given `key` from a record safely and returns an `Option` * of a tuple with the value and the record with the removed property. * If the key is not present, returns `Option.none()`. * - * @example + * **Example** (Popping a value and removing its key) + * * ```ts * import { Record } from "effect" * @@ -679,7 +771,7 @@ export declare const pop: { * Record.pop(input, "c") // Option.none() * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ (self: ReadonlyRecord, key: X): Option.Option<[A, Record, A>]>; @@ -687,7 +779,8 @@ export declare const pop: { /** * Maps a record into another record by applying a transformation function to each of its values. * - * @example + * **Example** (Mapping record values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -708,7 +801,8 @@ export declare const map: { /** * Maps a record into another record by applying a transformation function to each of its values. * - * @example + * **Example** (Mapping record values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -729,7 +823,8 @@ export declare const map: { /** * Maps a record into another record by applying a transformation function to each of its values. * - * @example + * **Example** (Mapping record values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -751,7 +846,8 @@ export declare const map: { /** * Maps the keys of a `ReadonlyRecord` while preserving the corresponding values. * - * @example + * **Example** (Mapping record keys) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -769,7 +865,8 @@ export declare const mapKeys: { /** * Maps the keys of a `ReadonlyRecord` while preserving the corresponding values. * - * @example + * **Example** (Mapping record keys) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -787,7 +884,8 @@ export declare const mapKeys: { /** * Maps the keys of a `ReadonlyRecord` while preserving the corresponding values. * - * @example + * **Example** (Mapping record keys) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -806,7 +904,8 @@ export declare const mapKeys: { /** * Maps entries of a `ReadonlyRecord` using the provided function, allowing modification of both keys and corresponding values. * - * @example + * **Example** (Mapping record entries) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -824,7 +923,8 @@ export declare const mapEntries: { /** * Maps entries of a `ReadonlyRecord` using the provided function, allowing modification of both keys and corresponding values. * - * @example + * **Example** (Mapping record entries) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -842,7 +942,8 @@ export declare const mapEntries: { /** * Maps entries of a `ReadonlyRecord` using the provided function, allowing modification of both keys and corresponding values. * - * @example + * **Example** (Mapping record entries) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -862,7 +963,8 @@ export declare const mapEntries: { * Transforms a record by applying the function `f` to each key and value in the original record. * If the function succeeds, the key-value pair is included in the output record. * - * @example + * **Example** (Filtering and mapping with Result) + * * ```ts * import { Record, Result } from "effect" * import * as assert from "node:assert" @@ -880,7 +982,8 @@ export declare const filterMap: { * Transforms a record by applying the function `f` to each key and value in the original record. * If the function succeeds, the key-value pair is included in the output record. * - * @example + * **Example** (Filtering and mapping with Result) + * * ```ts * import { Record, Result } from "effect" * import * as assert from "node:assert" @@ -898,7 +1001,8 @@ export declare const filterMap: { * Transforms a record by applying the function `f` to each key and value in the original record. * If the function succeeds, the key-value pair is included in the output record. * - * @example + * **Example** (Filtering and mapping with Result) + * * ```ts * import { Record, Result } from "effect" * import * as assert from "node:assert" @@ -916,7 +1020,8 @@ export declare const filterMap: { /** * Selects properties from a record whose values match the given predicate. * - * @example + * **Example** (Filtering record values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -932,7 +1037,8 @@ export declare const filter: { /** * Selects properties from a record whose values match the given predicate. * - * @example + * **Example** (Filtering record values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -948,7 +1054,8 @@ export declare const filter: { /** * Selects properties from a record whose values match the given predicate. * - * @example + * **Example** (Filtering record values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -964,7 +1071,8 @@ export declare const filter: { /** * Selects properties from a record whose values match the given predicate. * - * @example + * **Example** (Filtering record values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -980,7 +1088,8 @@ export declare const filter: { /** * Selects properties from a record whose values match the given predicate. * - * @example + * **Example** (Filtering record values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -995,9 +1104,11 @@ export declare const filter: { (self: ReadonlyRecord, predicate: (a: A, key: K) => boolean): Record, A>; }; /** - * Given a record with `Option` values, returns a new record containing only the `Some` values, preserving the original keys. + * Returns a new record containing only the `Some` values from a record of + * `Option` values, preserving the original keys. + * + * **Example** (Extracting Some values) * - * @example * ```ts * import { Option, Record } from "effect" * import * as assert from "node:assert" @@ -1013,9 +1124,11 @@ export declare const filter: { */ export declare const getSomes: (self: ReadonlyRecord>) => Record, A>; /** - * Given a record with `Result` values, returns a new record containing only the `Err` values, preserving the original keys. + * Returns a new record containing only the `Err` values from a record of + * `Result` values, preserving the original keys. + * + * **Example** (Extracting Result failures) * - * @example * ```ts * import { Record, Result } from "effect" * import * as assert from "node:assert" @@ -1031,13 +1144,15 @@ export declare const getSomes: (self: ReadonlyRecord(self: ReadonlyRecord>) => Record, E>; /** - * Given a record with `Result` values, returns a new record containing only the `Ok` values, preserving the original keys. + * Returns a new record containing only the `Ok` values from a record of + * `Result` values, preserving the original keys. + * + * **Example** (Extracting Result successes) * - * @example * ```ts * import { Record, Result } from "effect" * import * as assert from "node:assert" @@ -1053,13 +1168,20 @@ export declare const getFailures: (self: ReadonlyRecord< * ``` * * @category filtering - * @since 2.0.0 + * @since 4.0.0 */ export declare const getSuccesses: (self: ReadonlyRecord>) => Record; /** - * Partitions the elements of a record into two groups: those that match a filter, and those that don't. + * Applies a function to each record entry and partitions the returned `Result` + * values into two records. + * + * **Details** + * + * Failure values are collected in the left record, and success values are + * collected in the right record, preserving the original keys. + * + * **Example** (Partitioning with Result) * - * @example * ```ts * import { Record, Result } from "effect" * import * as assert from "node:assert" @@ -1074,9 +1196,16 @@ export declare const getSuccesses: (self: ReadonlyRecord */ export declare const partition: { /** - * Partitions the elements of a record into two groups: those that match a filter, and those that don't. + * Applies a function to each record entry and partitions the returned `Result` + * values into two records. + * + * **Details** + * + * Failure values are collected in the left record, and success values are + * collected in the right record, preserving the original keys. + * + * **Example** (Partitioning with Result) * - * @example * ```ts * import { Record, Result } from "effect" * import * as assert from "node:assert" @@ -1091,9 +1220,16 @@ export declare const partition: { */ (f: (input: A, key: K) => Result): (self: ReadonlyRecord) => [left: Record, B>, right: Record, C>]; /** - * Partitions the elements of a record into two groups: those that match a filter, and those that don't. + * Applies a function to each record entry and partitions the returned `Result` + * values into two records. + * + * **Details** + * + * Failure values are collected in the left record, and success values are + * collected in the right record, preserving the original keys. + * + * **Example** (Partitioning with Result) * - * @example * ```ts * import { Record, Result } from "effect" * import * as assert from "node:assert" @@ -1112,7 +1248,8 @@ export declare const partition: { * Partitions a record of `Result` values into two separate records, * one with the `Err` values and one with the `Ok` values. * - * @example + * **Example** (Separating Result values) + * * ```ts * import { Record, Result } from "effect" * import * as assert from "node:assert" @@ -1128,9 +1265,10 @@ export declare const partition: { */ export declare const separate: (self: ReadonlyRecord>) => [Record, A>, Record, B>]; /** - * Retrieve the keys of a given record as an array. + * Retrieves the keys of a given record as an array. + * + * **Example** (Getting record keys) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1143,9 +1281,10 @@ export declare const separate: (self: ReadonlyRecord(self: ReadonlyRecord) => Array; /** - * Retrieve the values of a given record as an array. + * Retrieves the values of a given record as an array. + * + * **Example** (Getting record values) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1158,9 +1297,10 @@ export declare const keys: (self: ReadonlyRecord(self: ReadonlyRecord) => Array; /** - * Add a new key-value pair or update an existing key's value in a record. + * Adds a new key-value pair or update an existing key's value in a record. + * + * **Example** (Setting a record value) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1169,14 +1309,15 @@ export declare const values: (self: ReadonlyRecord) = * assert.deepStrictEqual(Record.set("c", 5)({ a: 1, b: 2 }), { a: 1, b: 2, c: 5 }) * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ export declare const set: { /** - * Add a new key-value pair or update an existing key's value in a record. + * Adds a new key-value pair or update an existing key's value in a record. + * + * **Example** (Setting a record value) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1185,14 +1326,15 @@ export declare const set: { * assert.deepStrictEqual(Record.set("c", 5)({ a: 1, b: 2 }), { a: 1, b: 2, c: 5 }) * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ (key: K1, value: B): (self: ReadonlyRecord) => Record; /** - * Add a new key-value pair or update an existing key's value in a record. + * Adds a new key-value pair or update an existing key's value in a record. + * + * **Example** (Setting a record value) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1201,30 +1343,39 @@ export declare const set: { * assert.deepStrictEqual(Record.set("c", 5)({ a: 1, b: 2 }), { a: 1, b: 2, c: 5 }) * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ (self: ReadonlyRecord, key: K1, value: B): Record; }; /** - * Check if all the keys and values in one record are also found in another record. + * Checks whether all the keys and values in one record are also found in another record. * Uses the provided equivalence function to compare values. * - * @example - * ```ts - * import { Equal, Record } from "effect" - * import * as assert from "node:assert" + * **Example** (Checking subrecords with a custom equivalence) * - * const isSubrecord = Record.isSubrecordBy(Equal.asEquivalence()) + * ```ts + * import { Equivalence, Record } from "effect" * - * assert.deepStrictEqual( - * Record.isSubrecord({ a: 1 } as Record, { a: 1, b: 2 }), - * true - * ) - * assert.deepStrictEqual( - * Record.isSubrecord({ a: 1, b: 2 }, { a: 1 } as Record), - * false + * const isSubrecord = Record.isSubrecordBy( + * Equivalence.make((self, that) => self.toLowerCase() === that.toLowerCase()) * ) + * + * const required: Record.ReadonlyRecord = { role: "Admin" } + * const available: Record.ReadonlyRecord = { + * role: "admin", + * status: "active" + * } + * + * console.log( + * isSubrecord(required, available) + * ) // true + * console.log( + * isSubrecord({ role: "Admin", status: "inactive" }, available) + * ) // false + * console.log( + * isSubrecord(required, { role: "editor", status: "active" }) + * ) // false * ``` * * @category predicates @@ -1235,10 +1386,15 @@ export declare const isSubrecordBy: (equivalence: Equivalence) => { (self: ReadonlyRecord, that: ReadonlyRecord): boolean; }; /** - * Check if one record is a subrecord of another, meaning it contains all the keys and values found in the second record. - * This comparison uses default equality checks (`Equal.equivalence()`). + * Checks whether the first record is a subrecord of the second record. + * + * **Details** + * + * Returns `true` when every key and value in `self` is also present in `that`. + * Values are compared with Effect equality via `Equal.asEquivalence()`. + * + * **Example** (Checking subrecords) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1258,10 +1414,15 @@ export declare const isSubrecordBy: (equivalence: Equivalence) => { */ export declare const isSubrecord: { /** - * Check if one record is a subrecord of another, meaning it contains all the keys and values found in the second record. - * This comparison uses default equality checks (`Equal.equivalence()`). + * Checks whether the first record is a subrecord of the second record. + * + * **Details** + * + * Returns `true` when every key and value in `self` is also present in `that`. + * Values are compared with Effect equality via `Equal.asEquivalence()`. + * + * **Example** (Checking subrecords) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1281,10 +1442,15 @@ export declare const isSubrecord: { */ (that: ReadonlyRecord): (self: ReadonlyRecord) => boolean; /** - * Check if one record is a subrecord of another, meaning it contains all the keys and values found in the second record. - * This comparison uses default equality checks (`Equal.equivalence()`). + * Checks whether the first record is a subrecord of the second record. + * + * **Details** + * + * Returns `true` when every key and value in `self` is also present in `that`. + * Values are compared with Effect equality via `Equal.asEquivalence()`. + * + * **Example** (Checking subrecords) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1305,9 +1471,10 @@ export declare const isSubrecord: { (self: ReadonlyRecord, that: ReadonlyRecord): boolean; }; /** - * Reduce a record to a single value by combining its entries with a specified function. + * Reduces a record to a single value by combining its entries with a specified function. + * + * **Example** (Reducing record values) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1323,9 +1490,10 @@ export declare const isSubrecord: { */ export declare const reduce: { /** - * Reduce a record to a single value by combining its entries with a specified function. + * Reduces a record to a single value by combining its entries with a specified function. + * + * **Example** (Reducing record values) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1341,9 +1509,10 @@ export declare const reduce: { */ (zero: Z, f: (accumulator: Z, value: V, key: K) => Z): (self: ReadonlyRecord) => Z; /** - * Reduce a record to a single value by combining its entries with a specified function. + * Reduces a record to a single value by combining its entries with a specified function. + * + * **Example** (Reducing record values) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1360,9 +1529,10 @@ export declare const reduce: { (self: ReadonlyRecord, zero: Z, f: (accumulator: Z, value: V, key: K) => Z): Z; }; /** - * Check if all entries in a record meet a specific condition. + * Checks whether all entries in a record meet a specific condition. + * + * **Example** (Checking every record value) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1376,9 +1546,10 @@ export declare const reduce: { */ export declare const every: { /** - * Check if all entries in a record meet a specific condition. + * Checks whether all entries in a record meet a specific condition. + * + * **Example** (Checking every record value) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1392,9 +1563,10 @@ export declare const every: { */ (refinement: (value: A, key: K) => value is B): (self: ReadonlyRecord) => self is ReadonlyRecord; /** - * Check if all entries in a record meet a specific condition. + * Checks whether all entries in a record meet a specific condition. + * + * **Example** (Checking every record value) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1408,9 +1580,10 @@ export declare const every: { */ (predicate: (value: A, key: K) => boolean): (self: ReadonlyRecord) => boolean; /** - * Check if all entries in a record meet a specific condition. + * Checks whether all entries in a record meet a specific condition. + * + * **Example** (Checking every record value) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1424,9 +1597,10 @@ export declare const every: { */ (self: ReadonlyRecord, refinement: (value: A, key: K) => value is B): self is ReadonlyRecord; /** - * Check if all entries in a record meet a specific condition. + * Checks whether all entries in a record meet a specific condition. + * + * **Example** (Checking every record value) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1441,9 +1615,10 @@ export declare const every: { (self: ReadonlyRecord, predicate: (value: A, key: K) => boolean): boolean; }; /** - * Check if any entry in a record meets a specific condition. + * Checks whether any entry in a record meets a specific condition. + * + * **Example** (Checking for any matching value) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1457,9 +1632,10 @@ export declare const every: { */ export declare const some: { /** - * Check if any entry in a record meets a specific condition. + * Checks whether any entry in a record meets a specific condition. + * + * **Example** (Checking for any matching value) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1473,9 +1649,10 @@ export declare const some: { */ (predicate: (value: A, key: K) => boolean): (self: ReadonlyRecord) => boolean; /** - * Check if any entry in a record meets a specific condition. + * Checks whether any entry in a record meets a specific condition. + * + * **Example** (Checking for any matching value) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1490,10 +1667,11 @@ export declare const some: { (self: ReadonlyRecord, predicate: (value: A, key: K) => boolean): boolean; }; /** - * Merge two records, preserving entries that exist in either of the records. + * Merges two records, preserving entries that exist in either of the records. * For keys that exist in both records, the provided combine function is used to merge the values. * - * @example + * **Example** (Merging records with union) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1509,10 +1687,11 @@ export declare const some: { */ export declare const union: { /** - * Merge two records, preserving entries that exist in either of the records. + * Merges two records, preserving entries that exist in either of the records. * For keys that exist in both records, the provided combine function is used to merge the values. * - * @example + * **Example** (Merging records with union) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1528,10 +1707,11 @@ export declare const union: { */ (that: ReadonlyRecord, combine: (selfValue: A, thatValue: B) => C): (self: ReadonlyRecord) => Record; /** - * Merge two records, preserving entries that exist in either of the records. + * Merges two records, preserving entries that exist in either of the records. * For keys that exist in both records, the provided combine function is used to merge the values. * - * @example + * **Example** (Merging records with union) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1548,10 +1728,11 @@ export declare const union: { (self: ReadonlyRecord, that: ReadonlyRecord, combine: (selfValue: A, thatValue: B) => C): Record; }; /** - * Merge two records, retaining only the entries that exist in both records. + * Merges two records, retaining only the entries that exist in both records. * For intersecting keys, the provided combine function is used to merge the values. * - * @example + * **Example** (Merging intersecting keys) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1567,10 +1748,11 @@ export declare const union: { */ export declare const intersection: { /** - * Merge two records, retaining only the entries that exist in both records. + * Merges two records, retaining only the entries that exist in both records. * For intersecting keys, the provided combine function is used to merge the values. * - * @example + * **Example** (Merging intersecting keys) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1586,10 +1768,11 @@ export declare const intersection: { */ (that: ReadonlyRecord, combine: (selfValue: A, thatValue: B) => C): (self: ReadonlyRecord) => Record, C>; /** - * Merge two records, retaining only the entries that exist in both records. + * Merges two records, retaining only the entries that exist in both records. * For intersecting keys, the provided combine function is used to merge the values. * - * @example + * **Example** (Merging intersecting keys) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1606,10 +1789,11 @@ export declare const intersection: { (self: ReadonlyRecord, that: ReadonlyRecord, combine: (selfValue: A, thatValue: B) => C): Record, C>; }; /** - * Merge two records, preserving only the entries that are unique to each record. + * Merges two records, preserving only the entries that are unique to each record. * Keys that exist in both records are excluded from the result. * - * @example + * **Example** (Keeping keys unique to each record) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1625,10 +1809,11 @@ export declare const intersection: { */ export declare const difference: { /** - * Merge two records, preserving only the entries that are unique to each record. + * Merges two records, preserving only the entries that are unique to each record. * Keys that exist in both records are excluded from the result. * - * @example + * **Example** (Keeping keys unique to each record) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1644,10 +1829,11 @@ export declare const difference: { */ (that: ReadonlyRecord): (self: ReadonlyRecord) => Record; /** - * Merge two records, preserving only the entries that are unique to each record. + * Merges two records, preserving only the entries that are unique to each record. * Keys that exist in both records are excluded from the result. * - * @example + * **Example** (Keeping keys unique to each record) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1667,7 +1853,8 @@ export declare const difference: { * Create an `Equivalence` for records using the provided `Equivalence` for values. * Two records are considered equivalent if they have the same keys and their corresponding values are equivalent. * - * @example + * **Example** (Comparing records with a value equivalence) + * * ```ts * import { Equal, Record } from "effect" * import * as assert from "node:assert" @@ -1679,13 +1866,14 @@ export declare const difference: { * ``` * * @category instances - * @since 2.0.0 + * @since 4.0.0 */ export declare const makeEquivalence: (equivalence: Equivalence) => Equivalence>; /** * Create a non-empty record from a single element. * - * @example + * **Example** (Creating a singleton record) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -1698,18 +1886,47 @@ export declare const makeEquivalence: (equivalence: Equival */ export declare const singleton: (key: K, value: A) => Record; /** - * A `Reducer` for combining `Record`s using union. + * Creates a `Reducer` for combining `Record`s using union, with values for keys that exist in both records combined + * using the provided `Combiner`. * - * Values for keys that exist in both records are combined using the provided `Combiner`. + * **When to use** * + * Use to build a reusable reducer for accumulating many records into one + * union-shaped record, preserving keys from every input and combining + * overlapping values with the supplied combiner. + * + * **Details** + * + * The returned reducer uses `Record.union` for combine and an empty record as + * `initialValue`, so the default `combineAll` folds from `{}` and accumulates + * keys from each input record. + * + * @see {@link union} for one-off record merging with the same union semantics + * @see {@link makeReducerIntersection} for a reducer that keeps only keys present on both sides + * + * @category combining * @since 4.0.0 */ export declare function makeReducerUnion(combiner: Combiner.Combiner): Reducer.Reducer>; /** - * A `Reducer` for combining `Record`s using intersection. + * Creates a `Reducer` whose `combine` operation intersects two records and + * combines values for keys present in both records. * - * Values are combined using the provided `Combiner`. + * **When to use** * + * Use to build a `Reducer` that combines records by retaining only keys shared + * by both inputs and combining matching values with a `Combiner`. + * + * **Gotchas** + * + * The reducer's `initialValue` is an empty record. Because intersection with + * an empty record is empty, the default `combineAll` folds from `{}` and + * therefore produces `{}` for ordinary non-empty inputs. + * + * @see {@link makeReducerUnion} for a reducer that preserves keys from either input record + * @see {@link intersection} for applying the shared-key merge to one pair of records + * + * @category combining * @since 4.0.0 */ export declare function makeReducerIntersection(combiner: Combiner.Combiner): Reducer.Reducer>; @@ -1717,7 +1934,8 @@ export declare function makeReducerIntersection(combiner: C * Returns the first entry that satisfies the specified * predicate, or `None` if no such entry exists. * - * @example + * **Example** (Finding the first matching entry) + * * ```ts * import { Record } from "effect" * @@ -1737,7 +1955,8 @@ export declare const findFirst: { * Returns the first entry that satisfies the specified * predicate, or `None` if no such entry exists. * - * @example + * **Example** (Finding the first matching entry) + * * ```ts * import { Record } from "effect" * @@ -1757,7 +1976,8 @@ export declare const findFirst: { * Returns the first entry that satisfies the specified * predicate, or `None` if no such entry exists. * - * @example + * **Example** (Finding the first matching entry) + * * ```ts * import { Record } from "effect" * @@ -1777,7 +1997,8 @@ export declare const findFirst: { * Returns the first entry that satisfies the specified * predicate, or `None` if no such entry exists. * - * @example + * **Example** (Finding the first matching entry) + * * ```ts * import { Record } from "effect" * @@ -1797,7 +2018,8 @@ export declare const findFirst: { * Returns the first entry that satisfies the specified * predicate, or `None` if no such entry exists. * - * @example + * **Example** (Finding the first matching entry) + * * ```ts * import { Record } from "effect" * diff --git a/.opencode/node_modules/effect/dist/Record.d.ts.map b/.opencode/node_modules/effect/dist/Record.d.ts.map index 5afed2fd5c2453f678ad31bd6e98483824ac3596..47cd87a6cf172f4e2f482fdd66aee94ee2030567 100644 --- a/.opencode/node_modules/effect/dist/Record.d.ts.map +++ b/.opencode/node_modules/effect/dist/Record.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Record.d.ts","sourceRoot":"","sources":["../src/Record.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEzC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI;IACpE,QAAQ,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC;CACrB,CAAA;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,KAAK,cAAc,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,GACzD;QAAC,CAAC;KAAC,SAAS,CAAC,GAAG,MAAM,IAAI,GAAG,MAAM,IAAI,EAAE,CAAC,GACtC,MAAM,SAAS,IAAI,GAAG,KAAK,GAAG,GAAG,MAAM,EAAE,SAAS,IAAI,GAAG,KAAK,GAAG,IAAI,SAAS,EAAE,GAAG,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,GAChH,KAAK,CAAA;IAET;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAY,aAAa,CAAC,CAAC,SAAS,MAA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C,EAC1B,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,EAAE,GAC9D,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;IACzB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,EAC3B,IAAI,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,GACzD,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;CAgBzB,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Record.js b/.opencode/node_modules/effect/dist/Record.js index 9f0c0b8d5586a85a1995888ac5a9b6d7af3be4d9..a657383a342f02071d2d70bdebaad1db289baf27 100644 --- a/.opencode/node_modules/effect/dist/Record.js +++ b/.opencode/node_modules/effect/dist/Record.js @@ -1,5 +1,11 @@ /** - * This module provides utility functions for working with records in TypeScript. + * Works with plain JavaScript records as immutable key/value dictionaries. + * + * A record is an object whose keys are strings or symbols. This module includes + * helpers for construction, lookup, updates, mapping, filtering, folding, + * set-like combination, and typed conversions between records and iterable + * entries. Helpers that change values return new records instead of mutating the + * input. * * @since 2.0.0 */ @@ -11,7 +17,8 @@ import * as R from "./Result.js"; /** * Creates a new, empty record. * - * @example + * **Example** (Creating an empty record) + * * ```ts * import { Record } from "effect" * @@ -29,9 +36,10 @@ import * as R from "./Result.js"; */ export const empty = () => ({}); /** - * Determine if a record is empty. + * Determines if a mutable record is empty. + * + * **Example** (Checking for an empty record) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -45,9 +53,10 @@ export const empty = () => ({}); */ export const isEmptyRecord = self => Object.keys(self).length === 0; /** - * Determine if a record is empty. + * Determines if a readonly record is empty. + * + * **Example** (Checking for an empty readonly record) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -64,7 +73,8 @@ export const isEmptyReadonlyRecord = isEmptyRecord; * Takes an iterable and a projection function and returns a record. * The projection function maps each value of the iterable to a tuple of a key and a value, which is then added to the resulting record. * - * @example + * **Example** (Building a record from mapped iterable values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -91,7 +101,8 @@ export const fromIterableWith = /*#__PURE__*/dual(2, (self, f) => { /** * Creates a new record from an iterable, utilizing the provided function to determine the key for each element. * - * @example + * **Example** (Building a record keyed by iterable values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -117,10 +128,13 @@ export const fromIterableBy = (items, f) => fromIterableWith(items, a => [f(a), /** * Builds a record from an iterable of key-value pairs. * + * **Details** + * * If there are conflicting keys when using `fromEntries`, the last occurrence of the key/value pair will overwrite the * previous ones. So the resulting record will only have the value of the last occurrence of each key. * - * @example + * **Example** (Building a record from entries) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -130,14 +144,15 @@ export const fromIterableBy = (items, f) => fromIterableWith(items, a => [f(a), * assert.deepStrictEqual(Record.fromEntries(input), { a: 1, b: 2 }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const fromEntries = Object.fromEntries; /** * Transforms the values of a record into an `Array` with a custom mapping function. * - * @example + * **Example** (Collecting mapped record values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -149,7 +164,7 @@ export const fromEntries = Object.fromEntries; * ], ["c", 3]]) * ``` * - * @category conversions + * @category converting * @since 2.0.0 */ export const collect = /*#__PURE__*/dual(2, (self, f) => { @@ -162,7 +177,8 @@ export const collect = /*#__PURE__*/dual(2, (self, f) => { /** * Takes a record and returns an array of tuples containing its keys and values. * - * @example + * **Example** (Converting a record to entries) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -171,14 +187,15 @@ export const collect = /*#__PURE__*/dual(2, (self, f) => { * assert.deepStrictEqual(Record.toEntries(x), [["a", 1], ["b", 2], ["c", 3]]) * ``` * - * @category conversions + * @category converting * @since 2.0.0 */ export const toEntries = /*#__PURE__*/collect((key, value) => [key, value]); /** * Returns the number of key/value pairs in a record. * - * @example + * **Example** (Getting the record size) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -191,9 +208,10 @@ export const toEntries = /*#__PURE__*/collect((key, value) => [key, value]); */ export const size = self => keys(self).length; /** - * Check if a given `key` exists in a record. + * Checks whether a given `key` exists in a record. + * + * **Example** (Checking key membership) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -207,9 +225,10 @@ export const size = self => keys(self).length; */ export const has = /*#__PURE__*/dual(2, (self, key) => Object.hasOwn(self, key)); /** - * Retrieve a value at a particular key from a record, returning it wrapped in an `Option`. + * Retrieves a value at a particular key from a record safely, returning it wrapped in an `Option`. + * + * **Example** (Getting a value as an Option) * - * @example * ```ts * import { Option, Record as R } from "effect" * import * as assert from "node:assert" @@ -225,10 +244,11 @@ export const has = /*#__PURE__*/dual(2, (self, key) => Object.hasOwn(self, key)) */ export const get = /*#__PURE__*/dual(2, (self, key) => has(self, key) ? Option.some(self[key]) : Option.none()); /** - * Apply a function to the element at the specified key, creating a new record, + * Applies a function to the element at the specified key safely, creating a new record, * or return `Option.none()` if the key doesn't exist. * - * @example + * **Example** (Modifying a value at a key) + * * ```ts * import { Record } from "effect" * @@ -240,7 +260,7 @@ export const get = /*#__PURE__*/dual(2, (self, key) => has(self, key) ? Option.s * Record.modify(input, "b", f) // Option.none() * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ export const modify = /*#__PURE__*/dual(3, (self, key, f) => { @@ -251,9 +271,16 @@ export const modify = /*#__PURE__*/dual(3, (self, key, f) => { }); }); /** - * Replaces a value in the record with the new value passed as parameter. + * Replaces the value at an existing key safely and returns the updated record in + * `Option.some`. + * + * **Details** + * + * If the key is not present, returns `Option.none()` and leaves the record + * unchanged. + * + * **Example** (Replacing a value at a key) * - * @example * ```ts * import { Record } from "effect" * @@ -261,15 +288,24 @@ export const modify = /*#__PURE__*/dual(3, (self, key, f) => { * Record.replace(Record.empty(), "a", 10) // Option.none() * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ export const replace = /*#__PURE__*/dual(3, (self, key, b) => modify(self, key, () => b)); /** - * If the given key exists in the record, returns a new record with the key removed. - * If the key does not exist, returns a shallow copy of the original record. + * Removes a key from a record. + * + * **When to use** + * + * Use to create a shallow copy of a record without one property. + * + * **Details** + * + * If the key is not present, the result is still a shallow copy of the original + * record. + * + * **Example** (Removing a key) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -277,7 +313,7 @@ export const replace = /*#__PURE__*/dual(3, (self, key, b) => modify(self, key, * assert.deepStrictEqual(Record.remove({ a: 1, b: 2 }, "a"), { b: 2 }) * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ export const remove = /*#__PURE__*/dual(2, (self, key) => { @@ -293,11 +329,12 @@ export const remove = /*#__PURE__*/dual(2, (self, key) => { return out; }); /** - * Retrieves the value of the property with the given `key` from a record and returns an `Option` + * Retrieves the value of the property with the given `key` from a record safely and returns an `Option` * of a tuple with the value and the record with the removed property. * If the key is not present, returns `Option.none()`. * - * @example + * **Example** (Popping a value and removing its key) + * * ```ts * import { Record } from "effect" * @@ -307,14 +344,15 @@ export const remove = /*#__PURE__*/dual(2, (self, key) => { * Record.pop(input, "c") // Option.none() * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ export const pop = /*#__PURE__*/dual(2, (self, key) => has(self, key) ? Option.some([self[key], remove(self, key)]) : Option.none()); /** * Maps a record into another record by applying a transformation function to each of its values. * - * @example + * **Example** (Mapping record values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -343,7 +381,8 @@ export const map = /*#__PURE__*/dual(2, (self, f) => { /** * Maps the keys of a `ReadonlyRecord` while preserving the corresponding values. * - * @example + * **Example** (Mapping record keys) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -368,7 +407,8 @@ export const mapKeys = /*#__PURE__*/dual(2, (self, f) => { /** * Maps entries of a `ReadonlyRecord` using the provided function, allowing modification of both keys and corresponding values. * - * @example + * **Example** (Mapping record entries) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -394,7 +434,8 @@ export const mapEntries = /*#__PURE__*/dual(2, (self, f) => { * Transforms a record by applying the function `f` to each key and value in the original record. * If the function succeeds, the key-value pair is included in the output record. * - * @example + * **Example** (Filtering and mapping with Result) + * * ```ts * import { Record, Result } from "effect" * import * as assert from "node:assert" @@ -420,7 +461,8 @@ export const filterMap = /*#__PURE__*/dual(2, (self, f) => { /** * Selects properties from a record whose values match the given predicate. * - * @example + * **Example** (Filtering record values) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -442,9 +484,11 @@ export const filter = /*#__PURE__*/dual(2, (self, predicate) => { return out; }); /** - * Given a record with `Option` values, returns a new record containing only the `Some` values, preserving the original keys. + * Returns a new record containing only the `Some` values from a record of + * `Option` values, preserving the original keys. + * + * **Example** (Extracting Some values) * - * @example * ```ts * import { Option, Record } from "effect" * import * as assert from "node:assert" @@ -469,9 +513,11 @@ export const getSomes = self => { return out; }; /** - * Given a record with `Result` values, returns a new record containing only the `Err` values, preserving the original keys. + * Returns a new record containing only the `Err` values from a record of + * `Result` values, preserving the original keys. + * + * **Example** (Extracting Result failures) * - * @example * ```ts * import { Record, Result } from "effect" * import * as assert from "node:assert" @@ -487,7 +533,7 @@ export const getSomes = self => { * ``` * * @category filtering - * @since 2.0.0 + * @since 4.0.0 */ export const getFailures = self => { const out = empty(); @@ -500,9 +546,11 @@ export const getFailures = self => { return out; }; /** - * Given a record with `Result` values, returns a new record containing only the `Ok` values, preserving the original keys. + * Returns a new record containing only the `Ok` values from a record of + * `Result` values, preserving the original keys. + * + * **Example** (Extracting Result successes) * - * @example * ```ts * import { Record, Result } from "effect" * import * as assert from "node:assert" @@ -518,7 +566,7 @@ export const getFailures = self => { * ``` * * @category filtering - * @since 2.0.0 + * @since 4.0.0 */ export const getSuccesses = self => { const out = empty(); @@ -531,9 +579,16 @@ export const getSuccesses = self => { return out; }; /** - * Partitions the elements of a record into two groups: those that match a filter, and those that don't. + * Applies a function to each record entry and partitions the returned `Result` + * values into two records. + * + * **Details** + * + * Failure values are collected in the left record, and success values are + * collected in the right record, preserving the original keys. + * + * **Example** (Partitioning with Result) * - * @example * ```ts * import { Record, Result } from "effect" * import * as assert from "node:assert" @@ -563,7 +618,8 @@ export const partition = /*#__PURE__*/dual(2, (self, f) => { * Partitions a record of `Result` values into two separate records, * one with the `Err` values and one with the `Ok` values. * - * @example + * **Example** (Separating Result values) + * * ```ts * import { Record, Result } from "effect" * import * as assert from "node:assert" @@ -579,9 +635,10 @@ export const partition = /*#__PURE__*/dual(2, (self, f) => { */ export const separate = /*#__PURE__*/partition(identity); /** - * Retrieve the keys of a given record as an array. + * Retrieves the keys of a given record as an array. + * + * **Example** (Getting record keys) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -594,9 +651,10 @@ export const separate = /*#__PURE__*/partition(identity); */ export const keys = self => Object.keys(self); /** - * Retrieve the values of a given record as an array. + * Retrieves the values of a given record as an array. + * + * **Example** (Getting record values) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -609,9 +667,10 @@ export const keys = self => Object.keys(self); */ export const values = self => collect(self, (_, a) => a); /** - * Add a new key-value pair or update an existing key's value in a record. + * Adds a new key-value pair or update an existing key's value in a record. + * + * **Example** (Setting a record value) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -620,7 +679,7 @@ export const values = self => collect(self, (_, a) => a); * assert.deepStrictEqual(Record.set("c", 5)({ a: 1, b: 2 }), { a: 1, b: 2, c: 5 }) * ``` * - * @category utils + * @category mutations * @since 2.0.0 */ export const set = /*#__PURE__*/dual(3, (self, key, value) => { @@ -630,24 +689,33 @@ export const set = /*#__PURE__*/dual(3, (self, key, value) => { }; }); /** - * Check if all the keys and values in one record are also found in another record. + * Checks whether all the keys and values in one record are also found in another record. * Uses the provided equivalence function to compare values. * - * @example - * ```ts - * import { Equal, Record } from "effect" - * import * as assert from "node:assert" + * **Example** (Checking subrecords with a custom equivalence) * - * const isSubrecord = Record.isSubrecordBy(Equal.asEquivalence()) + * ```ts + * import { Equivalence, Record } from "effect" * - * assert.deepStrictEqual( - * Record.isSubrecord({ a: 1 } as Record, { a: 1, b: 2 }), - * true - * ) - * assert.deepStrictEqual( - * Record.isSubrecord({ a: 1, b: 2 }, { a: 1 } as Record), - * false + * const isSubrecord = Record.isSubrecordBy( + * Equivalence.make((self, that) => self.toLowerCase() === that.toLowerCase()) * ) + * + * const required: Record.ReadonlyRecord = { role: "Admin" } + * const available: Record.ReadonlyRecord = { + * role: "admin", + * status: "active" + * } + * + * console.log( + * isSubrecord(required, available) + * ) // true + * console.log( + * isSubrecord({ role: "Admin", status: "inactive" }, available) + * ) // false + * console.log( + * isSubrecord(required, { role: "editor", status: "active" }) + * ) // false * ``` * * @category predicates @@ -662,10 +730,15 @@ export const isSubrecordBy = equivalence => dual(2, (self, that) => { return true; }); /** - * Check if one record is a subrecord of another, meaning it contains all the keys and values found in the second record. - * This comparison uses default equality checks (`Equal.equivalence()`). + * Checks whether the first record is a subrecord of the second record. + * + * **Details** + * + * Returns `true` when every key and value in `self` is also present in `that`. + * Values are compared with Effect equality via `Equal.asEquivalence()`. + * + * **Example** (Checking subrecords) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -685,9 +758,10 @@ export const isSubrecordBy = equivalence => dual(2, (self, that) => { */ export const isSubrecord = /*#__PURE__*/isSubrecordBy(/*#__PURE__*/Equal.asEquivalence()); /** - * Reduce a record to a single value by combining its entries with a specified function. + * Reduces a record to a single value by combining its entries with a specified function. + * + * **Example** (Reducing record values) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -709,9 +783,10 @@ export const reduce = /*#__PURE__*/dual(3, (self, zero, f) => { return out; }); /** - * Check if all entries in a record meet a specific condition. + * Checks whether all entries in a record meet a specific condition. + * + * **Example** (Checking every record value) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -732,9 +807,10 @@ export const every = /*#__PURE__*/dual(2, (self, refinement) => { return true; }); /** - * Check if any entry in a record meets a specific condition. + * Checks whether any entry in a record meets a specific condition. + * + * **Example** (Checking for any matching value) * - * @example * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -755,10 +831,11 @@ export const some = /*#__PURE__*/dual(2, (self, predicate) => { return false; }); /** - * Merge two records, preserving entries that exist in either of the records. + * Merges two records, preserving entries that exist in either of the records. * For keys that exist in both records, the provided combine function is used to merge the values. * - * @example + * **Example** (Merging records with union) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -799,10 +876,11 @@ export const union = /*#__PURE__*/dual(3, (self, that, combine) => { return out; }); /** - * Merge two records, retaining only the entries that exist in both records. + * Merges two records, retaining only the entries that exist in both records. * For intersecting keys, the provided combine function is used to merge the values. * - * @example + * **Example** (Merging intersecting keys) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -829,10 +907,11 @@ export const intersection = /*#__PURE__*/dual(3, (self, that, combine) => { return out; }); /** - * Merge two records, preserving only the entries that are unique to each record. + * Merges two records, preserving only the entries that are unique to each record. * Keys that exist in both records are excluded from the result. * - * @example + * **Example** (Keeping keys unique to each record) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -874,7 +953,8 @@ export const difference = /*#__PURE__*/dual(2, (self, that) => { * Create an `Equivalence` for records using the provided `Equivalence` for values. * Two records are considered equivalent if they have the same keys and their corresponding values are equivalent. * - * @example + * **Example** (Comparing records with a value equivalence) + * * ```ts * import { Equal, Record } from "effect" * import * as assert from "node:assert" @@ -886,7 +966,7 @@ export const difference = /*#__PURE__*/dual(2, (self, that) => { * ``` * * @category instances - * @since 2.0.0 + * @since 4.0.0 */ export const makeEquivalence = equivalence => { const is = isSubrecordBy(equivalence); @@ -895,7 +975,8 @@ export const makeEquivalence = equivalence => { /** * Create a non-empty record from a single element. * - * @example + * **Example** (Creating a singleton record) + * * ```ts * import { Record } from "effect" * import * as assert from "node:assert" @@ -910,20 +991,49 @@ export const singleton = (key, value) => ({ [key]: value }); /** - * A `Reducer` for combining `Record`s using union. + * Creates a `Reducer` for combining `Record`s using union, with values for keys that exist in both records combined + * using the provided `Combiner`. + * + * **When to use** * - * Values for keys that exist in both records are combined using the provided `Combiner`. + * Use to build a reusable reducer for accumulating many records into one + * union-shaped record, preserving keys from every input and combining + * overlapping values with the supplied combiner. * + * **Details** + * + * The returned reducer uses `Record.union` for combine and an empty record as + * `initialValue`, so the default `combineAll` folds from `{}` and accumulates + * keys from each input record. + * + * @see {@link union} for one-off record merging with the same union semantics + * @see {@link makeReducerIntersection} for a reducer that keeps only keys present on both sides + * + * @category combining * @since 4.0.0 */ export function makeReducerUnion(combiner) { return Reducer.make((self, that) => union(self, that, combiner.combine), {}); } /** - * A `Reducer` for combining `Record`s using intersection. + * Creates a `Reducer` whose `combine` operation intersects two records and + * combines values for keys present in both records. + * + * **When to use** * - * Values are combined using the provided `Combiner`. + * Use to build a `Reducer` that combines records by retaining only keys shared + * by both inputs and combining matching values with a `Combiner`. * + * **Gotchas** + * + * The reducer's `initialValue` is an empty record. Because intersection with + * an empty record is empty, the default `combineAll` folds from `{}` and + * therefore produces `{}` for ordinary non-empty inputs. + * + * @see {@link makeReducerUnion} for a reducer that preserves keys from either input record + * @see {@link intersection} for applying the shared-key merge to one pair of records + * + * @category combining * @since 4.0.0 */ export function makeReducerIntersection(combiner) { @@ -933,7 +1043,8 @@ export function makeReducerIntersection(combiner) { * Returns the first entry that satisfies the specified * predicate, or `None` if no such entry exists. * - * @example + * **Example** (Finding the first matching entry) + * * ```ts * import { Record } from "effect" * diff --git a/.opencode/node_modules/effect/dist/Record.js.map b/.opencode/node_modules/effect/dist/Record.js.map index fdc2fab75a2c6ee9d820597c8ec251d47b6c70b1..6af5172157076186eda91c0a46769fd4266fb44f 100644 --- a/.opencode/node_modules/effect/dist/Record.js.map +++ b/.opencode/node_modules/effect/dist/Record.js.map @@ -1 +1 @@ -{"version":3,"file":"Record.js","names":["Equal","dual","identity","Option","Reducer","R","empty","isEmptyRecord","self","Object","keys","length","isEmptyReadonlyRecord","fromIterableWith","f","out","a","k","b","fromIterableBy","items","fromEntries","collect","key","push","toEntries","value","size","has","hasOwn","get","some","none","modify","replace","remove","pop","map","mapKeys","mapEntries","filterMap","result","isSuccess","success","filter","predicate","getSomes","option","isSome","getFailures","isFailure","failure","getSuccesses","partition","left","right","e","separate","values","_","set","isSubrecordBy","equivalence","that","isSubrecord","asEquivalence","reduce","zero","every","refinement","union","combine","intersection","difference","makeEquivalence","is","singleton","makeReducerUnion","combiner","make","makeReducerIntersection","findFirst","i"],"sources":["../src/Record.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAOA,OAAO,KAAKA,KAAK,MAAM,YAAY;AAEnC,SAASC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAE9C,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC,OAAO,KAAKC,CAAC,MAAM,aAAa;AAqHhC;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,KAAK,GAAGA,CAAA,MAGf,EAAU;AAEhB;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,aAAa,GAAyBC,IAAkB,IACnEC,MAAM,CAACC,IAAI,CAACF,IAAI,CAAC,CAACG,MAAM,KAAK,CAAC;AAEhC;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,qBAAqB,GAEML,aAAa;AAErD;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMM,gBAAgB,gBA2CzBZ,IAAI,CACN,CAAC,EACD,CACEO,IAAiB,EACjBM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AAC,EAAEA,GAAG,CAAC,EAAE;MACrB,OAAOpB,MAAM,CAAC4B,IAAI,CAAC,CAACR,GAAG,EAAEf,IAAI,CAACe,GAAG,CAAC,CAAC,CAAC;IACtC;EACF;EACA,OAAOpB,MAAM,CAAC6B,IAAI,EAAE;AACtB,CAAC,CACF","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Record.js","names":["Equal","dual","identity","Option","Reducer","R","empty","isEmptyRecord","self","Object","keys","length","isEmptyReadonlyRecord","fromIterableWith","f","out","a","k","b","fromIterableBy","items","fromEntries","collect","key","push","toEntries","value","size","has","hasOwn","get","some","none","modify","replace","remove","pop","map","mapKeys","mapEntries","filterMap","result","isSuccess","success","filter","predicate","getSomes","option","isSome","getFailures","isFailure","failure","getSuccesses","partition","left","right","e","separate","values","_","set","isSubrecordBy","equivalence","that","isSubrecord","asEquivalence","reduce","zero","every","refinement","union","combine","intersection","difference","makeEquivalence","is","singleton","makeReducerUnion","combiner","make","makeReducerIntersection","findFirst","i"],"sources":["../src/Record.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAaA,OAAO,KAAKA,KAAK,MAAM,YAAY;AAEnC,SAASC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAE9C,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC,OAAO,KAAKC,CAAC,MAAM,aAAa;AAgIhC;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMC,KAAK,GAAGA,CAAA,MAGf,EAAU;AAEhB;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,aAAa,GAAyBC,IAAkB,IACnEC,MAAM,CAACC,IAAI,CAACF,IAAI,CAAC,CAACG,MAAM,KAAK,CAAC;AAEhC;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,qBAAqB,GAEML,aAAa;AAErD;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAMM,gBAAgB,gBA6CzBZ,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AAG,CAAC,EAAEA,CAAC,GAAGjE,CAAC,CAACN,MAAM,EAAEuE,CAAC,EAAE,EAAE;IACjC,MAAM3D,GAAG,GAAGN,CAAC,CAACiE,CAAC,CAAC;IAChB,IAAIpE,CAAC,CAACN,IAAI,CAACe,GAAG,CAAC,EAAEA,GAAG,CAAC,EAAE;MACrB,OAAOpB,MAAM,CAAC4B,IAAI,CAAC,CAACR,GAAG,EAAEf,IAAI,CAACe,GAAG,CAAC,CAAC,CAAC;IACtC;EACF;EACA,OAAOpB,MAAM,CAAC6B,IAAI,EAAE;AACtB,CAAC,CACF","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Redactable.d.ts b/.opencode/node_modules/effect/dist/Redactable.d.ts index ef0a23c716320c9e1708773cb4ccea8e4abb3f18..652473ae213ae4fbdf61b14fc22d4bc480423eb8 100644 --- a/.opencode/node_modules/effect/dist/Redactable.d.ts +++ b/.opencode/node_modules/effect/dist/Redactable.d.ts @@ -6,77 +6,23 @@ * Typical use cases include masking secrets, tokens, or personal data in logs, traces, * and serialized output. * - * ## Mental model - * - * - **Redactable** - an object that implements `[symbolRedactable]`, a method - * that receives the current `Context` and returns a replacement value. - * - **symbolRedactable** - the well-known `Symbol` key that marks an object as - * redactable. - * - **redact** - the primary entry point: pass any value and get back either its - * redacted form (if it is `Redactable`) or the original value unchanged. - * - **getRedacted** - lower-level helper that calls `[symbolRedactable]` directly - * on a value already known to be `Redactable`. - * - The `Context` passed to `[symbolRedactable]` comes from the current fiber. - * If no fiber is active, an empty `Context` is used. - * - * ## Common tasks - * - * - **Make a value redactable**: implement the {@link Redactable} interface by - * adding a `[symbolRedactable]` method. - * - **Redact an unknown value**: call {@link redact} - it returns the original - * value when it is not redactable. - * - **Check if a value is redactable**: use {@link isRedactable}. - * - **Get the redacted form of a known `Redactable`**: use {@link getRedacted}. - * - * ## Gotchas - * - * - `[symbolRedactable]` receives the fiber's `Context` as its argument. - * - Outside of an Effect runtime (no current fiber), `getRedacted` still works - * but passes an empty `Context`, so service lookups will not find anything. - * - `redact` is not recursive: if a redactable object contains nested - * redactable values, only the outermost redaction is applied. - * - * ## Quickstart - * - * **Example** (Masking an API key) - * - * ```ts - * import { Context, Redactable } from "effect" - * - * class ApiKey { - * constructor(readonly raw: string) {} - * - * [Redactable.symbolRedactable](_ctx: Context.Context) { - * return this.raw.slice(0, 4) + "..." - * } - * } - * - * const key = new ApiKey("sk-1234567890abcdef") - * - * console.log(Redactable.isRedactable(key)) // true - * console.log(Redactable.redact(key)) // "sk-1..." - * console.log(Redactable.redact("plain")) // "plain" - * ``` - * - * ## See also - * - * - {@link Redactable} - the interface to implement - * - {@link symbolRedactable} - the symbol key - * - {@link redact} - the main redaction entry point - * * @since 4.0.0 */ import type * as Context from "./Context.ts"; /** - * Symbol used to identify objects that implement the {@link Redactable} + * Defines the symbol used to identify objects that implement the {@link Redactable} * protocol. * - * Add a method under this key to make an object redactable. The method - * receives the current `Context` and must return the replacement value. + * **When to use** + * + * Use as the property key when implementing the `Redactable` protocol. * - * - Use this symbol as the property key when implementing {@link Redactable}. - * - Registered globally via `Symbol.for("~effect/Redactable")`, - * so it is identical across multiple copies of the library at runtime. + * **Details** + * + * Add a method under this key to make an object redactable. The method receives + * the current `Context` and must return the replacement value. The symbol is + * registered globally via `Symbol.for("~effect/Redactable")`, so it is + * identical across multiple copies of the library at runtime. * * **Example** (Masking an API key) * @@ -92,21 +38,24 @@ import type * as Context from "./Context.ts"; * } * ``` * - * See also: - * - {@link Redactable} - the interface this symbol belongs to - * - {@link isRedactable} - check whether a value has this symbol - * - * @since 4.0.0 - * @category symbol + * @see {@link Redactable} for the interface this symbol belongs to + * @see {@link isRedactable} to check whether a value has this symbol + * @category symbols + * @since 3.10.0 */ export declare const symbolRedactable: unique symbol; /** * Interface for objects that provide context-aware redacted representations. * - * - Implement this interface on any class or object that holds sensitive data - * and should present a sanitized form when inspected or logged. - * - The `[symbolRedactable]` method receives the current fiber's `Context`. - * - If no fiber is active, an empty `Context` is provided. + * **When to use** + * + * Use to define classes or objects that hold sensitive data and should present + * a sanitized form when inspected or logged. + * + * **Details** + * + * The `[symbolRedactable]` method receives the current fiber's `Context`. If no + * fiber is active, an empty `Context` is provided. * * **Example** (Masking an API key) * @@ -122,13 +71,11 @@ export declare const symbolRedactable: unique symbol; * } * ``` * - * See also: - * - {@link symbolRedactable} - the symbol key to implement - * - {@link redact} - apply redaction to any value - * - {@link isRedactable} - type guard for this interface - * - * @since 4.0.0 - * @category Model + * @see {@link symbolRedactable} for the symbol key to implement + * @see {@link redact} to apply redaction to any value + * @see {@link isRedactable} for the type guard for this interface + * @category models + * @since 3.10.0 */ export interface Redactable { readonly [symbolRedactable]: (context: Context.Context) => unknown; @@ -137,48 +84,62 @@ export interface Redactable { * Type guard that checks whether a value implements the {@link Redactable} * interface. * - * See also: - * - {@link Redactable} - the interface being checked - * - {@link redact} - applies redaction if the value is redactable + * **When to use** * - * @since 4.0.0 + * Use to narrow an unknown value before calling redaction-specific helpers. + * + * @see {@link Redactable} for the interface being checked + * @see {@link redact} to apply redaction if the value is redactable * @category guards + * @since 3.10.0 */ export declare const isRedactable: (u: unknown) => u is Redactable; /** - * Redacts a value if it implements {@link Redactable}, otherwise returns it + * Returns a redacted value if it implements {@link Redactable}, otherwise returns it * unchanged. * - * - Use this as the general-purpose entry point for redaction: it is safe to - * call on any value. - * - Internally calls {@link isRedactable} and, if `true`, delegates to - * {@link getRedacted}. - * - Not recursive: nested redactable values inside the returned object are not - * automatically redacted. - * - Pure with respect to its argument (does not mutate the input). + * **When to use** * - * See also: - * - {@link isRedactable} - check before redacting - * - {@link getRedacted} - lower-level variant for known redactables + * Use as the general-purpose entry point for redaction when the input may + * or may not implement the redaction protocol. * - * @since 4.0.0 + * **Details** + * + * This function calls {@link isRedactable} and, when it returns `true`, + * delegates to {@link getRedacted}. + * + * **Gotchas** + * + * Redaction is not recursive. Nested redactable values inside the returned + * object are not automatically redacted. + * + * @see {@link isRedactable} to check before redacting + * @see {@link getRedacted} for the lower-level variant for known redactables + * @category destructors + * @since 3.10.0 */ export declare function redact(u: unknown): unknown; /** - * Calls `[symbolRedactable]` on a value that is already known to be - * {@link Redactable} and returns the result. + * Returns the result of calling `[symbolRedactable]` on a value that is + * already known to be {@link Redactable}. + * + * **When to use** + * + * Use when you need to read the redacted representation from a value already + * verified as `Redactable`. + * + * **Details** + * + * This function reads the current fiber's `Context` from the global fiber + * reference and passes it to the redaction method. * - * - Use this when you have already verified the value is `Redactable` (e.g., - * via {@link isRedactable}) and want to avoid a second check. - * - Reads the current fiber's `Context` from the global fiber reference. If - * no fiber is active, an empty `Context` is passed to the redaction - * method. - * - Does not mutate the input. + * **Gotchas** * - * See also: - * - {@link redact} - higher-level variant that handles non-redactable values - * - {@link isRedactable} - type guard to verify before calling this + * If no fiber is active, an empty `Context` is passed to the redaction method. * + * @see {@link redact} for the higher-level variant that handles non-redactable values + * @see {@link isRedactable} for the type guard to verify before calling this + * @category destructors * @since 4.0.0 */ export declare function getRedacted(redactable: Redactable): unknown; diff --git a/.opencode/node_modules/effect/dist/Redactable.d.ts.map b/.opencode/node_modules/effect/dist/Redactable.d.ts.map index 3fac3348e2ca8e40ceb3d434e3320bd164c2d762..46bb2d3496f13458ab89eabaf621203b16d4d839 100644 --- a/.opencode/node_modules/effect/dist/Redactable.d.ts.map +++ b/.opencode/node_modules/effect/dist/Redactable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Redactable.d.ts","sourceRoot":"","sources":["../src/Redactable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAO,MAAyC,CAAA;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,CAAC,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,OAAO,CAAA;CAC1E;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,UAA8C,CAAA;AAE7F;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAG1C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAE3D"} \ No newline at end of file +{"version":3,"file":"Redactable.d.ts","sourceRoot":"","sources":["../src/Redactable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAO,MAAyC,CAAA;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,CAAC,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,OAAO,CAAA;CAC1E;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,UAA8C,CAAA;AAE7F;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAG1C;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAE3D"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Redactable.js b/.opencode/node_modules/effect/dist/Redactable.js index 01e93da5b0544b23bf4e7c85e1be9ff8784f7c22..96177d0255874724ad2c52b00381770d29c93702 100644 --- a/.opencode/node_modules/effect/dist/Redactable.js +++ b/.opencode/node_modules/effect/dist/Redactable.js @@ -1,15 +1,19 @@ import { pipeArguments } from "./Pipeable.js"; import { hasProperty } from "./Predicate.js"; /** - * Symbol used to identify objects that implement the {@link Redactable} + * Defines the symbol used to identify objects that implement the {@link Redactable} * protocol. * - * Add a method under this key to make an object redactable. The method - * receives the current `Context` and must return the replacement value. + * **When to use** * - * - Use this symbol as the property key when implementing {@link Redactable}. - * - Registered globally via `Symbol.for("~effect/Redactable")`, - * so it is identical across multiple copies of the library at runtime. + * Use as the property key when implementing the `Redactable` protocol. + * + * **Details** + * + * Add a method under this key to make an object redactable. The method receives + * the current `Context` and must return the replacement value. The symbol is + * registered globally via `Symbol.for("~effect/Redactable")`, so it is + * identical across multiple copies of the library at runtime. * * **Example** (Masking an API key) * @@ -25,63 +29,75 @@ import { hasProperty } from "./Predicate.js"; * } * ``` * - * See also: - * - {@link Redactable} - the interface this symbol belongs to - * - {@link isRedactable} - check whether a value has this symbol - * - * @since 4.0.0 - * @category symbol + * @see {@link Redactable} for the interface this symbol belongs to + * @see {@link isRedactable} to check whether a value has this symbol + * @category symbols + * @since 3.10.0 */ export const symbolRedactable = /*#__PURE__*/Symbol.for("~effect/Redactable"); /** * Type guard that checks whether a value implements the {@link Redactable} * interface. * - * See also: - * - {@link Redactable} - the interface being checked - * - {@link redact} - applies redaction if the value is redactable + * **When to use** * - * @since 4.0.0 + * Use to narrow an unknown value before calling redaction-specific helpers. + * + * @see {@link Redactable} for the interface being checked + * @see {@link redact} to apply redaction if the value is redactable * @category guards + * @since 3.10.0 */ export const isRedactable = u => hasProperty(u, symbolRedactable); /** - * Redacts a value if it implements {@link Redactable}, otherwise returns it + * Returns a redacted value if it implements {@link Redactable}, otherwise returns it * unchanged. * - * - Use this as the general-purpose entry point for redaction: it is safe to - * call on any value. - * - Internally calls {@link isRedactable} and, if `true`, delegates to - * {@link getRedacted}. - * - Not recursive: nested redactable values inside the returned object are not - * automatically redacted. - * - Pure with respect to its argument (does not mutate the input). + * **When to use** * - * See also: - * - {@link isRedactable} - check before redacting - * - {@link getRedacted} - lower-level variant for known redactables + * Use as the general-purpose entry point for redaction when the input may + * or may not implement the redaction protocol. * - * @since 4.0.0 + * **Details** + * + * This function calls {@link isRedactable} and, when it returns `true`, + * delegates to {@link getRedacted}. + * + * **Gotchas** + * + * Redaction is not recursive. Nested redactable values inside the returned + * object are not automatically redacted. + * + * @see {@link isRedactable} to check before redacting + * @see {@link getRedacted} for the lower-level variant for known redactables + * @category destructors + * @since 3.10.0 */ export function redact(u) { if (isRedactable(u)) return getRedacted(u); return u; } /** - * Calls `[symbolRedactable]` on a value that is already known to be - * {@link Redactable} and returns the result. + * Returns the result of calling `[symbolRedactable]` on a value that is + * already known to be {@link Redactable}. + * + * **When to use** + * + * Use when you need to read the redacted representation from a value already + * verified as `Redactable`. + * + * **Details** + * + * This function reads the current fiber's `Context` from the global fiber + * reference and passes it to the redaction method. * - * - Use this when you have already verified the value is `Redactable` (e.g., - * via {@link isRedactable}) and want to avoid a second check. - * - Reads the current fiber's `Context` from the global fiber reference. If - * no fiber is active, an empty `Context` is passed to the redaction - * method. - * - Does not mutate the input. + * **Gotchas** * - * See also: - * - {@link redact} - higher-level variant that handles non-redactable values - * - {@link isRedactable} - type guard to verify before calling this + * If no fiber is active, an empty `Context` is passed to the redaction method. * + * @see {@link redact} for the higher-level variant that handles non-redactable values + * @see {@link isRedactable} for the type guard to verify before calling this + * @category destructors * @since 4.0.0 */ export function getRedacted(redactable) { diff --git a/.opencode/node_modules/effect/dist/Redactable.js.map b/.opencode/node_modules/effect/dist/Redactable.js.map index dcd3a581180f7bbe5da0f3632f0276ccb765b224..0cc219ef5130d46cc18e0977d58b1f95ac663b63 100644 --- a/.opencode/node_modules/effect/dist/Redactable.js.map +++ b/.opencode/node_modules/effect/dist/Redactable.js.map @@ -1 +1 @@ -{"version":3,"file":"Redactable.js","names":["pipeArguments","hasProperty","symbolRedactable","Symbol","for","isRedactable","u","redact","getRedacted","redactable","globalThis","currentFiberTypeId","context","emptyContext","mapUnsafe","Map","pipe","arguments"],"sources":["../src/Redactable.ts"],"sourcesContent":[null],"mappings":"AAqEA,SAASA,aAAa,QAAQ,eAAe;AAC7C,SAASC,WAAW,QAAQ,gBAAgB;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,MAAMC,gBAAgB,gBAAkBC,MAAM,CAACC,GAAG,CAAC,oBAAoB,CAAC;AAoC/E;;;;;;;;;;;AAWA,OAAO,MAAMC,YAAY,GAAIC,CAAU,IAAsBL,WAAW,CAACK,CAAC,EAAEJ,gBAAgB,CAAC;AAE7F;;;;;;;;;;;;;;;;;;AAkBA,OAAM,SAAUK,MAAMA,CAACD,CAAU;EAC/B,IAAID,YAAY,CAACC,CAAC,CAAC,EAAE,OAAOE,WAAW,CAACF,CAAC,CAAC;EAC1C,OAAOA,CAAC;AACV;AAEA;;;;;;;;;;;;;;;;;AAiBA,OAAM,SAAUE,WAAWA,CAACC,UAAsB;EAChD,OAAOA,UAAU,CAACP,gBAAgB,CAAC,CAAEQ,UAAkB,CAACC,kBAAkB,CAAC,EAAEC,OAAO,IAAIC,YAAY,CAAC;AACvG;AAEA;AACA,OAAO,MAAMF,kBAAkB,GAAG,4BAA4B;AAE9D,MAAME,YAAY,GAA2B;EAC3C,iBAAiB,EAAE,EAAS;EAC5BC,SAAS,eAAE,IAAIC,GAAG,EAAE;EACpBC,IAAIA,CAAA;IACF,OAAOhB,aAAa,CAAC,IAAI,EAAEiB,SAAS,CAAC;EACvC;CACM","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Redactable.js","names":["pipeArguments","hasProperty","symbolRedactable","Symbol","for","isRedactable","u","redact","getRedacted","redactable","globalThis","currentFiberTypeId","context","emptyContext","mapUnsafe","Map","pipe","arguments"],"sources":["../src/Redactable.ts"],"sourcesContent":[null],"mappings":"AAWA,SAASA,aAAa,QAAQ,eAAe;AAC7C,SAASC,WAAW,QAAQ,gBAAgB;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,OAAO,MAAMC,gBAAgB,gBAAkBC,MAAM,CAACC,GAAG,CAAC,oBAAoB,CAAC;AAuC/E;;;;;;;;;;;;;AAaA,OAAO,MAAMC,YAAY,GAAIC,CAAU,IAAsBL,WAAW,CAACK,CAAC,EAAEJ,gBAAgB,CAAC;AAE7F;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAM,SAAUK,MAAMA,CAACD,CAAU;EAC/B,IAAID,YAAY,CAACC,CAAC,CAAC,EAAE,OAAOE,WAAW,CAACF,CAAC,CAAC;EAC1C,OAAOA,CAAC;AACV;AAEA;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAM,SAAUE,WAAWA,CAACC,UAAsB;EAChD,OAAOA,UAAU,CAACP,gBAAgB,CAAC,CAAEQ,UAAkB,CAACC,kBAAkB,CAAC,EAAEC,OAAO,IAAIC,YAAY,CAAC;AACvG;AAEA;AACA,OAAO,MAAMF,kBAAkB,GAAG,4BAA4B;AAE9D,MAAME,YAAY,GAA2B;EAC3C,iBAAiB,EAAE,EAAS;EAC5BC,SAAS,eAAE,IAAIC,GAAG,EAAE;EACpBC,IAAIA,CAAA;IACF,OAAOhB,aAAa,CAAC,IAAI,EAAEiB,SAAS,CAAC;EACvC;CACM","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Redacted.d.ts b/.opencode/node_modules/effect/dist/Redacted.d.ts index cf690fd9b8a25d9059ccca21cfaf0c53135b8452..0a6388d7d507876e976f141c5a3dfb277daa3d67 100644 --- a/.opencode/node_modules/effect/dist/Redacted.d.ts +++ b/.opencode/node_modules/effect/dist/Redacted.d.ts @@ -1,8 +1,12 @@ /** - * The Redacted module provides functionality for handling sensitive information - * securely within your application. By using the `Redacted` data type, you can - * ensure that sensitive values are not accidentally exposed in logs or error - * messages. + * Wraps sensitive values so normal output does not reveal them. + * + * A `Redacted` shows a redacted placeholder in string, JSON, and inspection + * output, while still storing the original value for trusted code that needs to + * recover it. This helps reduce accidental leaks in logs and diagnostics. This + * module includes constructors, runtime checks, value recovery, wiping of stored + * values, and comparison helpers that avoid exposing the wrapped value at the + * call site. * * @since 3.3.0 */ @@ -12,7 +16,23 @@ import type { Pipeable } from "./Pipeable.ts"; import type { Covariant } from "./Types.ts"; declare const TypeId = "~effect/data/Redacted"; /** - * @example + * A wrapper for sensitive values whose string, JSON, and inspection output is + * redacted. + * + * **When to use** + * + * Use to carry sensitive values while reducing accidental exposure in string, + * JSON, and inspection output. + * + * **Gotchas** + * + * The underlying value is still stored in memory and can be recovered with + * `Redacted.value` until the wrapper is wiped or becomes unreachable. Use + * `Redacted` to reduce accidental disclosure in logs and diagnostics, not as a + * cryptographic protection mechanism. + * + * **Example** (Creating redacted values) + * * ```ts * import { Redacted } from "effect" * @@ -23,14 +43,21 @@ declare const TypeId = "~effect/data/Redacted"; * // TypeScript will infer the types as Redacted * ``` * - * @since 3.3.0 * @category models + * @since 3.3.0 */ export interface Redacted extends Redacted.Variance, Equal.Equal, Pipeable { readonly label: string | undefined; } /** - * @example + * Namespace containing type-level members associated with `Redacted` values. + * + * **When to use** + * + * Use to access type-level helpers associated with `Redacted`. + * + * **Example** (Using namespace utilities) + * * ```ts * import { Redacted } from "effect" * @@ -42,23 +69,23 @@ export interface Redacted extends Redacted.Variance, Equal.Eq * ``` * * @since 3.3.0 - * @category namespace */ export declare namespace Redacted { /** - * @example - * ```ts - * import { Redacted } from "effect" + * Type-level variance marker for `Redacted`. * - * // Variance interface ensures type safety for covariant type parameter - * const stringSecret = Redacted.make("secret") - * const numberSecret = Redacted.make(42) + * **When to use** * - * // TypeScript will infer the types with proper variance - * ``` + * Use when defining internals that need to preserve the covariant value type + * carried by `Redacted`. + * + * **Details** + * + * This interface records the covariant value type carried by a `Redacted` + * value and is not normally referenced directly by users. * - * @since 3.3.0 * @category models + * @since 3.3.0 */ interface Variance { readonly [TypeId]: { @@ -66,22 +93,46 @@ export declare namespace Redacted { }; } /** - * @example + * Extracts the underlying value type from a `Redacted` type. + * + * **When to use** + * + * Use to infer the sensitive value type from an existing `Redacted` type. + * + * **Example** (Extracting the redacted value type) + * * ```ts * import { Redacted } from "effect" * - * // Extract the value type from a Redacted instance - * const secret = Redacted.make("my-secret") - * const extractedValue: string = Redacted.value(secret) + * type ApiKey = Redacted.Redacted<{ readonly token: string }> + * type ApiKeyValue = Redacted.Redacted.Value + * + * const rotate = (value: ApiKeyValue): ApiKeyValue => ({ + * token: `${value.token}:rotated` + * }) + * + * console.log(rotate({ token: "secret" })) // { token: "secret:rotated" } * ``` * + * @category utility types * @since 3.3.0 - * @category type-level */ type Value> = [T] extends [Redacted] ? _A : never; } /** - * @example + * Returns `true` if a value is a `Redacted` wrapper. + * + * **When to use** + * + * Use to validate unknown input and narrow it to `Redacted`. + * + * **Details** + * + * When this function returns `true`, TypeScript narrows the value to + * `Redacted`. + * + * **Example** (Checking for redacted values) + * * ```ts * import { Redacted } from "effect" * @@ -92,23 +143,34 @@ export declare namespace Redacted { * console.log(Redacted.isRedacted(plainString)) // false * ``` * - * @since 3.3.0 * @category refinements + * @since 3.3.0 */ export declare const isRedacted: (u: unknown) => u is Redacted; /** - * This function creates a `Redacted` instance from a given value `A`, - * securely hiding its content. + * Creates a `Redacted` wrapper for a sensitive value. + * + * **When to use** + * + * Use to wrap a sensitive value so normal string, JSON, and inspection output + * is redacted. + * + * **Details** + * + * The wrapper redacts string, JSON, and inspection output to reduce accidental + * disclosure. The original value remains retrievable with `Redacted.value` + * until the wrapper is wiped or becomes unreachable. + * + * **Example** (Creating a redacted value) * - * @example * ```ts * import { Redacted } from "effect" * * const API_KEY = Redacted.make("1234567890") * ``` * - * @since 3.3.0 * @category constructors + * @since 3.3.0 */ export declare const make: (value: T, options?: { readonly label?: string | undefined; @@ -117,7 +179,12 @@ export declare const make: (value: T, options?: { * Retrieves the original value from a `Redacted` instance. Use this function * with caution, as it exposes the sensitive data. * - * @example + * **When to use** + * + * Use when you need the underlying sensitive value at a trusted boundary. + * + * **Example** (Retrieving a redacted value) + * * ```ts * import { Redacted } from "effect" * import * as assert from "node:assert" @@ -127,16 +194,27 @@ export declare const make: (value: T, options?: { * assert.equal(Redacted.value(API_KEY), "1234567890") * ``` * - * @since 3.3.0 * @category getters + * @since 3.3.0 */ export declare const value: (self: Redacted) => T; /** - * Erases the underlying value of a `Redacted` instance, rendering it unusable. - * This function is intended to ensure that sensitive data does not remain in - * memory longer than necessary. + * Deletes the stored value for a `Redacted` wrapper, making future + * `Redacted.value` calls on that wrapper fail. + * + * **When to use** + * + * Use when a `Redacted` wrapper should no longer be able to reveal its stored + * value. + * + * **Gotchas** + * + * This unsafe operation does not zero memory and does not affect other + * references to the original value. It only removes the value from the + * internal redacted registry. + * + * **Example** (Wiping a redacted value) * - * @example * ```ts * import { Redacted } from "effect" * import * as assert from "node:assert" @@ -153,8 +231,8 @@ export declare const value: (self: Redacted) => T; * ) * ``` * - * @since 3.3.0 * @category unsafe + * @since 4.0.0 */ export declare const wipeUnsafe: (self: Redacted) => boolean; /** @@ -162,7 +240,13 @@ export declare const wipeUnsafe: (self: Redacted) => boolean; * equivalence relation for the underlying values `A`. This function is useful * for comparing `Redacted` instances without exposing their contents. * - * @example + * **When to use** + * + * Use when you need to compare wrapped secrets through an approved equality + * rule without exposing the underlying values at each comparison site. + * + * **Example** (Comparing redacted values) + * * ```ts * import { Equivalence, Redacted } from "effect" * import * as assert from "node:assert" @@ -177,8 +261,8 @@ export declare const wipeUnsafe: (self: Redacted) => boolean; * assert.equal(equivalence(API_KEY1, API_KEY3), true) * ``` * - * @category equivalence - * @since 3.3.0 + * @category instances + * @since 4.0.0 */ export declare const makeEquivalence: (isEquivalent: Equivalence.Equivalence) => Equivalence.Equivalence>; export {}; diff --git a/.opencode/node_modules/effect/dist/Redacted.d.ts.map b/.opencode/node_modules/effect/dist/Redacted.d.ts.map index 7e70e98ea757401dc9e7e7e3fc6d2b6de1f0ac01..7d86b5117354f3dbf629f9e2fa84c37cb7eb1dd8 100644 --- a/.opencode/node_modules/effect/dist/Redacted.d.ts.map +++ b/.opencode/node_modules/effect/dist/Redacted.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Redacted.d.ts","sourceRoot":"","sources":["../src/Redacted.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAI/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C,QAAA,MAAM,MAAM,0BAA0B,CAAA;AAEtC;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,QAAQ;IAC3F,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CACnC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC;;;;;;;;;;;;;;OAcG;IACH,UAAiB,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC7B,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE;YACjB,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;SAC1B,CAAA;KACF;IAED;;;;;;;;;;;;OAYG;IACH,KAAY,KAAK,CAAC,CAAC,SAAS,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,KA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AM,QAAQ,CAAC,CAAC,CAAC,KAAG,OAAiD,CAAA;AAEnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,EAAE,cAAc,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,KAAG,WAAW,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CACnD,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Redacted.js b/.opencode/node_modules/effect/dist/Redacted.js index a8db17c30ff86dc7f53caa90c19e6583df5c5846..fec249b755545d45918cf3d7d15d6d1ca6c55b80 100644 --- a/.opencode/node_modules/effect/dist/Redacted.js +++ b/.opencode/node_modules/effect/dist/Redacted.js @@ -1,8 +1,12 @@ /** - * The Redacted module provides functionality for handling sensitive information - * securely within your application. By using the `Redacted` data type, you can - * ensure that sensitive values are not accidentally exposed in logs or error - * messages. + * Wraps sensitive values so normal output does not reveal them. + * + * A `Redacted` shows a redacted placeholder in string, JSON, and inspection + * output, while still storing the original value for trusted code that needs to + * recover it. This helps reduce accidental leaks in logs and diagnostics. This + * module includes constructors, runtime checks, value recovery, wiping of stored + * values, and comparison helpers that avoid exposing the wrapped value at the + * call site. * * @since 3.3.0 */ @@ -14,7 +18,19 @@ import * as redacted from "./internal/redacted.js"; import { hasProperty, isString } from "./Predicate.js"; const TypeId = "~effect/data/Redacted"; /** - * @example + * Returns `true` if a value is a `Redacted` wrapper. + * + * **When to use** + * + * Use to validate unknown input and narrow it to `Redacted`. + * + * **Details** + * + * When this function returns `true`, TypeScript narrows the value to + * `Redacted`. + * + * **Example** (Checking for redacted values) + * * ```ts * import { Redacted } from "effect" * @@ -25,23 +41,34 @@ const TypeId = "~effect/data/Redacted"; * console.log(Redacted.isRedacted(plainString)) // false * ``` * - * @since 3.3.0 * @category refinements + * @since 3.3.0 */ export const isRedacted = u => hasProperty(u, TypeId); /** - * This function creates a `Redacted` instance from a given value `A`, - * securely hiding its content. + * Creates a `Redacted` wrapper for a sensitive value. + * + * **When to use** + * + * Use to wrap a sensitive value so normal string, JSON, and inspection output + * is redacted. + * + * **Details** + * + * The wrapper redacts string, JSON, and inspection output to reduce accidental + * disclosure. The original value remains retrievable with `Redacted.value` + * until the wrapper is wiped or becomes unreachable. + * + * **Example** (Creating a redacted value) * - * @example * ```ts * import { Redacted } from "effect" * * const API_KEY = Redacted.make("1234567890") * ``` * - * @since 3.3.0 * @category constructors + * @since 3.3.0 */ export const make = (value, options) => { const self = Object.create(Proto); @@ -74,7 +101,12 @@ const Proto = { * Retrieves the original value from a `Redacted` instance. Use this function * with caution, as it exposes the sensitive data. * - * @example + * **When to use** + * + * Use when you need the underlying sensitive value at a trusted boundary. + * + * **Example** (Retrieving a redacted value) + * * ```ts * import { Redacted } from "effect" * import * as assert from "node:assert" @@ -84,16 +116,27 @@ const Proto = { * assert.equal(Redacted.value(API_KEY), "1234567890") * ``` * - * @since 3.3.0 * @category getters + * @since 3.3.0 */ export const value = redacted.value; /** - * Erases the underlying value of a `Redacted` instance, rendering it unusable. - * This function is intended to ensure that sensitive data does not remain in - * memory longer than necessary. + * Deletes the stored value for a `Redacted` wrapper, making future + * `Redacted.value` calls on that wrapper fail. + * + * **When to use** + * + * Use when a `Redacted` wrapper should no longer be able to reveal its stored + * value. + * + * **Gotchas** + * + * This unsafe operation does not zero memory and does not affect other + * references to the original value. It only removes the value from the + * internal redacted registry. + * + * **Example** (Wiping a redacted value) * - * @example * ```ts * import { Redacted } from "effect" * import * as assert from "node:assert" @@ -110,8 +153,8 @@ export const value = redacted.value; * ) * ``` * - * @since 3.3.0 * @category unsafe + * @since 4.0.0 */ export const wipeUnsafe = self => redacted.redactedRegistry.delete(self); /** @@ -119,7 +162,13 @@ export const wipeUnsafe = self => redacted.redactedRegistry.delete(self); * equivalence relation for the underlying values `A`. This function is useful * for comparing `Redacted` instances without exposing their contents. * - * @example + * **When to use** + * + * Use when you need to compare wrapped secrets through an approved equality + * rule without exposing the underlying values at each comparison site. + * + * **Example** (Comparing redacted values) + * * ```ts * import { Equivalence, Redacted } from "effect" * import * as assert from "node:assert" @@ -134,8 +183,8 @@ export const wipeUnsafe = self => redacted.redactedRegistry.delete(self); * assert.equal(equivalence(API_KEY1, API_KEY3), true) * ``` * - * @category equivalence - * @since 3.3.0 + * @category instances + * @since 4.0.0 */ export const makeEquivalence = isEquivalent => Equivalence.make((x, y) => isEquivalent(value(x), value(y))); //# sourceMappingURL=Redacted.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Redacted.js.map b/.opencode/node_modules/effect/dist/Redacted.js.map index f23a160ec6967cf733e0938177cdb7442bd1ef3b..2c66e779cbfd085897a1ddfbeec36f6b95641f78 100644 --- a/.opencode/node_modules/effect/dist/Redacted.js.map +++ b/.opencode/node_modules/effect/dist/Redacted.js.map @@ -1 +1 @@ -{"version":3,"file":"Redacted.js","names":["Equal","Equivalence","Hash","PipeInspectableProto","redacted","hasProperty","isString","TypeId","isRedacted","u","make","value","options","self","Object","create","Proto","label","redactedRegistry","set","_A","_","undefined","toJSON","toString","symbol","hash","get","that","equals","wipeUnsafe","delete","makeEquivalence","isEquivalent","x","y"],"sources":["../src/Redacted.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;AAQA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,OAAO,KAAKC,QAAQ,MAAM,wBAAwB;AAElD,SAASC,WAAW,EAAEC,QAAQ,QAAQ,gBAAgB;AAGtD,MAAMC,MAAM,GAAG,uBAAuB;AA0EtC;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,UAAU,GAAIC,CAAU,IAA6BJ,WAAW,CAACI,CAAC,EAAEF,MAAM,CAAC;AAExF;;;;;;;;;;;;;;AAcA,OAAO,MAAMG,IAAI,GAAGA,CAAIC,KAAQ,EAAE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,IAAI,CAAC;AAEnG;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMmB,eAAe,GAAOC,YAAwC,IACzEhC,WAAW,CAACS,IAAI,CAAC,CAACwB,CAAC,EAAEC,CAAC,KAAKF,YAAY,CAACtB,KAAK,CAACuB,CAAC,CAAC,EAAEvB,KAAK,CAACwB,CAAC,CAAC,CAAC,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Redacted.js","names":["Equal","Equivalence","Hash","PipeInspectableProto","redacted","hasProperty","isString","TypeId","isRedacted","u","make","value","options","self","Object","create","Proto","label","redactedRegistry","set","_A","_","undefined","toJSON","toString","symbol","hash","get","that","equals","wipeUnsafe","delete","makeEquivalence","isEquivalent","x","y"],"sources":["../src/Redacted.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;AAYA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,OAAO,KAAKC,QAAQ,MAAM,wBAAwB;AAElD,SAASC,WAAW,EAAEC,QAAQ,QAAQ,gBAAgB;AAGtD,MAAMC,MAAM,GAAG,uBAAuB;AA6GtC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,MAAMC,UAAU,GAAIC,CAAU,IAA6BJ,WAAW,CAACI,CAAC,EAAEF,MAAM,CAAC;AAExF;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMG,IAAI,GAAGA,CAAIC,KAAQ,EAAEC,OAEjC,KAAiB;EAChB,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACC,KAAK,CAAC;EACjC,IAAIJ,OAAO,EAAEK,KAAK,EAAE;IAClBJ,IAAI,CAACI,KAAK,GAAGL,OAAO,CAACK,KAAK;EAC5B;EACAb,QAAQ,CAACc,gBAAgB,CAACC,GAAG,CAACN,I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vB,KAAK,CAACwB,CAAC,CAAC,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Reducer.d.ts b/.opencode/node_modules/effect/dist/Reducer.d.ts index 4803e9d3102569ab5c7f7176bebe87bfa2335a09..cdf0c099687484409c49b4aa0055b06fd7a9774e 100644 --- a/.opencode/node_modules/effect/dist/Reducer.d.ts +++ b/.opencode/node_modules/effect/dist/Reducer.d.ts @@ -1,68 +1,9 @@ /** - * A module for reducing collections of values into a single result. - * - * A `Reducer` extends {@link Combiner.Combiner} by adding an - * `initialValue` (identity element) and a `combineAll` method that folds an - * entire collection. Think `Array.prototype.reduce`, but packaged as a - * reusable, composable value. - * - * ## Mental model - * - * - **Reducer** – a {@link Combiner.Combiner} plus an `initialValue` and a - * `combineAll` method. - * - **initialValue** – the neutral/identity element. Combining any value with - * `initialValue` should return the original value unchanged (e.g. `0` for - * addition, `""` for string concatenation). - * - **combineAll** – folds an `Iterable` starting from `initialValue`. - * When omitted from {@link make}, a default left-to-right fold is used. - * - **Purity** – all reducers produced by this module are pure; they never - * mutate their arguments. - * - **Composability** – reducers can be lifted into `Option`, `Struct`, - * `Tuple`, `Record`, and other container types via helpers in those modules. - * - **Subtype of Combiner** – every `Reducer` is also a valid - * `Combiner`, so you can pass a `Reducer` anywhere a `Combiner` is - * expected. - * - * ## Common tasks - * - * - Create a reducer from a combine function and initial value → {@link make} - * - Swap argument order → {@link flip} - * - Combine two values without an initial value → use {@link Combiner.Combiner} - * instead - * - * ## Gotchas - * - * - `combineAll` on an empty iterable returns `initialValue`, not an error. - * - The default `combineAll` folds left-to-right. If your `combine` is not - * associative, order matters. Pass a custom `combineAll` to {@link make} if - * you need different traversal or short-circuiting. - * - A `Reducer` is also a valid `Combiner` — but a `Combiner` is *not* a - * `Reducer` (it lacks `initialValue`). - * - * ## Quickstart - * - * **Example** (summing a list of numbers) - * - * ```ts - * import { Reducer } from "effect" - * - * const Sum = Reducer.make((a, b) => a + b, 0) - * - * console.log(Sum.combine(3, 4)) - * // Output: 7 - * - * console.log(Sum.combineAll([1, 2, 3, 4])) - * // Output: 10 - * - * console.log(Sum.combineAll([])) - * // Output: 0 - * ``` - * - * ## See also - * - * - {@link make} – the primary constructor - * - {@link Reducer} – the core interface - * - {@link Combiner.Combiner} – the parent interface (no `initialValue`) + * Reusable strategies for reducing many values into one value. A `Reducer` + * extends `Combiner.Combiner` with an `initialValue` for empty collections and + * a `combineAll` method for folding an entire iterable. This module provides a + * constructor for reducers and a helper for reversing the order in which values + * are combined. * * @since 4.0.0 */ @@ -71,23 +12,28 @@ import type * as Combiner from "./Combiner.ts"; * Represents a strategy for reducing a collection of values of type `A` into * a single result. * - * Extends {@link Combiner.Combiner} with: - * - `initialValue` – the identity/neutral element for `combine`. - * - `combineAll` – folds an entire `Iterable` from `initialValue`. + * **When to use** * - * When to use: - * - You need to fold/reduce a collection into a single value. + * Use when you need to fold/reduce a collection into a single value. * - You want a reusable reducing strategy that can be passed to library * functions like `Struct.makeReducer`, `Option.makeReducer`, or * `Record.makeReducerUnion`. * - You need both the combining logic *and* a known starting value. * + * **Details** + * + * Extends {@link Combiner.Combiner} with: + * + * - `initialValue` – the identity/neutral element for `combine`. + * - `combineAll` – folds an entire `Iterable` from `initialValue`. + * * Many modules ship pre-built reducers: + * * - `Number.ReducerSum`, `Number.ReducerMultiply` * - `String.ReducerConcat` * - `Boolean.ReducerAnd`, `Boolean.ReducerOr` * - * **Example** (string concatenation reducer) + * **Example** (String concatenation reducer) * * ```ts * import { Reducer } from "effect" @@ -101,30 +47,43 @@ import type * as Combiner from "./Combiner.ts"; * @see {@link make} – create a `Reducer` from a function and initial value * @see {@link Combiner.Combiner} – parent interface without `initialValue` * - * @category model + * @category models * @since 4.0.0 */ export interface Reducer extends Combiner.Combiner { - /** Neutral starting value (combining with this changes nothing). */ + /** + * Neutral starting value (combining with this changes nothing). + * + * **When to use** + * + * Use to seed a reduction and represent the result of reducing an empty collection. + */ readonly initialValue: A; - /** Combines all values in the collection, starting from `initialValue`. */ + /** + * Combines all values in the collection, starting from `initialValue`. + * + * **When to use** + * + * Use to reduce an iterable with this reducer's initial value and combining operation. + */ readonly combineAll: (collection: Iterable) => A; } /** * Creates a `Reducer` from a `combine` function and an `initialValue`. * - * When to use: - * - You have a custom reducing operation not covered by a pre-built reducer. + * **When to use** + * + * Use when you have a custom reducing operation not covered by a pre-built reducer. * - You want to provide an optimized `combineAll` (e.g. short-circuiting on * a known absorbing element like `0` for multiplication). * - * Behavior: + * **Details** + * * - If `combineAll` is omitted, a default left-to-right fold starting from * `initialValue` is used. * - If `combineAll` is provided, it completely replaces the default fold. - * - Pure – the returned reducer does not mutate its arguments. * - * **Example** (multiplication with short-circuit) + * **Example** (Multiplication with short-circuit) * * ```ts * import { Reducer } from "effect" @@ -152,26 +111,27 @@ export interface Reducer extends Combiner.Combiner { * @see {@link Reducer} – the interface this creates * @see {@link flip} – reverse the argument order * + * @category constructors * @since 4.0.0 */ export declare function make(combine: (self: A, that: A) => A, initialValue: A, combineAll?: (collection: Iterable) => A): Reducer; /** * Reverses the argument order of a reducer's `combine` method. * - * When to use: - * - You need the "right" value to act as the accumulator side. - * - You want to reverse the natural direction of a non-commutative reducer - * (e.g. string concatenation becomes prepend). + * **When to use** + * + * Use when you want the right-hand value to act as the accumulator, or need to + * reverse a non-commutative reducer such as string concatenation. + * + * **Details** * - * Behavior: * - Returns a new `Reducer` where `combine(self, that)` calls the original * reducer as `combine(that, self)`. * - The `initialValue` is preserved from the original reducer. * - The `combineAll` is re-derived from the flipped `combine` (using the * default left-to-right fold), not carried over from the original. - * - Does not mutate the input reducer. * - * **Example** (reversing string concatenation) + * **Example** (Reversing string concatenation) * * ```ts * import { Reducer, String } from "effect" @@ -188,6 +148,7 @@ export declare function make(combine: (self: A, that: A) => A, initialValue: * @see {@link make} * @see {@link Combiner.flip} – the same operation on a plain `Combiner` * + * @category combinators * @since 4.0.0 */ export declare function flip(reducer: Reducer): Reducer; diff --git a/.opencode/node_modules/effect/dist/Reducer.d.ts.map b/.opencode/node_modules/effect/dist/Reducer.d.ts.map index d9fcde5ffaaffb40dbe1e8303f06b05f57f65811..3d386610edb41535a8e828926d5abd775d1efd1e 100644 --- a/.opencode/node_modules/effect/dist/Reducer.d.ts.map +++ b/.opencode/node_modules/effect/dist/Reducer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Reducer.d.ts","sourceRoot":"","sources":["../src/Reducer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAEH,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,WAAW,OAAO,CAAC,CAAC,CAAE,SAAQ,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtD,oEAAoE;IACpE,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAA;IAExB,2EAA2E;IAC3E,QAAQ,CAAC,UAAU,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;CACpD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,IAAI,CAAC,CAAC,EACpB,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,EAChC,YAAY,EAAE,CAAC,EACf,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAC1C,OAAO,CAAC,CAAC,CAAC,CAaZ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAEvD"} \ No newline at end of file +{"version":3,"file":"Reducer.d.ts","sourceRoot":"","sources":["../src/Reducer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,WAAW,OAAO,CAAC,CAAC,CAAE,SAAQ,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtD;;;;;;OAMG;IACH,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAA;IAExB;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;CACpD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,IAAI,CAAC,CAAC,EACpB,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,EAChC,YAAY,EAAE,CAAC,EACf,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAC1C,OAAO,CAAC,CAAC,CAAC,CAaZ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAEvD"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Reducer.js b/.opencode/node_modules/effect/dist/Reducer.js index 7caee3b678fd55ddace05e21056e6bd43cede195..5286ecbaf6377aac1b128e51cca4d31a628ad6d5 100644 --- a/.opencode/node_modules/effect/dist/Reducer.js +++ b/.opencode/node_modules/effect/dist/Reducer.js @@ -1,86 +1,28 @@ /** - * A module for reducing collections of values into a single result. - * - * A `Reducer` extends {@link Combiner.Combiner} by adding an - * `initialValue` (identity element) and a `combineAll` method that folds an - * entire collection. Think `Array.prototype.reduce`, but packaged as a - * reusable, composable value. - * - * ## Mental model - * - * - **Reducer** – a {@link Combiner.Combiner} plus an `initialValue` and a - * `combineAll` method. - * - **initialValue** – the neutral/identity element. Combining any value with - * `initialValue` should return the original value unchanged (e.g. `0` for - * addition, `""` for string concatenation). - * - **combineAll** – folds an `Iterable` starting from `initialValue`. - * When omitted from {@link make}, a default left-to-right fold is used. - * - **Purity** – all reducers produced by this module are pure; they never - * mutate their arguments. - * - **Composability** – reducers can be lifted into `Option`, `Struct`, - * `Tuple`, `Record`, and other container types via helpers in those modules. - * - **Subtype of Combiner** – every `Reducer` is also a valid - * `Combiner`, so you can pass a `Reducer` anywhere a `Combiner` is - * expected. - * - * ## Common tasks - * - * - Create a reducer from a combine function and initial value → {@link make} - * - Swap argument order → {@link flip} - * - Combine two values without an initial value → use {@link Combiner.Combiner} - * instead - * - * ## Gotchas - * - * - `combineAll` on an empty iterable returns `initialValue`, not an error. - * - The default `combineAll` folds left-to-right. If your `combine` is not - * associative, order matters. Pass a custom `combineAll` to {@link make} if - * you need different traversal or short-circuiting. - * - A `Reducer` is also a valid `Combiner` — but a `Combiner` is *not* a - * `Reducer` (it lacks `initialValue`). - * - * ## Quickstart - * - * **Example** (summing a list of numbers) - * - * ```ts - * import { Reducer } from "effect" - * - * const Sum = Reducer.make((a, b) => a + b, 0) - * - * console.log(Sum.combine(3, 4)) - * // Output: 7 - * - * console.log(Sum.combineAll([1, 2, 3, 4])) - * // Output: 10 - * - * console.log(Sum.combineAll([])) - * // Output: 0 - * ``` - * - * ## See also - * - * - {@link make} – the primary constructor - * - {@link Reducer} – the core interface - * - {@link Combiner.Combiner} – the parent interface (no `initialValue`) + * Reusable strategies for reducing many values into one value. A `Reducer` + * extends `Combiner.Combiner` with an `initialValue` for empty collections and + * a `combineAll` method for folding an entire iterable. This module provides a + * constructor for reducers and a helper for reversing the order in which values + * are combined. * * @since 4.0.0 */ /** * Creates a `Reducer` from a `combine` function and an `initialValue`. * - * When to use: - * - You have a custom reducing operation not covered by a pre-built reducer. + * **When to use** + * + * Use when you have a custom reducing operation not covered by a pre-built reducer. * - You want to provide an optimized `combineAll` (e.g. short-circuiting on * a known absorbing element like `0` for multiplication). * - * Behavior: + * **Details** + * * - If `combineAll` is omitted, a default left-to-right fold starting from * `initialValue` is used. * - If `combineAll` is provided, it completely replaces the default fold. - * - Pure – the returned reducer does not mutate its arguments. * - * **Example** (multiplication with short-circuit) + * **Example** (Multiplication with short-circuit) * * ```ts * import { Reducer } from "effect" @@ -108,6 +50,7 @@ * @see {@link Reducer} – the interface this creates * @see {@link flip} – reverse the argument order * + * @category constructors * @since 4.0.0 */ export function make(combine, initialValue, combineAll) { @@ -126,20 +69,20 @@ export function make(combine, initialValue, combineAll) { /** * Reverses the argument order of a reducer's `combine` method. * - * When to use: - * - You need the "right" value to act as the accumulator side. - * - You want to reverse the natural direction of a non-commutative reducer - * (e.g. string concatenation becomes prepend). + * **When to use** + * + * Use when you want the right-hand value to act as the accumulator, or need to + * reverse a non-commutative reducer such as string concatenation. + * + * **Details** * - * Behavior: * - Returns a new `Reducer` where `combine(self, that)` calls the original * reducer as `combine(that, self)`. * - The `initialValue` is preserved from the original reducer. * - The `combineAll` is re-derived from the flipped `combine` (using the * default left-to-right fold), not carried over from the original. - * - Does not mutate the input reducer. * - * **Example** (reversing string concatenation) + * **Example** (Reversing string concatenation) * * ```ts * import { Reducer, String } from "effect" @@ -156,6 +99,7 @@ export function make(combine, initialValue, combineAll) { * @see {@link make} * @see {@link Combiner.flip} – the same operation on a plain `Combiner` * + * @category combinators * @since 4.0.0 */ export function flip(reducer) { diff --git a/.opencode/node_modules/effect/dist/Reducer.js.map b/.opencode/node_modules/effect/dist/Reducer.js.map index b6f3e82b9504b17ab6b85150b903d35d520dec4f..7d633e3ef3ca89f85e62b2787a3bda7428f71299 100644 --- a/.opencode/node_modules/effect/dist/Reducer.js.map +++ b/.opencode/node_modules/effect/dist/Reducer.js.map @@ -1 +1 @@ -{"version":3,"file":"Reducer.js","names":["make","combine","initialValue","combineAll","collection","out","value","flip","reducer","self","that"],"sources":["../src/Reducer.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoHA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,OAAM,SAAUA,IAAIA,CAClBC,OAAgC,EAChCC,YAAe,EACfC,UAA2C;EAE3C,OAAO;IACLF,OAAO;IACPC,YAAY;IACZC,UAAU,EAAEA,UAAU,KAClBC,UAAU,IAAI;MACd,IAAIC,GAAG,GAAGH,YAAY;MACtB,KAAK,MAAMI,KAAK,IAAIF,UAAU,EAAE;QAC9BC,GAAG,GAAGJ,OAAO,CAACI,GAAG,EAAEC,KAAK,CAAC;MAC3B;MACA,OAAOD,GAAG;IACZ,CAAC;GACJ;AACH;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAM,SAAUE,IAAIA,CAAIC,OAAmB;EACzC,OAAOR,IAAI,CAAC,CAACS,IAAI,EAAEC,IAAI,KAAKF,OAAO,CAACP,OAAO,CAACS,IAAI,EAAED,IAAI,CAAC,EAAED,OAAO,CAACN,YAAY,CAAC;AAChF","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Reducer.js","names":["make","combine","initialValue","combineAll","collection","out","value","flip","reducer","self","that"],"sources":["../src/Reducer.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;AA0EA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,OAAM,SAAUA,IAAIA,CAClBC,OAAgC,EAChCC,YAAe,EACfC,UAA2C;EAE3C,OAAO;IACLF,OAAO;IACPC,YAAY;IACZC,UAAU,EAAEA,UAAU,KAClBC,UAAU,IAAI;MACd,IAAIC,GAAG,GAAGH,YAAY;MACtB,KAAK,MAAMI,KAAK,IAAIF,UAAU,EAAE;QAC9BC,GAAG,GAAGJ,OAAO,CAACI,GAAG,EAAEC,KAAK,CAAC;MAC3B;MACA,OAAOD,GAAG;IACZ,CAAC;GACJ;AACH;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,OAAM,SAAUE,IAAIA,CAAIC,OAAmB;EACzC,OAAOR,IAAI,CAAC,CAACS,IAAI,EAAEC,IAAI,KAAKF,OAAO,CAACP,OAAO,CAACS,IAAI,EAAED,IAAI,CAAC,EAAED,OAAO,CAACN,YAAY,CAAC;AAChF","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Ref.d.ts b/.opencode/node_modules/effect/dist/Ref.d.ts index 90666741e7788d4581d470243c9a7236c073840c..775bd65256c468b3f13e67634c107e1e6f5f9e52 100644 --- a/.opencode/node_modules/effect/dist/Ref.d.ts +++ b/.opencode/node_modules/effect/dist/Ref.d.ts @@ -1,30 +1,12 @@ /** - * This module provides utilities for working with mutable references in a functional context. + * Stores fiber-safe mutable state inside Effect programs. * - * A Ref is a mutable reference that can be read, written, and atomically modified. Unlike plain - * mutable variables, Refs are thread-safe and work seamlessly with Effect's concurrency model. - * They provide atomic operations for safe state management in concurrent programs. - * - * @example - * ```ts - * import { Effect, Ref } from "effect" - * - * const program = Effect.gen(function*() { - * // Create a ref with initial value - * const counter = yield* Ref.make(0) - * - * // Atomic operations - * yield* Ref.update(counter, (n) => n + 1) - * yield* Ref.update(counter, (n) => n * 2) - * - * const value = yield* Ref.get(counter) - * console.log(value) // 2 - * - * // Atomic modify with return value - * const previous = yield* Ref.getAndSet(counter, 100) - * console.log(previous) // 2 - * }) - * ``` + * A `Ref` holds one value and exposes reads, writes, and atomic + * transformations as effects, so state changes compose with Effect's + * concurrency model. This module includes constructors, safe and unsafe reads, + * set and get-and-set helpers, update and modify helpers, and conditional + * update variants that leave the value unchanged when an `Option.none` result + * is returned. * * @since 2.0.0 */ @@ -37,11 +19,18 @@ declare const TypeId = "~effect/Ref"; /** * A mutable reference that provides atomic read, write, and update operations. * - * Ref is a thread-safe mutable reference type that allows for atomic operations - * on shared state. It supports both simple read/write operations and complex - * atomic transformations. + * **When to use** + * + * Use to keep shared mutable state that is read and updated inside Effect + * programs. + * + * **Details** + * + * A `Ref` is a thread-safe mutable reference type for shared state. It supports + * simple read and write operations as well as atomic transformations. + * + * **Example** (Reading and updating a ref) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -62,8 +51,12 @@ declare const TypeId = "~effect/Ref"; * }) * ``` * - * @since 2.0.0 + * @see {@link make} for creating a `Ref` + * @see {@link get} for reading the current value + * @see {@link set} for replacing the current value + * * @category models + * @since 2.0.0 */ export interface Ref extends Ref.Variance, Pipeable { readonly ref: MutableRef.MutableRef; @@ -71,14 +64,22 @@ export interface Ref extends Ref.Variance, Pipeable { /** * The Ref namespace containing type definitions and utilities. * + * **When to use** + * + * Use when referring to type members nested under the `Ref` namespace. + * * @since 2.0.0 - * @category models */ export declare namespace Ref { /** * Variance interface for Ref types, defining the type parameter constraints. * - * @example + * **When to use** + * + * Use when working with the type-level variance marker carried by `Ref`. + * + * **Example** (Using invariant refs) + * * ```ts * import { Effect, Ref } from "effect" * @@ -93,8 +94,8 @@ export declare namespace Ref { * }) * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ interface Variance { readonly [TypeId]: { @@ -105,10 +106,17 @@ export declare namespace Ref { /** * Creates a new Ref with the specified initial value (unsafe version). * - * This function creates a Ref synchronously without wrapping in Effect. - * Use this only when you're sure about the safety of immediate creation. + * **When to use** + * + * Use when you need immediate synchronous construction and can guarantee + * that creating the `Ref` outside of `Effect` is safe. + * + * **Gotchas** + * + * Prefer `Ref.make` for Effect-wrapped creation in Effect programs. + * + * **Example** (Creating a ref unsafely) * - * @example * ```ts * import { Ref } from "effect" * @@ -123,17 +131,19 @@ export declare namespace Ref { * // Prefer Ref.make for Effect-wrapped creation * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export declare const makeUnsafe: (value: A) => Ref; /** * Creates a new Ref with the specified initial value. * - * @param value - The initial value for the Ref - * @returns An Effect that creates a new Ref + * **When to use** + * + * Use to create a `Ref` for shared mutable state inside an Effect program. + * + * **Example** (Creating a ref) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -144,14 +154,21 @@ export declare const makeUnsafe: (value: A) => Ref; * }) * ``` * - * @since 2.0.0 + * @see {@link makeUnsafe} for synchronous construction outside Effect code + * * @category constructors + * @since 2.0.0 */ export declare const make: (value: A) => Effect.Effect>; /** * Gets the current value of the Ref. * - * @example + * **When to use** + * + * Use to read the current `Ref` value without changing it. + * + * **Example** (Getting the current value) + * * ```ts * import { Effect, Ref } from "effect" * @@ -162,14 +179,21 @@ export declare const make: (value: A) => Effect.Effect>; * }) * ``` * - * @since 2.0.0 + * @see {@link set} for replacing the current value + * * @category getters + * @since 2.0.0 */ export declare const get: (self: Ref) => Effect.Effect; /** * Sets the value of the Ref to the specified value. * - * @example + * **When to use** + * + * Use to replace the current `Ref` value with a known value. + * + * **Example** (Setting a value) + * * ```ts * import { Effect, Ref } from "effect" * @@ -189,16 +213,22 @@ export declare const get: (self: Ref) => Effect.Effect; * }) * ``` * - * @since 2.0.0 + * @see {@link getAndSet} for setting while returning the previous value + * @see {@link setAndGet} for setting while returning the new value + * * @category setters + * @since 2.0.0 */ export declare const set: ((value: A) => (self: Ref) => Effect.Effect) & ((self: Ref, value: A) => Effect.Effect); /** - * Atomically gets the current value of the Ref and sets it to the specified value. + * Gets the current value of the Ref, sets it to the specified value, and returns the previous value atomically. + * + * **When to use** * - * Returns the value that was in the Ref before the update. + * Use to replace a plain `Ref` value while returning the previous value. + * + * **Example** (Replacing a value atomically) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -214,16 +244,22 @@ export declare const set: ((value: A) => (self: Ref) => Effect.Effect(value: A) => (self: Ref) => Effect.Effect) & ((self: Ref, value: A) => Effect.Effect); /** - * Atomically gets the current value of the Ref and updates it with the given function. + * Gets the current value of the Ref, updates it with the given function, and returns the previous value atomically. * - * Returns the value that was in the Ref before the update. + * **When to use** + * + * Use to derive a new `Ref` value while returning the previous value. + * + * **Example** (Updating and returning the previous value) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -239,21 +275,30 @@ export declare const getAndSet: ((value: A) => (self: Ref) => Effect.Effec * }) * ``` * + * @see {@link update} for updating without returning the previous value + * @see {@link updateAndGet} for returning the new value instead + * + * @category mutations * @since 2.0.0 - * @category utils */ export declare const getAndUpdate: ((f: (a: A) => A) => (self: Ref) => Effect.Effect) & ((self: Ref, f: (a: A) => A) => Effect.Effect); /** - * Atomically gets the current value of the Ref and updates it with the given partial function. + * Gets the current value of the Ref and updates it atomically with the given partial function. + * + * **When to use** * - * If the partial function returns `Option.some`, the Ref is updated with the new value. - * If it returns `Option.none`, the Ref is left unchanged. - * Always returns the value that was in the Ref before the attempted update. + * Use to return the previous `Ref` value while applying a conditional update. + * + * **Details** + * + * If the partial function returns `Option.some`, the Ref is updated with the + * new value. If it returns `Option.none`, the Ref is left unchanged. The effect + * always returns the value that was in the Ref before the attempted update. + * + * **Example** (Conditionally updating and returning the previous value) * - * @example * ```ts - * import { Effect, Ref } from "effect" - * import * as Option from "effect/Option" + * import { Effect, Option, Ref } from "effect" * * const program = Effect.gen(function*() { * const counter = yield* Ref.make(5) @@ -280,16 +325,23 @@ export declare const getAndUpdate: ((f: (a: A) => A) => (self: Ref) => Eff * }) * ``` * + * @see {@link getAndUpdate} for always applying an update + * @see {@link updateSome} for conditional updates without returning the previous value + * + * @category mutations * @since 2.0.0 - * @category utils */ export declare const getAndUpdateSome: ((pf: (a: A) => Option.Option) => (self: Ref) => Effect.Effect) & ((self: Ref, pf: (a: A) => Option.Option) => Effect.Effect); /** - * Atomically sets the value of the Ref to the specified value and returns the new value. + * Sets the value of the Ref atomically to the specified value and returns the new value. + * + * **When to use** * - * This is useful when you want to set a value and immediately get it back in one atomic operation. + * Use when you want to set a `Ref` value and immediately get it back in one + * atomic operation. + * + * **Example** (Setting and returning the new value) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -314,17 +366,26 @@ export declare const getAndUpdateSome: ((pf: (a: A) => Option.Option) => ( * }) * ``` * + * @category mutations * @since 2.0.0 - * @category utils */ export declare const setAndGet: ((value: A) => (self: Ref) => Effect.Effect) & ((self: Ref, value: A) => Effect.Effect); /** - * Atomically modifies the value of the Ref using the given function. + * Modifies the value of the Ref atomically using the given function. + * + * **When to use** * - * The function receives the current value and returns a tuple of [result, newValue]. - * The Ref is updated with the newValue and the result is returned. + * Use to compute both a separate return value and the next stored `Ref` value + * in one atomic update. + * + * **Details** + * + * The function receives the current value and returns a tuple of + * `[result, newValue]`. The Ref is updated with `newValue`, and `result` is + * returned by the effect. + * + * **Example** (Modifying a value atomically) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -356,21 +417,31 @@ export declare const setAndGet: ((value: A) => (self: Ref) => Effect.Effec * }) * ``` * - * @since 2.0.0 + * @see {@link updateAndGet} for returning the new stored value + * @see {@link modifySome} for optionally updating while returning a separate result + * * @category setters + * @since 2.0.0 */ export declare const modify: ((f: (a: A) => readonly [B, A]) => (self: Ref) => Effect.Effect) & ((self: Ref, f: (a: A) => readonly [B, A]) => Effect.Effect); /** - * Atomically modifies the value of the Ref using the given partial function. + * Computes a result atomically and optionally updates the value of the `Ref`. + * + * **When to use** + * + * Use to compute a return value while optionally updating a plain `Ref`. * - * The function receives the current value and returns an Option of [result, newValue]. - * If the function returns `Option.some([result, newValue])`, the Ref is updated with newValue and result is returned. - * If it returns `Option.none()`, the Ref is left unchanged and the fallback value is returned. + * **Details** + * + * The callback receives the current value and returns `[result, nextValue]`, + * where `nextValue` is an `Option`. If `nextValue` is `Option.some(value)`, + * the `Ref` is updated to `value`; if it is `Option.none()`, the `Ref` is left + * unchanged. The returned effect always succeeds with `result`. + * + * **Example** (Conditionally modifying a value) * - * @example * ```ts - * import { Effect, Ref } from "effect" - * import * as Option from "effect/Option" + * import { Effect, Option, Ref } from "effect" * * const program = Effect.gen(function*() { * const counter = yield* Ref.make(5) @@ -405,21 +476,31 @@ export declare const modify: ((f: (a: A) => readonly [B, A]) => (self: Ref * }) * ``` * - * @since 2.0.0 + * @see {@link modify} for always storing a new value + * @see {@link updateSome} for optional updates without a separate return value + * * @category setters + * @since 2.0.0 */ export declare const modifySome: { /** - * Atomically modifies the value of the Ref using the given partial function. + * Computes a result atomically and optionally updates the value of the `Ref`. + * + * **When to use** + * + * Use to compute a return value while optionally updating a plain `Ref`. * - * The function receives the current value and returns an Option of [result, newValue]. - * If the function returns `Option.some([result, newValue])`, the Ref is updated with newValue and result is returned. - * If it returns `Option.none()`, the Ref is left unchanged and the fallback value is returned. + * **Details** + * + * The callback receives the current value and returns `[result, nextValue]`, + * where `nextValue` is an `Option`. If `nextValue` is `Option.some(value)`, + * the `Ref` is updated to `value`; if it is `Option.none()`, the `Ref` is left + * unchanged. The returned effect always succeeds with `result`. + * + * **Example** (Conditionally modifying a value) * - * @example * ```ts - * import { Effect, Ref } from "effect" - * import * as Option from "effect/Option" + * import { Effect, Option, Ref } from "effect" * * const program = Effect.gen(function*() { * const counter = yield* Ref.make(5) @@ -454,21 +535,31 @@ export declare const modifySome: { * }) * ``` * - * @since 2.0.0 + * @see {@link modify} for always storing a new value + * @see {@link updateSome} for optional updates without a separate return value + * * @category setters + * @since 2.0.0 */ (pf: (a: A) => readonly [B, Option.Option]): (self: Ref) => Effect.Effect; /** - * Atomically modifies the value of the Ref using the given partial function. + * Computes a result atomically and optionally updates the value of the `Ref`. + * + * **When to use** + * + * Use to compute a return value while optionally updating a plain `Ref`. * - * The function receives the current value and returns an Option of [result, newValue]. - * If the function returns `Option.some([result, newValue])`, the Ref is updated with newValue and result is returned. - * If it returns `Option.none()`, the Ref is left unchanged and the fallback value is returned. + * **Details** + * + * The callback receives the current value and returns `[result, nextValue]`, + * where `nextValue` is an `Option`. If `nextValue` is `Option.some(value)`, + * the `Ref` is updated to `value`; if it is `Option.none()`, the `Ref` is left + * unchanged. The returned effect always succeeds with `result`. + * + * **Example** (Conditionally modifying a value) * - * @example * ```ts - * import { Effect, Ref } from "effect" - * import * as Option from "effect/Option" + * import { Effect, Option, Ref } from "effect" * * const program = Effect.gen(function*() { * const counter = yield* Ref.make(5) @@ -503,15 +594,23 @@ export declare const modifySome: { * }) * ``` * - * @since 2.0.0 + * @see {@link modify} for always storing a new value + * @see {@link updateSome} for optional updates without a separate return value + * * @category setters + * @since 2.0.0 */ (self: Ref, pf: (a: A) => readonly [B, Option.Option]): Effect.Effect; }; /** - * Atomically updates the value of the Ref using the given function. + * Updates the value of the Ref atomically using the given function. + * + * **When to use** + * + * Use to apply a `Ref` state transition without returning a value. + * + * **Example** (Updating a value) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -534,14 +633,22 @@ export declare const modifySome: { * }) * ``` * - * @since 2.0.0 + * @see {@link updateAndGet} for returning the new value + * @see {@link getAndUpdate} for returning the previous value + * * @category setters + * @since 2.0.0 */ export declare const update: ((f: (a: A) => A) => (self: Ref) => Effect.Effect) & ((self: Ref, f: (a: A) => A) => Effect.Effect); /** - * Atomically updates the value of the Ref using the given function and returns the new value. + * Updates the value of the Ref atomically using the given function and returns the new value. + * + * **When to use** + * + * Use to apply a `Ref` state transition and return the new stored value. + * + * **Example** (Updating and returning the new value) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -558,20 +665,29 @@ export declare const update: ((f: (a: A) => A) => (self: Ref) => Effect.Ef * }) * ``` * + * @see {@link update} for updating without returning the new value + * @see {@link getAndUpdate} for returning the previous value instead + * + * @category mutations * @since 2.0.0 - * @category utils */ export declare const updateAndGet: ((f: (a: A) => A) => (self: Ref) => Effect.Effect) & ((self: Ref, f: (a: A) => A) => Effect.Effect); /** - * Atomically updates the value of the Ref using the given partial function. + * Updates the value of the Ref atomically using the given partial function. + * + * **When to use** + * + * Use to apply a conditional `Ref` update without returning a value. + * + * **Details** + * + * If the partial function returns `Option.some`, the Ref is updated with the + * new value. If it returns `Option.none`, the Ref is left unchanged. * - * If the partial function returns `Option.some`, the Ref is updated with the new value. - * If it returns `Option.none`, the Ref is left unchanged. + * **Example** (Conditionally updating a value) * - * @example * ```ts - * import { Effect, Ref } from "effect" - * import * as Option from "effect/Option" + * import { Effect, Option, Ref } from "effect" * * const program = Effect.gen(function*() { * const counter = yield* Ref.make(5) @@ -597,21 +713,31 @@ export declare const updateAndGet: ((f: (a: A) => A) => (self: Ref) => Eff * }) * ``` * - * @since 2.0.0 + * @see {@link update} for always applying an update + * @see {@link updateSomeAndGet} for returning the resulting current value + * * @category setters + * @since 2.0.0 */ export declare const updateSome: ((f: (a: A) => Option.Option) => (self: Ref) => Effect.Effect) & ((self: Ref, f: (a: A) => Option.Option) => Effect.Effect); /** - * Atomically updates the value of the Ref using the given partial function and returns the current value. + * Updates the value of the Ref atomically using the given partial function and returns the current value. + * + * **When to use** + * + * Use to apply a conditional `Ref` update and return the resulting current + * value. + * + * **Details** + * + * If the partial function returns `Option.some`, the Ref is updated with the + * new value. If it returns `Option.none`, the Ref is left unchanged. The effect + * returns the current value of the Ref after the potential update. * - * If the partial function returns `Option.some`, the Ref is updated with the new value. - * If it returns `Option.none`, the Ref is left unchanged. - * Returns the current value of the Ref after the potential update. + * **Example** (Conditionally updating and returning the current value) * - * @example * ```ts - * import { Effect, Ref } from "effect" - * import * as Option from "effect/Option" + * import { Effect, Option, Ref } from "effect" * * const program = Effect.gen(function*() { * const counter = yield* Ref.make(10) @@ -632,17 +758,27 @@ export declare const updateSome: ((f: (a: A) => Option.Option) => (self: R * }) * ``` * + * @see {@link updateSome} for conditional updates without returning a value + * @see {@link updateAndGet} for always updating and returning the new value + * + * @category mutations * @since 2.0.0 - * @category utils */ export declare const updateSomeAndGet: ((pf: (a: A) => Option.Option) => (self: Ref) => Effect.Effect) & ((self: Ref, pf: (a: A) => Option.Option) => Effect.Effect); /** * Gets the current value of the Ref synchronously (unsafe version). * - * This function reads the current value without wrapping in Effect. - * Use this only when you're sure about the safety of immediate access. + * **When to use** + * + * Use when you need immediate synchronous access and can guarantee that + * reading the `Ref` outside of `Effect` is safe. + * + * **Gotchas** + * + * Prefer `Ref.get` for Effect-wrapped access in Effect programs. + * + * **Example** (Reading a ref unsafely) * - * @example * ```ts * import { Ref } from "effect" * @@ -657,8 +793,8 @@ export declare const updateSomeAndGet: ((pf: (a: A) => Option.Option) => ( * // Prefer Ref.get for Effect-wrapped access * ``` * - * @since 2.0.0 * @category getters + * @since 4.0.0 */ export declare const getUnsafe: (self: Ref) => A; export {}; diff --git a/.opencode/node_modules/effect/dist/Ref.d.ts.map b/.opencode/node_modules/effect/dist/Ref.d.ts.map index 891f122f11ffb905e693f77ac848617d2d58e3a5..890604308c925890ec574dabe8e10663a8631829 100644 --- a/.opencode/node_modules/effect/dist/Ref.d.ts.map +++ b/.opencode/node_modules/effect/dist/Ref.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Ref.d.ts","sourceRoot":"","sources":["../src/Ref.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAGrC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C,QAAA,MAAM,MAAM,gBAAgB,CAAA;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAE,SAAQ,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ;IAC9D,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,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M,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAQlE,CAAA;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,KAAG,CAAqB,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Ref.js b/.opencode/node_modules/effect/dist/Ref.js index 941d2c523a43d5ffed23c69352e51fa754035900..7d2dd2f82ff55719d125f7c305b8410b56658555 100644 --- a/.opencode/node_modules/effect/dist/Ref.js +++ b/.opencode/node_modules/effect/dist/Ref.js @@ -1,30 +1,12 @@ /** - * This module provides utilities for working with mutable references in a functional context. + * Stores fiber-safe mutable state inside Effect programs. * - * A Ref is a mutable reference that can be read, written, and atomically modified. Unlike plain - * mutable variables, Refs are thread-safe and work seamlessly with Effect's concurrency model. - * They provide atomic operations for safe state management in concurrent programs. - * - * @example - * ```ts - * import { Effect, Ref } from "effect" - * - * const program = Effect.gen(function*() { - * // Create a ref with initial value - * const counter = yield* Ref.make(0) - * - * // Atomic operations - * yield* Ref.update(counter, (n) => n + 1) - * yield* Ref.update(counter, (n) => n * 2) - * - * const value = yield* Ref.get(counter) - * console.log(value) // 2 - * - * // Atomic modify with return value - * const previous = yield* Ref.getAndSet(counter, 100) - * console.log(previous) // 2 - * }) - * ``` + * A `Ref` holds one value and exposes reads, writes, and atomic + * transformations as effects, so state changes compose with Effect's + * concurrency model. This module includes constructors, safe and unsafe reads, + * set and get-and-set helpers, update and modify helpers, and conditional + * update variants that leave the value unchanged when an `Option.none` result + * is returned. * * @since 2.0.0 */ @@ -48,10 +30,17 @@ const RefProto = { /** * Creates a new Ref with the specified initial value (unsafe version). * - * This function creates a Ref synchronously without wrapping in Effect. - * Use this only when you're sure about the safety of immediate creation. + * **When to use** + * + * Use when you need immediate synchronous construction and can guarantee + * that creating the `Ref` outside of `Effect` is safe. + * + * **Gotchas** + * + * Prefer `Ref.make` for Effect-wrapped creation in Effect programs. + * + * **Example** (Creating a ref unsafely) * - * @example * ```ts * import { Ref } from "effect" * @@ -66,8 +55,8 @@ const RefProto = { * // Prefer Ref.make for Effect-wrapped creation * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export const makeUnsafe = value => { const self = Object.create(RefProto); @@ -77,10 +66,12 @@ export const makeUnsafe = value => { /** * Creates a new Ref with the specified initial value. * - * @param value - The initial value for the Ref - * @returns An Effect that creates a new Ref + * **When to use** + * + * Use to create a `Ref` for shared mutable state inside an Effect program. + * + * **Example** (Creating a ref) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -91,14 +82,21 @@ export const makeUnsafe = value => { * }) * ``` * - * @since 2.0.0 + * @see {@link makeUnsafe} for synchronous construction outside Effect code + * * @category constructors + * @since 2.0.0 */ export const make = value => Effect.sync(() => makeUnsafe(value)); /** * Gets the current value of the Ref. * - * @example + * **When to use** + * + * Use to read the current `Ref` value without changing it. + * + * **Example** (Getting the current value) + * * ```ts * import { Effect, Ref } from "effect" * @@ -109,14 +107,21 @@ export const make = value => Effect.sync(() => makeUnsafe(value)); * }) * ``` * - * @since 2.0.0 + * @see {@link set} for replacing the current value + * * @category getters + * @since 2.0.0 */ export const get = self => Effect.sync(() => self.ref.current); /** * Sets the value of the Ref to the specified value. * - * @example + * **When to use** + * + * Use to replace the current `Ref` value with a known value. + * + * **Example** (Setting a value) + * * ```ts * import { Effect, Ref } from "effect" * @@ -136,16 +141,22 @@ export const get = self => Effect.sync(() => self.ref.current); * }) * ``` * - * @since 2.0.0 + * @see {@link getAndSet} for setting while returning the previous value + * @see {@link setAndGet} for setting while returning the new value + * * @category setters + * @since 2.0.0 */ export const set = /*#__PURE__*/dual(2, (self, value) => Effect.sync(() => MutableRef.set(self.ref, value))); /** - * Atomically gets the current value of the Ref and sets it to the specified value. + * Gets the current value of the Ref, sets it to the specified value, and returns the previous value atomically. * - * Returns the value that was in the Ref before the update. + * **When to use** + * + * Use to replace a plain `Ref` value while returning the previous value. + * + * **Example** (Replacing a value atomically) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -161,8 +172,11 @@ export const set = /*#__PURE__*/dual(2, (self, value) => Effect.sync(() => Mutab * }) * ``` * + * @see {@link set} for setting without returning the previous value + * @see {@link getAndUpdate} for deriving the new value from the previous value + * + * @category mutations * @since 2.0.0 - * @category utils */ export const getAndSet = /*#__PURE__*/dual(2, (self, value) => Effect.sync(() => { const current = self.ref.current; @@ -170,11 +184,14 @@ export const getAndSet = /*#__PURE__*/dual(2, (self, value) => Effect.sync(() => return current; })); /** - * Atomically gets the current value of the Ref and updates it with the given function. + * Gets the current value of the Ref, updates it with the given function, and returns the previous value atomically. * - * Returns the value that was in the Ref before the update. + * **When to use** + * + * Use to derive a new `Ref` value while returning the previous value. + * + * **Example** (Updating and returning the previous value) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -190,8 +207,11 @@ export const getAndSet = /*#__PURE__*/dual(2, (self, value) => Effect.sync(() => * }) * ``` * + * @see {@link update} for updating without returning the previous value + * @see {@link updateAndGet} for returning the new value instead + * + * @category mutations * @since 2.0.0 - * @category utils */ export const getAndUpdate = /*#__PURE__*/dual(2, (self, f) => Effect.sync(() => { const current = self.ref.current; @@ -199,16 +219,22 @@ export const getAndUpdate = /*#__PURE__*/dual(2, (self, f) => Effect.sync(() => return current; })); /** - * Atomically gets the current value of the Ref and updates it with the given partial function. + * Gets the current value of the Ref and updates it atomically with the given partial function. * - * If the partial function returns `Option.some`, the Ref is updated with the new value. - * If it returns `Option.none`, the Ref is left unchanged. - * Always returns the value that was in the Ref before the attempted update. + * **When to use** + * + * Use to return the previous `Ref` value while applying a conditional update. + * + * **Details** + * + * If the partial function returns `Option.some`, the Ref is updated with the + * new value. If it returns `Option.none`, the Ref is left unchanged. The effect + * always returns the value that was in the Ref before the attempted update. + * + * **Example** (Conditionally updating and returning the previous value) * - * @example * ```ts - * import { Effect, Ref } from "effect" - * import * as Option from "effect/Option" + * import { Effect, Option, Ref } from "effect" * * const program = Effect.gen(function*() { * const counter = yield* Ref.make(5) @@ -235,8 +261,11 @@ export const getAndUpdate = /*#__PURE__*/dual(2, (self, f) => Effect.sync(() => * }) * ``` * + * @see {@link getAndUpdate} for always applying an update + * @see {@link updateSome} for conditional updates without returning the previous value + * + * @category mutations * @since 2.0.0 - * @category utils */ export const getAndUpdateSome = /*#__PURE__*/dual(2, (self, pf) => Effect.sync(() => { const current = self.ref.current; @@ -247,11 +276,15 @@ export const getAndUpdateSome = /*#__PURE__*/dual(2, (self, pf) => Effect.sync(( return current; })); /** - * Atomically sets the value of the Ref to the specified value and returns the new value. + * Sets the value of the Ref atomically to the specified value and returns the new value. * - * This is useful when you want to set a value and immediately get it back in one atomic operation. + * **When to use** + * + * Use when you want to set a `Ref` value and immediately get it back in one + * atomic operation. + * + * **Example** (Setting and returning the new value) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -276,17 +309,26 @@ export const getAndUpdateSome = /*#__PURE__*/dual(2, (self, pf) => Effect.sync(( * }) * ``` * + * @category mutations * @since 2.0.0 - * @category utils */ export const setAndGet = /*#__PURE__*/dual(2, (self, value) => Effect.sync(() => self.ref.current = value)); /** - * Atomically modifies the value of the Ref using the given function. + * Modifies the value of the Ref atomically using the given function. + * + * **When to use** + * + * Use to compute both a separate return value and the next stored `Ref` value + * in one atomic update. + * + * **Details** + * + * The function receives the current value and returns a tuple of + * `[result, newValue]`. The Ref is updated with `newValue`, and `result` is + * returned by the effect. * - * The function receives the current value and returns a tuple of [result, newValue]. - * The Ref is updated with the newValue and the result is returned. + * **Example** (Modifying a value atomically) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -318,8 +360,11 @@ export const setAndGet = /*#__PURE__*/dual(2, (self, value) => Effect.sync(() => * }) * ``` * - * @since 2.0.0 + * @see {@link updateAndGet} for returning the new stored value + * @see {@link modifySome} for optionally updating while returning a separate result + * * @category setters + * @since 2.0.0 */ export const modify = /*#__PURE__*/dual(2, (self, f) => Effect.sync(() => { const [b, a] = f(self.ref.current); @@ -327,16 +372,23 @@ export const modify = /*#__PURE__*/dual(2, (self, f) => Effect.sync(() => { return b; })); /** - * Atomically modifies the value of the Ref using the given partial function. + * Computes a result atomically and optionally updates the value of the `Ref`. + * + * **When to use** + * + * Use to compute a return value while optionally updating a plain `Ref`. + * + * **Details** * - * The function receives the current value and returns an Option of [result, newValue]. - * If the function returns `Option.some([result, newValue])`, the Ref is updated with newValue and result is returned. - * If it returns `Option.none()`, the Ref is left unchanged and the fallback value is returned. + * The callback receives the current value and returns `[result, nextValue]`, + * where `nextValue` is an `Option`. If `nextValue` is `Option.some(value)`, + * the `Ref` is updated to `value`; if it is `Option.none()`, the `Ref` is left + * unchanged. The returned effect always succeeds with `result`. + * + * **Example** (Conditionally modifying a value) * - * @example * ```ts - * import { Effect, Ref } from "effect" - * import * as Option from "effect/Option" + * import { Effect, Option, Ref } from "effect" * * const program = Effect.gen(function*() { * const counter = yield* Ref.make(5) @@ -371,17 +423,25 @@ export const modify = /*#__PURE__*/dual(2, (self, f) => Effect.sync(() => { * }) * ``` * - * @since 2.0.0 + * @see {@link modify} for always storing a new value + * @see {@link updateSome} for optional updates without a separate return value + * * @category setters + * @since 2.0.0 */ export const modifySome = /*#__PURE__*/dual(2, (self, pf) => modify(self, value => { const [b, option] = pf(value); return [b, option._tag === "None" ? value : option.value]; })); /** - * Atomically updates the value of the Ref using the given function. + * Updates the value of the Ref atomically using the given function. + * + * **When to use** + * + * Use to apply a `Ref` state transition without returning a value. + * + * **Example** (Updating a value) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -404,16 +464,24 @@ export const modifySome = /*#__PURE__*/dual(2, (self, pf) => modify(self, value * }) * ``` * - * @since 2.0.0 + * @see {@link updateAndGet} for returning the new value + * @see {@link getAndUpdate} for returning the previous value + * * @category setters + * @since 2.0.0 */ export const update = /*#__PURE__*/dual(2, (self, f) => Effect.sync(() => { self.ref.current = f(self.ref.current); })); /** - * Atomically updates the value of the Ref using the given function and returns the new value. + * Updates the value of the Ref atomically using the given function and returns the new value. + * + * **When to use** + * + * Use to apply a `Ref` state transition and return the new stored value. + * + * **Example** (Updating and returning the new value) * - * @example * ```ts * import { Effect, Ref } from "effect" * @@ -430,20 +498,29 @@ export const update = /*#__PURE__*/dual(2, (self, f) => Effect.sync(() => { * }) * ``` * + * @see {@link update} for updating without returning the new value + * @see {@link getAndUpdate} for returning the previous value instead + * + * @category mutations * @since 2.0.0 - * @category utils */ export const updateAndGet = /*#__PURE__*/dual(2, (self, f) => Effect.sync(() => self.ref.current = f(self.ref.current))); /** - * Atomically updates the value of the Ref using the given partial function. + * Updates the value of the Ref atomically using the given partial function. + * + * **When to use** + * + * Use to apply a conditional `Ref` update without returning a value. + * + * **Details** * - * If the partial function returns `Option.some`, the Ref is updated with the new value. - * If it returns `Option.none`, the Ref is left unchanged. + * If the partial function returns `Option.some`, the Ref is updated with the + * new value. If it returns `Option.none`, the Ref is left unchanged. + * + * **Example** (Conditionally updating a value) * - * @example * ```ts - * import { Effect, Ref } from "effect" - * import * as Option from "effect/Option" + * import { Effect, Option, Ref } from "effect" * * const program = Effect.gen(function*() { * const counter = yield* Ref.make(5) @@ -469,8 +546,11 @@ export const updateAndGet = /*#__PURE__*/dual(2, (self, f) => Effect.sync(() => * }) * ``` * - * @since 2.0.0 + * @see {@link update} for always applying an update + * @see {@link updateSomeAndGet} for returning the resulting current value + * * @category setters + * @since 2.0.0 */ export const updateSome = /*#__PURE__*/dual(2, (self, f) => Effect.sync(() => { const option = f(self.ref.current); @@ -479,16 +559,23 @@ export const updateSome = /*#__PURE__*/dual(2, (self, f) => Effect.sync(() => { } })); /** - * Atomically updates the value of the Ref using the given partial function and returns the current value. + * Updates the value of the Ref atomically using the given partial function and returns the current value. + * + * **When to use** * - * If the partial function returns `Option.some`, the Ref is updated with the new value. - * If it returns `Option.none`, the Ref is left unchanged. - * Returns the current value of the Ref after the potential update. + * Use to apply a conditional `Ref` update and return the resulting current + * value. + * + * **Details** + * + * If the partial function returns `Option.some`, the Ref is updated with the + * new value. If it returns `Option.none`, the Ref is left unchanged. The effect + * returns the current value of the Ref after the potential update. + * + * **Example** (Conditionally updating and returning the current value) * - * @example * ```ts - * import { Effect, Ref } from "effect" - * import * as Option from "effect/Option" + * import { Effect, Option, Ref } from "effect" * * const program = Effect.gen(function*() { * const counter = yield* Ref.make(10) @@ -509,8 +596,11 @@ export const updateSome = /*#__PURE__*/dual(2, (self, f) => Effect.sync(() => { * }) * ``` * + * @see {@link updateSome} for conditional updates without returning a value + * @see {@link updateAndGet} for always updating and returning the new value + * + * @category mutations * @since 2.0.0 - * @category utils */ export const updateSomeAndGet = /*#__PURE__*/dual(2, (self, pf) => Effect.sync(() => { const option = pf(self.ref.current); @@ -522,10 +612,17 @@ export const updateSomeAndGet = /*#__PURE__*/dual(2, (self, pf) => Effect.sync(( /** * Gets the current value of the Ref synchronously (unsafe version). * - * This function reads the current value without wrapping in Effect. - * Use this only when you're sure about the safety of immediate access. + * **When to use** + * + * Use when you need immediate synchronous access and can guarantee that + * reading the `Ref` outside of `Effect` is safe. + * + * **Gotchas** + * + * Prefer `Ref.get` for Effect-wrapped access in Effect programs. + * + * **Example** (Reading a ref unsafely) * - * @example * ```ts * import { Ref } from "effect" * @@ -540,8 +637,8 @@ export const updateSomeAndGet = /*#__PURE__*/dual(2, (self, pf) => Effect.sync(( * // Prefer Ref.get for Effect-wrapped access * ``` * - * @since 2.0.0 * @category getters + * @since 4.0.0 */ export const getUnsafe = self => self.ref.current; //# sourceMappingURL=Ref.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Ref.js.map b/.opencode/node_modules/effect/dist/Ref.js.map index b40e796c4c63dc2c800d4fe7b81958daee9509e0..2cfda386b34c3b3c82446f0a0b65a87189bf75a8 100644 --- a/.opencode/node_modules/effect/dist/Ref.js.map +++ b/.opencode/node_modules/effect/dist/Ref.js.map @@ -1 +1 @@ -{"version":3,"file":"Ref.js","names":["Effect","dual","identity","PipeInspectableProto","MutableRef","TypeId","RefProto","_A","toJSON","_id","ref","makeUnsafe","value","self","Object","create","make","sync","get","current","set","getAndSet","getAndUpdate","f","getAndUpdateSome","pf","option","_tag","setAndGet","modify","b","a","modifySome","update","updateAndGet","updateSome","updateSomeAndGet","getUnsafe"],"sources":["../src/Ref.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,KAAKA,MAAM,MAAM,aAAa;AACrC,SAASC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAC9C,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAK7C,MAAMC,MAAM,GAAG,aAAa;AAwE5B,MAAMC,QAAQ,GAAG;EACf,CAACD,MAAM,GAAG;IACRE,EAAE,EAAEL;GACL;EACD,GAAGC,oBAAoB;EACvBK,MAAMA,CAAA;IACJ,OAAO;MACLC,GAAG,EAAE,KAAK;MACVC,GAAG,EAAE,IAAI,CAACA;KACX;EACH;CACD;AAED;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMC,UAAU,GAAOC,KAAQ,IAAY;EAChD,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACT,QAAQ,CAAC;EACpCO,IAAI,CAACH,GAAG,GAAGN,UAAU,CAACY,IAAI,CAACJ,KAAK,CAAC;EACjC,OAAOC,IAAI;AACb,CAAC;AAED;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMG,IAAI,GAAOJ,KAAQ,IAA4BZ,MAAM,CAACiB,IAAI,CAAC,MAAMN,UAAU,CAACC,KAAK,CAAC,CAAC;AAEhG;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMM,GAAG,GAAOL,IAAY,IAAKb,MAAM,CAACiB,IAAI,CAAC,MAAMJ,IAAI,CAACH,GAAG,CAACS,OAAO,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;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C;AAEL;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMkB,SAAS,GAAOxB,IAAY,IAAQA,IAAI,CAACH,GAAG,CAACS,OAAO","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Ref.js","names":["Effect","dual","identity","PipeInspectableProto","MutableRef","TypeId","RefProto","_A","toJSON","_id","ref","makeUnsafe","value","self","Object","create","make","sync","get","current","set","getAndSet","getAndUpdate","f","getAndUpdateSome","pf","option","_tag","setAndGet","modify","b","a","modifySome","update","updateAndGet","updateSome","updateSomeAndGet","getUnsafe"],"sources":["../src/Ref.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;AAYA,OAAO,KAAKA,MAAM,MAAM,aAAa;AACrC,SAASC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAC9C,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAK7C,MAAMC,MAAM,GAAG,aAAa;AA2F5B,MAAMC,QAAQ,GAAG;EACf,CAACD,MAAM,GAAG;IACRE,EAAE,EAAEL;GACL;EACD,GAAGC,oBAAoB;EACvBK,MAAMA,CAAA;IACJ,OAAO;MACLC,GAAG,EAAE,KAAK;MACVC,GAAG,EAAE,IAAI,CAACA;KACX;EACH;CACD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,MAAMC,UAAU,GAAOC,KAAQ,IAAY;EAChD,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACT,QAAQ,CAAC;EACpCO,IAAI,CAACH,GAAG,GAAGN,UAAU,CAACY,IAAI,CAACJ,KAAK,CAAC;EACjC,OAAOC,IAAI;AACb,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMG,IAAI,GAAOJ,KAAQ,IAA4BZ,MAAM,CAACiB,IAAI,CAAC,MAAMN,UAAU,CAACC,KAAK,CAAC,CAAC;AAEhG;;;;;;;;;;;;;;;;;;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AAC,MAAK;EACf,MAAMS,MAAM,GAAGD,EAAE,CAACZ,IAAI,CAACH,GAAG,CAACS,OAAO,CAAC;EACnC,IAAIO,MAAM,CAACC,IAAI,KAAK,MAAM,EAAE;IAC1Bd,IAAI,CAACH,GAAG,CAACS,OAAO,GAAGO,MAAM,CAACd,KAAK;EACjC;EACA,OAAOC,IAAI,CAACH,GAAG,CAACS,OAAO;AACzB,CAAC,CAAC,CAAC;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,MAAMkB,SAAS,GAAOxB,IAAY,IAAQA,IAAI,CAACH,GAAG,CAACS,OAAO","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/References.d.ts b/.opencode/node_modules/effect/dist/References.d.ts index 78023612c5803d1801c647d80cb1b5d44b674b2c..97efa308476c1992fe92689171191f95dc80e47c 100644 --- a/.opencode/node_modules/effect/dist/References.d.ts +++ b/.opencode/node_modules/effect/dist/References.d.ts @@ -1,12 +1,13 @@ /** - * This module provides a collection of reference implementations for commonly used - * Effect runtime configuration values. These references allow you to access and - * modify runtime behavior such as concurrency limits, scheduling policies, - * tracing configuration, and logging settings. + * The `References` module exposes the built-in `Context.Reference` keys that + * the Effect runtime consults for execution settings and diagnostic metadata. + * These references cover concurrency, scheduling, logging, tracing, and + * low-level diagnostic state. * - * References are special service instances that can be dynamically updated - * during runtime, making them ideal for configuration that may need to change - * based on application state or external conditions. + * A `Context.Reference` is a service key with a default value. Reading one + * of these references returns the value from the current fiber context, and + * providing a new value changes behavior for the provided effect and the fibers + * it starts. * * @since 4.0.0 */ @@ -18,40 +19,117 @@ import { MaxOpsBeforeYield, PreventSchedulerYield } from "./Scheduler.ts"; import { CurrentTraceLevel, DisablePropagation, MinimumTraceLevel, type SpanLink, Tracer } from "./Tracer.ts"; export { /** - * @since 4.0.0 + * Context reference for the current trace level used for dynamic trace filtering. + * + * **When to use** + * + * Use to set the default trace level for spans created in a scope when span + * options do not provide `level`. + * + * @see {@link MinimumTraceLevel} for configuring the threshold that decides whether spans at a given level are sampled or exported + * * @category references + * @since 4.0.0 */ CurrentTraceLevel, /** - * @since 4.0.0 + * Context reference for disabling trace propagation in the current context. + * + * **When to use** + * + * Use to mark tracing work as non-propagating while still allowing local span + * tracking. + * + * **Details** + * + * Annotated spans become non-propagating no-op spans, and parent selection + * skips spans marked with disabled propagation. + * + * @see {@link TracerEnabled} for disabling span registration instead of only propagation + * * @category references + * @since 4.0.0 */ DisablePropagation, /** - * @since 4.0.0 + * Context reference for the maximum operation budget before a fiber yields to the scheduler. + * + * **When to use** + * + * Use to configure the runtime reference for the fiber operation budget that + * triggers a scheduler yield. + * + * **Details** + * + * The default value is `2048` operations. + * + * @see {@link PreventSchedulerYield} for bypassing scheduler yield checks instead of changing the operation budget + * * @category references + * @since 4.0.0 */ MaxOpsBeforeYield, /** - * @since 4.0.0 + * Context reference for the minimum trace level threshold for span sampling. + * + * **When to use** + * + * Use to set the trace-level threshold that decides whether newly created + * spans are sampled and exported. + * + * @see {@link CurrentTraceLevel} for setting the level assigned to spans before this threshold is applied + * * @category references + * @since 4.0.0 */ MinimumTraceLevel, /** - * @since 4.0.0 + * Context reference for whether the runtime bypasses scheduler yield checks. + * + * **When to use** + * + * Use to bypass automatic scheduler yield checks in a controlled runtime scope + * where throughput is preferred over scheduler fairness. + * + * **Details** + * + * When set to `true`, the fiber run loop skips `Scheduler.shouldYield`. The + * default value is `false`. + * + * **Gotchas** + * + * Disabling automatic yield checks can let long-running fibers monopolize the + * JavaScript thread. + * + * @see {@link MaxOpsBeforeYield} for tuning the operation budget while keeping scheduler yield checks enabled + * * @category references + * @since 4.0.0 */ PreventSchedulerYield, /** - * @since 4.0.0 + * Context reference for the active tracer service used to create spans. + * + * **When to use** + * + * Use to access or override the active tracer service through the references + * module when working directly with Effect runtime references. + * * @category references + * @since 4.0.0 */ Tracer }; /** - * Reference for controlling the current concurrency limit. Can be set to "unbounded" + * Context reference for controlling the current concurrency limit. Can be set to "unbounded" * for unlimited concurrency or a specific number to limit concurrent operations. * - * @example + * **When to use** + * + * Use to configure the default concurrency limit for operations that read + * concurrency from the current context. + * + * **Example** (Setting current concurrency) + * * ```ts * import { Effect, References } from "effect" * @@ -87,10 +165,16 @@ Tracer }; */ export declare const CurrentConcurrency: Context.Reference; /** - * Reference for managing log annotations that are automatically added to all log entries. + * Context reference for managing log annotations that are automatically added to all log entries. * These annotations provide contextual metadata that appears in every log message. * - * @example + * **When to use** + * + * Use to attach shared contextual metadata to every log entry emitted in the + * current context. + * + * **Example** (Managing log annotations) + * * ```ts * import { Console, Effect, References } from "effect" * @@ -137,14 +221,25 @@ export declare const CurrentConcurrency: Context.Reference * }) * ``` * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export declare const CurrentLogAnnotations: Context.Reference>; /** - * Reference for controlling the current log level for dynamic filtering. + * Context reference for the current log severity used by `Effect.log` when no explicit + * level is provided. + * + * **When to use** + * + * Use to set the default severity for `Effect.log` entries that do not provide + * an explicit level. + * + * **Details** + * + * Use `MinimumLogLevel` to control which log entries are filtered out. + * + * **Example** (Changing the current log level) * - * @example * ```ts * import { Console, Effect, References } from "effect" * @@ -183,10 +278,16 @@ export declare const CurrentLogAnnotations: Context.Reference; /** - * Reference for managing log spans that track the duration and hierarchy of operations. + * Context reference for managing log spans that track the duration and hierarchy of operations. * Each span represents a labeled time period for performance analysis and debugging. * - * @example + * **When to use** + * + * Use to carry the active log span stack that should be included with log + * entries in the current context. + * + * **Example** (Tracking log spans) + * * ```ts * import { Console, Effect, References } from "effect" * @@ -196,7 +297,7 @@ export declare const CurrentLogLevel: Context.Reference; * console.log(current.length) // 0 * * // Add a log span manually - * const startTime = Date.now() + * const databaseConnectionStartedAt = 0 * yield* Effect.provideService( * Effect.gen(function*() { * // Simulate some work @@ -207,10 +308,11 @@ export declare const CurrentLogLevel: Context.Reference; * console.log("Active spans:", spans.map(([label]) => label)) // ["database-connection"] * }), * References.CurrentLogSpans, - * [["database-connection", startTime]] + * [["database-connection", databaseConnectionStartedAt]] * ) * * // Add another span + * const dataProcessingStartedAt = 100 * yield* Effect.provideService( * Effect.gen(function*() { * const spans = yield* References.CurrentLogSpans @@ -220,8 +322,8 @@ export declare const CurrentLogLevel: Context.Reference; * }), * References.CurrentLogSpans, * [ - * ["database-connection", startTime], - * ["data-processing", Date.now()] + * ["database-connection", databaseConnectionStartedAt], + * ["data-processing", dataProcessingStartedAt] * ] * ) * @@ -237,20 +339,41 @@ export declare const CurrentLogLevel: Context.Reference; * }) * ``` * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export declare const CurrentLogSpans: Context.Reference>; /** - * @since 4.0.0 + * Context reference for the current captured stack-frame chain for the running + * fiber. + * + * **When to use** + * + * Use when writing low-level tracing or diagnostic integrations that need direct + * access to the stack-frame chain carried by the current fiber. + * + * **Details** + * + * Effect and Layer tracing use this reference to attach stack-frame information + * to failures and interruption causes. It is normally managed by tracing APIs + * rather than provided directly by application code. + * + * @see {@link StackFrame} for the frame node stored in this reference + * * @category references + * @since 4.0.0 */ export declare const CurrentStackFrame: Context.Reference; /** - * Reference for setting the minimum log level threshold. Log entries below this + * Context reference for setting the minimum log level threshold. Log entries below this * level will be filtered out completely. * - * @example + * **When to use** + * + * Use to filter out log entries below a severity threshold. + * + * **Example** (Setting the minimum log level) + * * ```ts * import { Console, Effect, References } from "effect" * @@ -297,10 +420,15 @@ export declare const CurrentStackFrame: Context.Reference; /** - * Reference for controlling whether tracing is enabled globally. When set to false, + * Context reference for controlling whether tracing is enabled globally. When set to false, * spans will not be registered with the tracer and tracing overhead is minimized. * - * @example + * **When to use** + * + * Use to disable or re-enable span registration in the current context. + * + * **Example** (Toggling tracing) + * * ```ts * import { Effect, References } from "effect" * @@ -337,15 +465,20 @@ export declare const MinimumLogLevel: Context.Reference; * }) * ``` * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export declare const TracerEnabled: Context.Reference; /** - * Reference for managing span annotations that are automatically added to all new spans. + * Context reference for managing span annotations that are automatically added to all new spans. * These annotations provide context and metadata that applies across multiple spans. * - * @example + * **When to use** + * + * Use to attach shared metadata to every span created in the current context. + * + * **Example** (Managing span annotations) + * * ```ts * import { Effect, References } from "effect" * @@ -388,15 +521,20 @@ export declare const TracerEnabled: Context.Reference; * }) * ``` * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export declare const TracerSpanAnnotations: Context.Reference>; /** - * Reference for managing span links that are automatically added to all new spans. + * Context reference for managing span links that are automatically added to all new spans. * Span links connect related spans that are not in a parent-child relationship. * - * @example + * **When to use** + * + * Use to attach shared links to every span created in the current context. + * + * **Example** (Managing span links) + * * ```ts * import { Effect, References, Tracer } from "effect" * @@ -449,16 +587,21 @@ export declare const TracerSpanAnnotations: Context.Reference>; /** - * Reference for controlling whether trace timing is enabled globally. When set + * Context reference for controlling whether trace timing is enabled globally. When set * to false, spans will not contain timing information (trace time will always * be set to zero). * - * @example + * **When to use** + * + * Use to disable or re-enable timing capture for spans in the current context. + * + * **Example** (Toggling trace timing) + * * ```ts * import { Effect, References } from "effect" * @@ -491,21 +634,52 @@ export declare const TracerSpanLinks: Context.Reference> * }) * ``` * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export declare const TracerTimingEnabled: Context.Reference; /** - * The log level for unhandled errors. This reference allows you to set the log - * level for unhandled errors that occur during Effect execution. + * Context reference for the log severity used when a pool finalizer reports an + * unhandled error. + * + * **When to use** + * + * Use to choose whether and at which severity pool finalizer failures are + * reported. + * + * **Details** + * + * The default level is `"Error"`. + * + * **Gotchas** + * + * Providing `undefined` suppresses this report; it does not fall back to + * `CurrentLogLevel`. + * + * @see {@link CurrentLogLevel} for the default severity used by ordinary `Effect.log` calls + * @see {@link MinimumLogLevel} for filtering emitted log entries by threshold * * @category references * @since 4.0.0 */ export declare const UnhandledLogLevel: Context.Reference; /** - * @since 4.0.0 + * A captured stack-frame node used to describe the traced execution path. + * + * **When to use** + * + * Use when reading or supplying the stack-frame chain that Effect tracing uses + * to attach diagnostic call-site information to failures and interruptions. + * + * **Details** + * + * Each frame has a span or operation `name`, a lazy `stack` supplier, and an + * optional `parent` frame that links it to the previous captured frame. + * + * @see {@link CurrentStackFrame} for the fiber reference carrying the active stack-frame chain + * * @category references + * @since 4.0.0 */ export interface StackFrame { readonly name: string; @@ -513,21 +687,53 @@ export interface StackFrame { readonly parent: StackFrame | undefined; } /** - * @since 4.0.0 + * Context reference for the set of loggers currently used by Effect logging + * operations. + * + * **When to use** + * + * Use to inspect or provide the complete set of loggers used by Effect logging + * in the current context. + * + * **Details** + * + * The default set contains the built-in default logger and tracer logger. + * Providing this reference changes which `Logger` instances receive log entries + * in the current context. + * * @category references + * @since 4.0.0 */ export declare const CurrentLoggers: Context.Reference>>; /** - * @since 4.0.0 + * Context reference for controlling whether built-in console loggers write to stderr. + * + * **When to use** + * + * Use to configure the runtime reference that controls whether built-in console + * loggers write to stderr. + * + * **Details** + * + * The default value is `false`. When set to `true`, the built-in default logger + * and TTY pretty console logger call `console.error` instead of `console.log`. + * * @category references + * @since 4.0.0 */ export declare const LogToStderr: Context.Reference; export { /** - * Reference for the current scheduler implementation used by the Effect runtime. + * Context reference for the current scheduler implementation used by the Effect runtime. * Controls how Effects are scheduled and executed. * - * @example + * **When to use** + * + * Use to provide the scheduler implementation that fibers use in the current + * context. + * + * **Example** (Providing a custom scheduler) + * * ```ts * import { Effect, References, Scheduler } from "effect" * diff --git a/.opencode/node_modules/effect/dist/References.d.ts.map b/.opencode/node_modules/effect/dist/References.d.ts.map index 87e9a34f9ef8ae3f3451d4e49c919e1f22b4b167..0e1b7b6f82b77d74252b3d17e6ed5c60a6014471 100644 --- a/.opencode/node_modules/effect/dist/References.d.ts.map +++ b/.opencode/node_modules/effect/dist/References.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"References.d.ts","sourceRoot":"","sources":["../src/References.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAG5C,OAAO,KAAK,EAA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AO,EAAE,GAAG,CAAC,CAAC,CAAiC,CAAA;AAEjH;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,SAAS,CAAC,OAAO,CAA8B,CAAA;AAEjF,OAAO;AACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,SAAS,EACV,MAAM,gBAAgB,CAAA"} \ No newline at end of file +{"version":3,"file":"References.d.ts","sourceRoot":"","sources":["../src/References.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAG5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAE7G,OAAO;AACL;;;;;;;;;;;;GAYG;AACH,iBAAiB;AACjB;;;;;;;;;;;;;;;;;GAiBG;AACH,kBAAkB;AAClB;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAiB;AACjB;;;;;;;;;;;;GAYG;AACH,iBAAiB;AACjB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAqB;AACrB;;;;;;;;;;GAUG;AACH,MAAM,EACP,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,WAAW,CAAiC,CAAA;AAExG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2D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AQ,CAAC,CAA8B,CAAA;AAErG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,SAAS,CAAC,OAAO,CAAkC,CAAA;AAE7F;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAgC,CAAA;AAEtG;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,MAAM,GAAG,SAAS,CAAA;IACxC,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAAA;CACxC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAiC,CAAA;AAEjH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,SAAS,CAAC,OAAO,CAA8B,CAAA;AAEjF,OAAO;AACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,SAAS,EACV,MAAM,gBAAgB,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/References.js b/.opencode/node_modules/effect/dist/References.js index 0018bab9bb9d5c273ccd4471fc0f211d71d3b6f1..c99d4282f2b0adc0ba7ea44eb55aa120527803f9 100644 --- a/.opencode/node_modules/effect/dist/References.js +++ b/.opencode/node_modules/effect/dist/References.js @@ -4,40 +4,117 @@ import { MaxOpsBeforeYield, PreventSchedulerYield } from "./Scheduler.js"; import { CurrentTraceLevel, DisablePropagation, MinimumTraceLevel, Tracer } from "./Tracer.js"; export { /** - * @since 4.0.0 + * Context reference for the current trace level used for dynamic trace filtering. + * + * **When to use** + * + * Use to set the default trace level for spans created in a scope when span + * options do not provide `level`. + * + * @see {@link MinimumTraceLevel} for configuring the threshold that decides whether spans at a given level are sampled or exported + * * @category references + * @since 4.0.0 */ CurrentTraceLevel, /** - * @since 4.0.0 + * Context reference for disabling trace propagation in the current context. + * + * **When to use** + * + * Use to mark tracing work as non-propagating while still allowing local span + * tracking. + * + * **Details** + * + * Annotated spans become non-propagating no-op spans, and parent selection + * skips spans marked with disabled propagation. + * + * @see {@link TracerEnabled} for disabling span registration instead of only propagation + * * @category references + * @since 4.0.0 */ DisablePropagation, /** - * @since 4.0.0 + * Context reference for the maximum operation budget before a fiber yields to the scheduler. + * + * **When to use** + * + * Use to configure the runtime reference for the fiber operation budget that + * triggers a scheduler yield. + * + * **Details** + * + * The default value is `2048` operations. + * + * @see {@link PreventSchedulerYield} for bypassing scheduler yield checks instead of changing the operation budget + * * @category references + * @since 4.0.0 */ MaxOpsBeforeYield, /** - * @since 4.0.0 + * Context reference for the minimum trace level threshold for span sampling. + * + * **When to use** + * + * Use to set the trace-level threshold that decides whether newly created + * spans are sampled and exported. + * + * @see {@link CurrentTraceLevel} for setting the level assigned to spans before this threshold is applied + * * @category references + * @since 4.0.0 */ MinimumTraceLevel, /** - * @since 4.0.0 + * Context reference for whether the runtime bypasses scheduler yield checks. + * + * **When to use** + * + * Use to bypass automatic scheduler yield checks in a controlled runtime scope + * where throughput is preferred over scheduler fairness. + * + * **Details** + * + * When set to `true`, the fiber run loop skips `Scheduler.shouldYield`. The + * default value is `false`. + * + * **Gotchas** + * + * Disabling automatic yield checks can let long-running fibers monopolize the + * JavaScript thread. + * + * @see {@link MaxOpsBeforeYield} for tuning the operation budget while keeping scheduler yield checks enabled + * * @category references + * @since 4.0.0 */ PreventSchedulerYield, /** - * @since 4.0.0 + * Context reference for the active tracer service used to create spans. + * + * **When to use** + * + * Use to access or override the active tracer service through the references + * module when working directly with Effect runtime references. + * * @category references + * @since 4.0.0 */ Tracer }; /** - * Reference for controlling the current concurrency limit. Can be set to "unbounded" + * Context reference for controlling the current concurrency limit. Can be set to "unbounded" * for unlimited concurrency or a specific number to limit concurrent operations. * - * @example + * **When to use** + * + * Use to configure the default concurrency limit for operations that read + * concurrency from the current context. + * + * **Example** (Setting current concurrency) + * * ```ts * import { Effect, References } from "effect" * @@ -73,10 +150,16 @@ Tracer }; */ export const CurrentConcurrency = references.CurrentConcurrency; /** - * Reference for managing log annotations that are automatically added to all log entries. + * Context reference for managing log annotations that are automatically added to all log entries. * These annotations provide contextual metadata that appears in every log message. * - * @example + * **When to use** + * + * Use to attach shared contextual metadata to every log entry emitted in the + * current context. + * + * **Example** (Managing log annotations) + * * ```ts * import { Console, Effect, References } from "effect" * @@ -123,14 +206,25 @@ export const CurrentConcurrency = references.CurrentConcurrency; * }) * ``` * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export const CurrentLogAnnotations = references.CurrentLogAnnotations; /** - * Reference for controlling the current log level for dynamic filtering. + * Context reference for the current log severity used by `Effect.log` when no explicit + * level is provided. + * + * **When to use** + * + * Use to set the default severity for `Effect.log` entries that do not provide + * an explicit level. + * + * **Details** + * + * Use `MinimumLogLevel` to control which log entries are filtered out. + * + * **Example** (Changing the current log level) * - * @example * ```ts * import { Console, Effect, References } from "effect" * @@ -169,10 +263,16 @@ export const CurrentLogAnnotations = references.CurrentLogAnnotations; */ export const CurrentLogLevel = references.CurrentLogLevel; /** - * Reference for managing log spans that track the duration and hierarchy of operations. + * Context reference for managing log spans that track the duration and hierarchy of operations. * Each span represents a labeled time period for performance analysis and debugging. * - * @example + * **When to use** + * + * Use to carry the active log span stack that should be included with log + * entries in the current context. + * + * **Example** (Tracking log spans) + * * ```ts * import { Console, Effect, References } from "effect" * @@ -182,7 +282,7 @@ export const CurrentLogLevel = references.CurrentLogLevel; * console.log(current.length) // 0 * * // Add a log span manually - * const startTime = Date.now() + * const databaseConnectionStartedAt = 0 * yield* Effect.provideService( * Effect.gen(function*() { * // Simulate some work @@ -193,10 +293,11 @@ export const CurrentLogLevel = references.CurrentLogLevel; * console.log("Active spans:", spans.map(([label]) => label)) // ["database-connection"] * }), * References.CurrentLogSpans, - * [["database-connection", startTime]] + * [["database-connection", databaseConnectionStartedAt]] * ) * * // Add another span + * const dataProcessingStartedAt = 100 * yield* Effect.provideService( * Effect.gen(function*() { * const spans = yield* References.CurrentLogSpans @@ -206,8 +307,8 @@ export const CurrentLogLevel = references.CurrentLogLevel; * }), * References.CurrentLogSpans, * [ - * ["database-connection", startTime], - * ["data-processing", Date.now()] + * ["database-connection", databaseConnectionStartedAt], + * ["data-processing", dataProcessingStartedAt] * ] * ) * @@ -223,20 +324,41 @@ export const CurrentLogLevel = references.CurrentLogLevel; * }) * ``` * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export const CurrentLogSpans = references.CurrentLogSpans; /** - * @since 4.0.0 + * Context reference for the current captured stack-frame chain for the running + * fiber. + * + * **When to use** + * + * Use when writing low-level tracing or diagnostic integrations that need direct + * access to the stack-frame chain carried by the current fiber. + * + * **Details** + * + * Effect and Layer tracing use this reference to attach stack-frame information + * to failures and interruption causes. It is normally managed by tracing APIs + * rather than provided directly by application code. + * + * @see {@link StackFrame} for the frame node stored in this reference + * * @category references + * @since 4.0.0 */ export const CurrentStackFrame = references.CurrentStackFrame; /** - * Reference for setting the minimum log level threshold. Log entries below this + * Context reference for setting the minimum log level threshold. Log entries below this * level will be filtered out completely. * - * @example + * **When to use** + * + * Use to filter out log entries below a severity threshold. + * + * **Example** (Setting the minimum log level) + * * ```ts * import { Console, Effect, References } from "effect" * @@ -283,10 +405,15 @@ export const CurrentStackFrame = references.CurrentStackFrame; */ export const MinimumLogLevel = references.MinimumLogLevel; /** - * Reference for controlling whether tracing is enabled globally. When set to false, + * Context reference for controlling whether tracing is enabled globally. When set to false, * spans will not be registered with the tracer and tracing overhead is minimized. * - * @example + * **When to use** + * + * Use to disable or re-enable span registration in the current context. + * + * **Example** (Toggling tracing) + * * ```ts * import { Effect, References } from "effect" * @@ -323,15 +450,20 @@ export const MinimumLogLevel = references.MinimumLogLevel; * }) * ``` * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export const TracerEnabled = references.TracerEnabled; /** - * Reference for managing span annotations that are automatically added to all new spans. + * Context reference for managing span annotations that are automatically added to all new spans. * These annotations provide context and metadata that applies across multiple spans. * - * @example + * **When to use** + * + * Use to attach shared metadata to every span created in the current context. + * + * **Example** (Managing span annotations) + * * ```ts * import { Effect, References } from "effect" * @@ -374,15 +506,20 @@ export const TracerEnabled = references.TracerEnabled; * }) * ``` * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export const TracerSpanAnnotations = references.TracerSpanAnnotations; /** - * Reference for managing span links that are automatically added to all new spans. + * Context reference for managing span links that are automatically added to all new spans. * Span links connect related spans that are not in a parent-child relationship. * - * @example + * **When to use** + * + * Use to attach shared links to every span created in the current context. + * + * **Example** (Managing span links) + * * ```ts * import { Effect, References, Tracer } from "effect" * @@ -435,16 +572,21 @@ export const TracerSpanAnnotations = references.TracerSpanAnnotations; * }) * ``` * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export const TracerSpanLinks = references.TracerSpanLinks; /** - * Reference for controlling whether trace timing is enabled globally. When set + * Context reference for controlling whether trace timing is enabled globally. When set * to false, spans will not contain timing information (trace time will always * be set to zero). * - * @example + * **When to use** + * + * Use to disable or re-enable timing capture for spans in the current context. + * + * **Example** (Toggling trace timing) + * * ```ts * import { Effect, References } from "effect" * @@ -477,34 +619,83 @@ export const TracerSpanLinks = references.TracerSpanLinks; * }) * ``` * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export const TracerTimingEnabled = references.TracerTimingEnabled; /** - * The log level for unhandled errors. This reference allows you to set the log - * level for unhandled errors that occur during Effect execution. + * Context reference for the log severity used when a pool finalizer reports an + * unhandled error. + * + * **When to use** + * + * Use to choose whether and at which severity pool finalizer failures are + * reported. + * + * **Details** + * + * The default level is `"Error"`. + * + * **Gotchas** + * + * Providing `undefined` suppresses this report; it does not fall back to + * `CurrentLogLevel`. + * + * @see {@link CurrentLogLevel} for the default severity used by ordinary `Effect.log` calls + * @see {@link MinimumLogLevel} for filtering emitted log entries by threshold * * @category references * @since 4.0.0 */ export const UnhandledLogLevel = references.UnhandledLogLevel; /** - * @since 4.0.0 + * Context reference for the set of loggers currently used by Effect logging + * operations. + * + * **When to use** + * + * Use to inspect or provide the complete set of loggers used by Effect logging + * in the current context. + * + * **Details** + * + * The default set contains the built-in default logger and tracer logger. + * Providing this reference changes which `Logger` instances receive log entries + * in the current context. + * * @category references + * @since 4.0.0 */ export const CurrentLoggers = internalEffect.CurrentLoggers; /** - * @since 4.0.0 + * Context reference for controlling whether built-in console loggers write to stderr. + * + * **When to use** + * + * Use to configure the runtime reference that controls whether built-in console + * loggers write to stderr. + * + * **Details** + * + * The default value is `false`. When set to `true`, the built-in default logger + * and TTY pretty console logger call `console.error` instead of `console.log`. + * * @category references + * @since 4.0.0 */ export const LogToStderr = internalEffect.LogToStderr; export { /** - * Reference for the current scheduler implementation used by the Effect runtime. + * Context reference for the current scheduler implementation used by the Effect runtime. * Controls how Effects are scheduled and executed. * - * @example + * **When to use** + * + * Use to provide the scheduler implementation that fibers use in the current + * context. + * + * **Example** (Providing a custom scheduler) + * * ```ts * import { Effect, References, Scheduler } from "effect" * diff --git a/.opencode/node_modules/effect/dist/References.js.map b/.opencode/node_modules/effect/dist/References.js.map index 63a8178ebd87fb570b3b6bc4e3ccd586743018c1..1c40b92f37ae1e75135af6a21478f1d967274111 100644 --- a/.opencode/node_modules/effect/dist/References.js.map +++ b/.opencode/node_modules/effect/dist/References.js.map @@ -1 +1 @@ -{"version":3,"file":"References.js","names":["internalEffect","references","MaxOpsBeforeYield","PreventSchedulerYield","CurrentTraceLevel","DisablePropagation","MinimumTraceLevel","Tracer","CurrentConcurrency","CurrentLogAnnotations","CurrentLogLevel","CurrentLogSpans","CurrentStackFrame","MinimumLogLevel","TracerEnabled","TracerSpanAnnotations","TracerSpanLinks","TracerTiming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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,OAAO,MAAMC,qBAAqB,GAChCd,UAAU,CAACc,qBAAqB;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,OAAO,MAAMC,eAAe,GAA+Cf,UAAU,CAACe,eAAe;AAErG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,OAAO,MAAMC,mBAAmB,GAA+BhB,UAAU,CAACgB,mBAAmB;AAE7F;;;;;;;AAOA,OAAO,MAAMC,iBAAiB,GAA4CjB,UAAU,CAACiB,iBAAiB;AAYtG;;;;AAIA,OAAO,MAAMC,cAAc,GAAyDnB,cAAc,CAACmB,cAAc;AAEjH;;;;AAIA,OAAO,MAAMC,WAAW,GAA+BpB,cAAc,CAACoB,WAAW;AAEjF;AACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BAC,SAAS,QACJ,gBAAgB","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"References.js","names":["internalEffect","references","MaxOpsBeforeYield","PreventSchedulerYield","CurrentTraceLevel","DisablePropagation","MinimumTraceLevel","Tracer","CurrentConcurrency","CurrentLogAnnotations","CurrentLogLevel","CurrentLogSpans","CurrentStackFrame","MinimumLogLevel","TracerEnabled","TracerSpanAnnotations","TracerSpanLinks","TracerTimingEnabled","UnhandledLogLevel","CurrentLoggers","LogToStderr","Scheduler"],"sources":["../src/References.ts"],"sourcesContent":[null],"mappings":"AAcA,OAAO,KAAKA,cAAc,MAAM,sBAAsB;AACtD,OAAO,KAAKC,UAAU,MAAM,0BAA0B;AAItD,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ,gBAAgB;AACzE,SAASC,iBAAiB,EAAEC,kBAAkB,EAAEC,iBAAiB,EAAiBC,MAAM,QAAQ,aAAa;AAE7G;AACE;;;;;;;;;;;;;AAaAH,iBAAiB;AACjB;;;;;;;;;;;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;AAiEA,OAAO,MAAMC,eAAe,GAA+Cf,UAAU,CAACe,eAAe;AAErG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,OAAO,MAAMC,mBAAmB,GAA+BhB,UAAU,CAACgB,mBAAmB;AAE7F;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMC,iBAAiB,GAA4CjB,UAAU,CAACiB,iBAAiB;AA0BtG;;;;;;;;;;;;;;;;;;AAkBA,OAAO,MAAMC,cAAc,GAAyDnB,cAAc,CAACmB,cAAc;AAEjH;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,WAAW,GAA+BpB,cAAc,CAACoB,WAAW;AAEjF;AACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCAC,SAAS,QACJ,gBAAgB","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/RegExp.d.ts b/.opencode/node_modules/effect/dist/RegExp.d.ts index 0e83a3e3cf47e330f88754b6d6bb654b25f8628b..8199862b7bfee23c0e1d72ecb1d574b0e6c6f23d 100644 --- a/.opencode/node_modules/effect/dist/RegExp.d.ts +++ b/.opencode/node_modules/effect/dist/RegExp.d.ts @@ -1,7 +1,13 @@ /** - * @since 4.0.0 - * @category constructors - * @example + * Exposes the JavaScript regular expression constructor from `globalThis`. + * + * **When to use** + * + * Use to construct JavaScript regular expressions through the Effect module + * namespace. + * + * **Example** (Creating a regular expression) + * * ```ts * import { RegExp } from "effect" * @@ -12,12 +18,20 @@ * console.log(pattern.test("Hello World")) // true * console.log(pattern.test("goodbye")) // false * ``` + * + * @category constructors + * @since 4.0.0 */ export declare const RegExp: RegExpConstructor; /** - * Tests if a value is a `RegExp`. + * Checks whether a value is a `RegExp`. + * + * **When to use** + * + * Use to validate unknown input before treating it as a regular expression. + * + * **Example** (Checking for regular expressions) * - * @example * ```ts * import { RegExp } from "effect" * import * as assert from "node:assert" @@ -33,7 +47,12 @@ export declare const isRegExp: (input: unknown) => input is RegExp; /** * Escapes special characters in a regular expression pattern. * - * @example + * **When to use** + * + * Use to turn literal text into a safe regular expression pattern fragment. + * + * **Example** (Escaping a pattern string) + * * ```ts * import { RegExp } from "effect" * import * as assert from "node:assert" @@ -41,7 +60,7 @@ export declare const isRegExp: (input: unknown) => input is RegExp; * assert.deepStrictEqual(RegExp.escape("a*b"), "a\\*b") * ``` * - * @category utilities + * @category RegExp * @since 2.0.0 */ export declare const escape: (string: string) => string; diff --git a/.opencode/node_modules/effect/dist/RegExp.d.ts.map b/.opencode/node_modules/effect/dist/RegExp.d.ts.map index a75a86a71aa954f460daae06c68a345c234fc98a..f39ad6c30de248ae36e64e7df144449ce9bbaf50 100644 --- a/.opencode/node_modules/effect/dist/RegExp.d.ts.map +++ b/.opencode/node_modules/effect/dist/RegExp.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"RegExp.d.ts","sourceRoot":"","sources":["../src/RegExp.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,MAAM,mBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,KAAK,IAAI,MAA2B,CAAA;AAE/E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM,GAAI,QAAQ,MAAM,KAAG,MAAwD,CAAA"} \ No newline at end of file +{"version":3,"file":"RegExp.d.ts","sourceRoot":"","sources":["../src/RegExp.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,MAAM,mBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,KAAK,IAAI,MAA2B,CAAA;AAE/E;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,MAAM,GAAI,QAAQ,MAAM,KAAG,MAAwD,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/RegExp.js b/.opencode/node_modules/effect/dist/RegExp.js index 00db75b31994e224956b2831a4bab987959edcaf..4417bb7dac9b299848e9d630c31f0faf38fdae72 100644 --- a/.opencode/node_modules/effect/dist/RegExp.js +++ b/.opencode/node_modules/effect/dist/RegExp.js @@ -1,13 +1,26 @@ /** - * This module provides utility functions for working with RegExp in TypeScript. + * Tools for working with JavaScript regular expressions from the Effect module + * namespace. The module exposes the native `RegExp` constructor, a guard for + * narrowing unknown values, and escaping for literal text that will be embedded + * in a pattern. + * + * Reach for `RegExp` when you need to build a regular expression from user or + * data-driven text, check whether an unknown value is already a `RegExp`, or + * access the native constructor without leaving the Effect namespace. * * @since 2.0.0 */ import * as predicate from "./Predicate.js"; /** - * @since 4.0.0 - * @category constructors - * @example + * Exposes the JavaScript regular expression constructor from `globalThis`. + * + * **When to use** + * + * Use to construct JavaScript regular expressions through the Effect module + * namespace. + * + * **Example** (Creating a regular expression) + * * ```ts * import { RegExp } from "effect" * @@ -18,12 +31,20 @@ import * as predicate from "./Predicate.js"; * console.log(pattern.test("Hello World")) // true * console.log(pattern.test("goodbye")) // false * ``` + * + * @category constructors + * @since 4.0.0 */ export const RegExp = globalThis.RegExp; /** - * Tests if a value is a `RegExp`. + * Checks whether a value is a `RegExp`. + * + * **When to use** + * + * Use to validate unknown input before treating it as a regular expression. + * + * **Example** (Checking for regular expressions) * - * @example * ```ts * import { RegExp } from "effect" * import * as assert from "node:assert" @@ -39,7 +60,12 @@ export const isRegExp = predicate.isRegExp; /** * Escapes special characters in a regular expression pattern. * - * @example + * **When to use** + * + * Use to turn literal text into a safe regular expression pattern fragment. + * + * **Example** (Escaping a pattern string) + * * ```ts * import { RegExp } from "effect" * import * as assert from "node:assert" @@ -47,7 +73,7 @@ export const isRegExp = predicate.isRegExp; * assert.deepStrictEqual(RegExp.escape("a*b"), "a\\*b") * ``` * - * @category utilities + * @category RegExp * @since 2.0.0 */ export const escape = string => string.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&"); diff --git a/.opencode/node_modules/effect/dist/RegExp.js.map b/.opencode/node_modules/effect/dist/RegExp.js.map index 8b6adb12167aa31b8292771b6965fdb854b342ff..7f5b19fd5ef3f0b06151d6517487487629921770 100644 --- a/.opencode/node_modules/effect/dist/RegExp.js.map +++ b/.opencode/node_modules/effect/dist/RegExp.js.map @@ -1 +1 @@ -{"version":3,"file":"RegExp.js","names":["predicate","RegExp","globalThis","isRegExp","escape","string","replace"],"sources":["../src/RegExp.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAKA,OAAO,KAAKA,SAAS,MAAM,gBAAgB;AAE3C;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,MAAM,GAAGC,UAAU,CAACD,MAAM;AAEvC;;;;;;;;;;;;;;;AAeA,OAAO,MAAME,QAAQ,GAAwCH,SAAS,CAACG,QAAQ;AAE/E;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,MAAM,GAAIC,MAAc,IAAaA,MAAM,CAACC,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"RegExp.js","names":["predicate","RegExp","globalThis","isRegExp","escape","string","replace"],"sources":["../src/RegExp.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;AAYA,OAAO,KAAKA,SAAS,MAAM,gBAAgB;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMC,MAAM,GAAGC,UAAU,CAACD,MAAM;AAEvC;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAME,QAAQ,GAAwCH,SAAS,CAACG,QAAQ;AAE/E;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,MAAM,GAAIC,MAAc,IAAaA,MAAM,CAACC,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Request.d.ts b/.opencode/node_modules/effect/dist/Request.d.ts index ab86205f9c4789c40875269385bf3753f23e3696..00edba1f93088c3aeaea81251f0fcb8b624babee 100644 --- a/.opencode/node_modules/effect/dist/Request.d.ts +++ b/.opencode/node_modules/effect/dist/Request.d.ts @@ -1,15 +1,11 @@ /** - * The `Request` module provides a way to model requests to external data sources - * in a functional and composable manner. Requests represent descriptions of - * operations that can be batched, cached, and executed efficiently. + * Typed request values for data loading with `Effect.request`. * - * A `Request` represents a request that: - * - Yields a value of type `A` on success - * - Can fail with an error of type `E` - * - Requires services of type `R` - * - * Requests are primarily used with RequestResolver to implement efficient - * data fetching patterns, including automatic batching and caching. + * A request describes one logical piece of work without performing it. It + * records the success type, typed error, service requirements, and fields a + * resolver needs to complete the request. Requests are paired with + * `RequestResolver`, which performs backend-specific loading and completes each + * pending request entry with a success, failure, cause, exit, or effect. * * @since 2.0.0 */ @@ -23,7 +19,8 @@ declare const TypeId = "~effect/Request"; * A `Request` is a request from a data source for a value of type `A` * that may fail with an `E` and have requirements of type `R`. * - * @example + * **Example** (Defining typed requests) + * * ```ts * import type { Request } from "effect" * @@ -39,19 +36,40 @@ declare const TypeId = "~effect/Request"; * } * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface Request extends Variance { } /** - * @since 2.0.0 + * Alias for any `Request`, regardless of its success, error, or service + * requirements. + * + * **When to use** + * + * Use as a generic constraint for APIs that accept any request while preserving + * each concrete request's success, error, and service types. + * + * @see {@link Request} for the request interface + * @see {@link Success} for extracting a request's success type + * @see {@link Error} for extracting a request's error type + * @see {@link Services} for extracting a request's service requirements + * @see {@link Result} for the exit type produced by completing a request + * * @category models + * @since 4.0.0 */ export type Any = Request; /** - * @since 2.0.0 + * Variance marker carried by every `Request`. + * + * **Details** + * + * This marker preserves the success, error, and service requirement types for + * Effect's type-level machinery. Users normally get it by extending `Request`. + * * @category models + * @since 2.0.0 */ export interface Variance { readonly [TypeId]: { @@ -61,7 +79,16 @@ export interface Variance { }; } /** - * @example + * The constructor type returned by `Request.of` and `Request.tagged`. + * + * **Details** + * + * The constructor accepts the request's data fields, excluding request variance + * fields and any fields already supplied by the constructor such as `_tag`, and + * returns a value of the request type. + * + * **Example** (Using generated request constructors) + * * ```ts * import { Request } from "effect" * @@ -75,8 +102,8 @@ export interface Variance { * const userRequest = GetUser({ id: 123 }) * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface Constructor, T extends keyof R = never> { (args: Types.VoidIfEmpty)>>>): R; @@ -84,7 +111,8 @@ export interface Constructor, T extends keyof R /** * A utility type to extract the error type from a `Request`. * - * @example + * **Example** (Extracting a request error type) + * * ```ts * import type { Request } from "effect" * @@ -96,14 +124,15 @@ export interface Constructor, T extends keyof R * type UserError = Request.Error // Error * ``` * + * @category utility types * @since 2.0.0 - * @category type-level */ export type Error> = [T] extends [Request] ? _E : never; /** * A utility type to extract the value type from a `Request`. * - * @example + * **Example** (Extracting a request success type) + * * ```ts * import type { Request } from "effect" * @@ -116,21 +145,22 @@ export type Error> = [T] extends [Request // string * ``` * + * @category utility types * @since 2.0.0 - * @category type-level */ export type Success> = [T] extends [Request] ? _A : never; /** * A utility type to extract the requirements type from a `Request`. * + * @category utility types * @since 4.0.0 - * @category type-level */ export type Services> = [T] extends [Request] ? _R : never; /** * A utility type to extract the result type from a `Request`. * - * @example + * **Example** (Extracting a request result type) + * * ```ts * import type { Request } from "effect" * @@ -143,18 +173,29 @@ export type Services> = [T] extends [Request // Exit.Exit * ``` * + * @category utility types * @since 2.0.0 - * @category type-level */ export type Result> = T extends Request ? Exit.Exit : never; /** + * Prototype used by Effect's request constructors. + * + * **Details** + * + * This low-level value provides the structural request marker for values + * created by `Request.of`, `Request.tagged`, `Request.Class`, and + * `Request.TaggedClass`. Most users should use those constructors instead of + * interacting with the prototype directly. + * + * @category prototypes * @since 4.0.0 */ export declare const RequestPrototype: Request; /** - * Tests if a value is a `Request`. + * Checks whether a value is a `Request`. + * + * **Example** (Checking request values) * - * @example * ```ts * import { Request } from "effect" * @@ -181,7 +222,8 @@ export declare const isRequest: (u: unknown) => u is Request>() => Constructor; * Creates a constructor function for a tagged Request type. The tag is automatically * added to the request, making it useful for discriminated unions. * - * @example + * **Example** (Creating tagged request constructors) + * * ```ts * import { Request } from "effect" * @@ -252,7 +295,15 @@ export declare const tagged: & { _tag: string; }>(tag: R["_tag"]) => Constructor; /** - * @example + * Defines request types with TypeScript classes. + * + * **Details** + * + * Subclasses pass their data fields to `super`, and instances are marked as + * `Request` values while retaining the provided readonly fields. + * + * **Example** (Defining request classes) + * * ```ts * import { Request } from "effect" * @@ -266,14 +317,22 @@ export declare const tagged: & { * console.log(getUserRequest.id) // 123 * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const Class: new , Success, Error = never, Context = never>(args: Types.Equals>, {}> extends true ? void : { readonly [P in keyof A as P extends keyof Request ? never : P]: A[P]; }) => Request & Readonly; /** - * @example + * Creates a class constructor for requests with a fixed `_tag` field. + * + * **Details** + * + * Use this when defining class-based request types that should participate in + * tagged unions or tag-based request resolvers. + * + * **Example** (Defining tagged request classes) + * * ```ts * import { Request } from "effect" * @@ -286,31 +345,58 @@ export declare const Class: new , Success, Error = * console.log(request.id) // 123 * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const TaggedClass: (tag: Tag) => new , Success, Error = never, Services = never>(args: Types.Equals>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof Request ? never : P]: A[P]; }) => Request & Readonly & { readonly _tag: Tag; }; /** - * Completes a request entry with the provided result. This is typically used - * within RequestResolver implementations to fulfill pending requests. + * Completes a request entry with the provided result. + * + * **When to use** + * + * Use when you need to finish a `Request.Entry` with a prebuilt final `Exit` + * result. + * + * @see {@link completeEffect} for completing an entry from an effect that may succeed or fail + * @see {@link succeed} for completing an entry with a successful value + * @see {@link fail} for completing an entry with a typed failure + * @see {@link failCause} for completing an entry with a failure `Cause` * * @category completion * @since 2.0.0 */ export declare const complete: { /** - * Completes a request entry with the provided result. This is typically used - * within RequestResolver implementations to fulfill pending requests. + * Completes a request entry with the provided result. + * + * **When to use** + * + * Use when you need to finish a `Request.Entry` with a prebuilt final `Exit` + * result. + * + * @see {@link completeEffect} for completing an entry from an effect that may succeed or fail + * @see {@link succeed} for completing an entry with a successful value + * @see {@link fail} for completing an entry with a typed failure + * @see {@link failCause} for completing an entry with a failure `Cause` * * @category completion * @since 2.0.0 */ (result: Result): (self: Entry) => Effect.Effect; /** - * Completes a request entry with the provided result. This is typically used - * within RequestResolver implementations to fulfill pending requests. + * Completes a request entry with the provided result. + * + * **When to use** + * + * Use when you need to finish a `Request.Entry` with a prebuilt final `Exit` + * result. + * + * @see {@link completeEffect} for completing an entry from an effect that may succeed or fail + * @see {@link succeed} for completing an entry with a successful value + * @see {@link fail} for completing an entry with a typed failure + * @see {@link failCause} for completing an entry with a failure `Cause` * * @category completion * @since 2.0.0 @@ -318,72 +404,251 @@ export declare const complete: { (self: Entry, result: Result): Effect.Effect; }; /** - * @since 2.0.0 + * Completes a request entry with the result of an effect. + * + * **When to use** + * + * Use to finish a `Request.Entry` by running an effect whose success or typed + * failure should become the request result. + * + * **Details** + * + * If the effect succeeds, the entry is completed successfully with its value. + * If the effect fails, the entry is completed with that failure. + * + * **Gotchas** + * + * The returned effect itself does not fail with the request error. + * + * @see {@link complete} for completing an entry with a prebuilt `Exit` + * @see {@link succeed} for completing an entry with a successful value + * @see {@link fail} for completing an entry with a typed failure + * @see {@link failCause} for completing an entry with a failure `Cause` + * * @category completion + * @since 2.0.0 */ export declare const completeEffect: { /** - * @since 2.0.0 + * Completes a request entry with the result of an effect. + * + * **When to use** + * + * Use to finish a `Request.Entry` by running an effect whose success or typed + * failure should become the request result. + * + * **Details** + * + * If the effect succeeds, the entry is completed successfully with its value. + * If the effect fails, the entry is completed with that failure. + * + * **Gotchas** + * + * The returned effect itself does not fail with the request error. + * + * @see {@link complete} for completing an entry with a prebuilt `Exit` + * @see {@link succeed} for completing an entry with a successful value + * @see {@link fail} for completing an entry with a typed failure + * @see {@link failCause} for completing an entry with a failure `Cause` + * * @category completion + * @since 2.0.0 */ (effect: Effect.Effect, Error, R>): (self: Entry) => Effect.Effect; /** - * @since 2.0.0 + * Completes a request entry with the result of an effect. + * + * **When to use** + * + * Use to finish a `Request.Entry` by running an effect whose success or typed + * failure should become the request result. + * + * **Details** + * + * If the effect succeeds, the entry is completed successfully with its value. + * If the effect fails, the entry is completed with that failure. + * + * **Gotchas** + * + * The returned effect itself does not fail with the request error. + * + * @see {@link complete} for completing an entry with a prebuilt `Exit` + * @see {@link succeed} for completing an entry with a successful value + * @see {@link fail} for completing an entry with a typed failure + * @see {@link failCause} for completing an entry with a failure `Cause` + * * @category completion + * @since 2.0.0 */ (self: Entry, effect: Effect.Effect, Error, R>): Effect.Effect; }; /** - * @since 2.0.0 + * Completes a request entry with a typed failure. + * + * **When to use** + * + * Use to report a request-specific typed error while implementing a + * `RequestResolver`. + * + * @see {@link failCause} for completing an entry with a full `Cause` + * @see {@link complete} for completing an entry with an existing `Exit` + * @see {@link completeEffect} for completing an entry from an effect result + * @see {@link succeed} for completing an entry successfully + * * @category completion + * @since 2.0.0 */ export declare const fail: { /** - * @since 2.0.0 + * Completes a request entry with a typed failure. + * + * **When to use** + * + * Use to report a request-specific typed error while implementing a + * `RequestResolver`. + * + * @see {@link failCause} for completing an entry with a full `Cause` + * @see {@link complete} for completing an entry with an existing `Exit` + * @see {@link completeEffect} for completing an entry from an effect result + * @see {@link succeed} for completing an entry successfully + * * @category completion + * @since 2.0.0 */ (error: Error): (self: Entry) => Effect.Effect; /** - * @since 2.0.0 + * Completes a request entry with a typed failure. + * + * **When to use** + * + * Use to report a request-specific typed error while implementing a + * `RequestResolver`. + * + * @see {@link failCause} for completing an entry with a full `Cause` + * @see {@link complete} for completing an entry with an existing `Exit` + * @see {@link completeEffect} for completing an entry from an effect result + * @see {@link succeed} for completing an entry successfully + * * @category completion + * @since 2.0.0 */ (self: Entry, error: Error): Effect.Effect; }; /** - * @since 2.0.0 + * Completes a request entry with a failure `Cause`. + * + * **When to use** + * + * Use when you need a `RequestResolver` to complete an entry with structured + * cause information rather than only the request's typed error value. + * + * @see {@link fail} for completing an entry with a typed error value + * @see {@link complete} for completing an entry with an existing `Exit` + * @see {@link completeEffect} for completing an entry from an effect result + * @see {@link succeed} for completing an entry successfully + * * @category completion + * @since 2.0.0 */ export declare const failCause: { /** - * @since 2.0.0 + * Completes a request entry with a failure `Cause`. + * + * **When to use** + * + * Use when you need a `RequestResolver` to complete an entry with structured + * cause information rather than only the request's typed error value. + * + * @see {@link fail} for completing an entry with a typed error value + * @see {@link complete} for completing an entry with an existing `Exit` + * @see {@link completeEffect} for completing an entry from an effect result + * @see {@link succeed} for completing an entry successfully + * * @category completion + * @since 2.0.0 */ (cause: Cause.Cause>): (self: Entry) => Effect.Effect; /** - * @since 2.0.0 + * Completes a request entry with a failure `Cause`. + * + * **When to use** + * + * Use when you need a `RequestResolver` to complete an entry with structured + * cause information rather than only the request's typed error value. + * + * @see {@link fail} for completing an entry with a typed error value + * @see {@link complete} for completing an entry with an existing `Exit` + * @see {@link completeEffect} for completing an entry from an effect result + * @see {@link succeed} for completing an entry successfully + * * @category completion + * @since 2.0.0 */ (self: Entry, cause: Cause.Cause>): Effect.Effect; }; /** - * @since 2.0.0 + * Completes a request entry successfully with the supplied value. + * + * **When to use** + * + * Use when you need to finish a `Request.Entry` with a successful request + * value. + * + * @see {@link complete} for completing an entry with a prebuilt `Exit` + * @see {@link completeEffect} for completing an entry from an effect result + * @see {@link fail} for completing an entry with a typed failure + * @see {@link failCause} for completing an entry with a failure `Cause` + * * @category completion + * @since 2.0.0 */ export declare const succeed: { /** - * @since 2.0.0 + * Completes a request entry successfully with the supplied value. + * + * **When to use** + * + * Use when you need to finish a `Request.Entry` with a successful request + * value. + * + * @see {@link complete} for completing an entry with a prebuilt `Exit` + * @see {@link completeEffect} for completing an entry from an effect result + * @see {@link fail} for completing an entry with a typed failure + * @see {@link failCause} for completing an entry with a failure `Cause` + * * @category completion + * @since 2.0.0 */ (value: Success): (self: Entry) => Effect.Effect; /** - * @since 2.0.0 + * Completes a request entry successfully with the supplied value. + * + * **When to use** + * + * Use when you need to finish a `Request.Entry` with a successful request + * value. + * + * @see {@link complete} for completing an entry with a prebuilt `Exit` + * @see {@link completeEffect} for completing an entry from an effect result + * @see {@link fail} for completing an entry with a typed failure + * @see {@link failCause} for completing an entry with a failure `Cause` + * * @category completion + * @since 2.0.0 */ (self: Entry, value: Success): Effect.Effect; }; /** - * @since 2.0.0 + * A pending request handed to a `RequestResolver`. + * + * **Details** + * + * An entry contains the original request, the fiber context needed to run it, + * an `uninterruptible` flag used by batching and caching internals, and the + * `completeUnsafe` callback used by resolvers to supply the final `Exit`. + * * @category entry + * @since 2.0.0 */ export interface Entry { readonly request: R; @@ -398,8 +663,16 @@ export interface Entry { ] extends [Request] ? _E : never>): void; } /** - * @since 2.0.0 + * Creates a `Request.Entry` from its component fields. + * + * **Details** + * + * This is a low-level helper for request runtime and resolver infrastructure; + * most application code receives entries from a `RequestResolver` instead of + * constructing them directly. + * * @category entry + * @since 2.0.0 */ export declare const makeEntry: (options: { readonly request: R; diff --git a/.opencode/node_modules/effect/dist/Request.d.ts.map b/.opencode/node_modules/effect/dist/Request.d.ts.map index 280ff8ea3de6d3904bd885c26208f70c4adbcc4c..e66db19bdb1aa5c7137f7812ad62ef74c98457ca 100644 --- a/.opencode/node_modules/effect/dist/Request.d.ts.map +++ b/.opencode/node_modules/effect/dist/Request.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Request.d.ts","sourceRoot":"","sources":["../src/Request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAE1C,OAAO,KAAK,KAAK,IAAI,MAAM,WAAW,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,CAAC,OAAO,EAAE,CAAC,CAAA;IACnB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAC/B,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,CACjE,CAAA;IACD,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;IACjC,QAAQ,CAAC,cAAc,EAAE,CACvB,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,IAAE,EAAE,MAAM,IAAE,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,EAChE,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,IAAE,EAAE,MAAM,IAAE,CAAC,CAAC,GAAG,IAAE,GAAG,KAAK,CACjE,KACE,IAAI,CAAA;CACV,KAAG,KAAK,CAAC,CAAC,CAAY,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Request.js b/.opencode/node_modules/effect/dist/Request.js index c781b08214048f6030c6e12668b961628ee5f161..1bfee840c60c9387bf3f5cb2a9964af2519f018e 100644 --- a/.opencode/node_modules/effect/dist/Request.js +++ b/.opencode/node_modules/effect/dist/Request.js @@ -13,6 +13,16 @@ const requestVariance = /*#__PURE__*/Equal.byReferenceUnsafe({ _R: _ => _ }); /** + * Prototype used by Effect's request constructors. + * + * **Details** + * + * This low-level value provides the structural request marker for values + * created by `Request.of`, `Request.tagged`, `Request.Class`, and + * `Request.TaggedClass`. Most users should use those constructors instead of + * interacting with the prototype directly. + * + * @category prototypes * @since 4.0.0 */ export const RequestPrototype = { @@ -20,9 +30,10 @@ export const RequestPrototype = { [TypeId]: requestVariance }; /** - * Tests if a value is a `Request`. + * Checks whether a value is a `Request`. + * + * **Example** (Checking request values) * - * @example * ```ts * import { Request } from "effect" * @@ -49,7 +60,8 @@ export const isRequest = u => hasProperty(u, TypeId); /** * Creates a constructor function for a specific Request type. * - * @example + * **Example** (Creating untagged request constructors) + * * ```ts * import { Request } from "effect" * @@ -79,7 +91,8 @@ export const of = () => args => Object.assign(Object.create(RequestPrototype), a * Creates a constructor function for a tagged Request type. The tag is automatically * added to the request, making it useful for discriminated unions. * - * @example + * **Example** (Creating tagged request constructors) + * * ```ts * import { Request } from "effect" * @@ -123,7 +136,15 @@ export const tagged = tag => args => { return request; }; /** - * @example + * Defines request types with TypeScript classes. + * + * **Details** + * + * Subclasses pass their data fields to `super`, and instances are marked as + * `Request` values while retaining the provided readonly fields. + * + * **Example** (Defining request classes) + * * ```ts * import { Request } from "effect" * @@ -137,8 +158,8 @@ export const tagged = tag => args => { * console.log(getUserRequest.id) // 123 * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const Class = /*#__PURE__*/function () { function Class(args) { @@ -150,7 +171,15 @@ export const Class = /*#__PURE__*/function () { return Class; }(); /** - * @example + * Creates a class constructor for requests with a fixed `_tag` field. + * + * **Details** + * + * Use this when defining class-based request types that should participate in + * tagged unions or tag-based request resolvers. + * + * **Example** (Defining tagged request classes) + * * ```ts * import { Request } from "effect" * @@ -163,8 +192,8 @@ export const Class = /*#__PURE__*/function () { * console.log(request.id) // 123 * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const TaggedClass = tag => { return class TaggedClass extends Class { @@ -172,39 +201,113 @@ export const TaggedClass = tag => { }; }; /** - * Completes a request entry with the provided result. This is typically used - * within RequestResolver implementations to fulfill pending requests. + * Completes a request entry with the provided result. + * + * **When to use** + * + * Use when you need to finish a `Request.Entry` with a prebuilt final `Exit` + * result. + * + * @see {@link completeEffect} for completing an entry from an effect that may succeed or fail + * @see {@link succeed} for completing an entry with a successful value + * @see {@link fail} for completing an entry with a typed failure + * @see {@link failCause} for completing an entry with a failure `Cause` * * @category completion * @since 2.0.0 */ export const complete = /*#__PURE__*/dual(2, (self, result) => internalEffect.sync(() => self.completeUnsafe(result))); /** - * @since 2.0.0 + * Completes a request entry with the result of an effect. + * + * **When to use** + * + * Use to finish a `Request.Entry` by running an effect whose success or typed + * failure should become the request result. + * + * **Details** + * + * If the effect succeeds, the entry is completed successfully with its value. + * If the effect fails, the entry is completed with that failure. + * + * **Gotchas** + * + * The returned effect itself does not fail with the request error. + * + * @see {@link complete} for completing an entry with a prebuilt `Exit` + * @see {@link succeed} for completing an entry with a successful value + * @see {@link fail} for completing an entry with a typed failure + * @see {@link failCause} for completing an entry with a failure `Cause` + * * @category completion + * @since 2.0.0 */ export const completeEffect = /*#__PURE__*/dual(2, (self, effect) => internalEffect.matchEffect(effect, { onFailure: error => complete(self, core.exitFail(error)), onSuccess: value => complete(self, core.exitSucceed(value)) })); /** - * @since 2.0.0 + * Completes a request entry with a typed failure. + * + * **When to use** + * + * Use to report a request-specific typed error while implementing a + * `RequestResolver`. + * + * @see {@link failCause} for completing an entry with a full `Cause` + * @see {@link complete} for completing an entry with an existing `Exit` + * @see {@link completeEffect} for completing an entry from an effect result + * @see {@link succeed} for completing an entry successfully + * * @category completion + * @since 2.0.0 */ export const fail = /*#__PURE__*/dual(2, (self, error) => complete(self, core.exitFail(error))); /** - * @since 2.0.0 + * Completes a request entry with a failure `Cause`. + * + * **When to use** + * + * Use when you need a `RequestResolver` to complete an entry with structured + * cause information rather than only the request's typed error value. + * + * @see {@link fail} for completing an entry with a typed error value + * @see {@link complete} for completing an entry with an existing `Exit` + * @see {@link completeEffect} for completing an entry from an effect result + * @see {@link succeed} for completing an entry successfully + * * @category completion + * @since 2.0.0 */ export const failCause = /*#__PURE__*/dual(2, (self, cause) => complete(self, core.exitFailCause(cause))); /** - * @since 2.0.0 + * Completes a request entry successfully with the supplied value. + * + * **When to use** + * + * Use when you need to finish a `Request.Entry` with a successful request + * value. + * + * @see {@link complete} for completing an entry with a prebuilt `Exit` + * @see {@link completeEffect} for completing an entry from an effect result + * @see {@link fail} for completing an entry with a typed failure + * @see {@link failCause} for completing an entry with a failure `Cause` + * * @category completion + * @since 2.0.0 */ export const succeed = /*#__PURE__*/dual(2, (self, value) => complete(self, core.exitSucceed(value))); /** - * @since 2.0.0 + * Creates a `Request.Entry` from its component fields. + * + * **Details** + * + * This is a low-level helper for request runtime and resolver infrastructure; + * most application code receives entries from a `RequestResolver` instead of + * constructing them directly. + * * @category entry + * @since 2.0.0 */ export const makeEntry = options => options; //# sourceMappingURL=Request.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Request.js.map b/.opencode/node_modules/effect/dist/Request.js.map index 8f0ecdebdee330569a626e0a67c69e5909e734b0..e7e595be10dd05b6f740dcaa8f53b5332e1c2b92 100644 --- a/.opencode/node_modules/effect/dist/Request.js.map +++ b/.opencode/node_modules/effect/dist/Request.js.map @@ -1 +1 @@ -{"version":3,"file":"Request.js","names":["Equal","dual","core","internalEffect","hasProperty","TypeId","requestVariance","byReferenceUnsafe","_E","_","_A","_R","RequestPrototype","StructuralProto","isRequest","u","of","args","Object","assign","create","tagged","tag","request","_tag","Class","prototype","TaggedClass","complete","self","result","sync","completeUnsafe","completeEffect","effect","matchEffect","onFailure","error","exitFail","onSuccess","value","exitSucceed","fail","failCause","cause","exitFailCause","succeed","makeEntry","options"],"sources":["../src/Request.ts"],"sourcesContent":[null],"mappings":"AAkBA,OAAO,KAAKA,KAAK,MAAM,YAAY;AAEnC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AACtD,SAASC,WAAW,QAAQ,gBAAgB;AAG5C,MAAMC,MAAM,GAAG,iBAAiB;AA4IhC,MAAMC,eAAe,gBAAGN,KAAK,CAACO,iBAAiB,CAAC;EAC9C;EACAC,EAAE,EAAGC,CAAQ,IAAKA,CAAC;EACnB;EACAC,EAAE,EAAGD,CAAQ,IAAKA,CAAC;EACnB;EACAE,EAAE,EAAGF,CAAQ,I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I,CACN,CAAC,EACD,CAAgB4B,IAAc,EAAEC,MAAiB,KAC/C3B,cAAc,CAAC4B,IAAI,CAAC,MAAMF,IAAI,CAACG,cAAc,CAACF,MAAM,CAAC,CAAC,CACzD;AAED;;;;AAIA,OAAO,MAAMG,cAAc,gBAWvBhC,IAAI,CACN,CAAC,EACD,CAAmB4B,IAAc,EAAEK,MAA8C,KAC/E/B,cAAc,CAACgC,WAAW,CAACD,MAAM,EAAE;EACjCE,SAAS,EAAGC,KAAK,IAAKT,QAAQ,CAACC,IAAI,EAAE3B,IAAI,CAACoC,QAAQ,CAACD,KAAK,CAAQ,CAAC;EACjEE,SAAS,EAAGC,KAAK,IAAKZ,QAAQ,CAACC,IAAI,EAAE3B,IAAI,CAACuC,WAAW,CAACD,KAAK,CAAQ;CACpE,CAAC,CACL;AAED;;;;AAIA,OAAO,MAAME,IAAI,gBAWbzC,IAAI,CACN,CAAC,EACD,CAAgB4B,IAAc,EAAEQ,KAAe,KAA0BT,QAAQ,CAACC,IAAI,EAAE3B,IAAI,CAACoC,QAAQ,CAACD,KAAK,CAAQ,CAAC,CACrH;AAED;;;;AAIA,OAAO,MAAMM,SAAS,gBAWlB1C,IAAI,CACN,CAAC,EACD,CAAgB4B,IAAc,EAAEe,KAA4B,KAC1DhB,QAAQ,CAACC,IAAI,EAAE3B,IAAI,CAAC2C,aAAa,CAACD,KAAK,CAAQ,CAAC,CACnD;AAED;;;;AAIA,OAAO,MAAME,OAAO,gBAWhB7C,IAAI,CACN,CAAC,EACD,CAAgB4B,IAAc,EAAEW,KAAiB,KAC/CZ,QAAQ,CAACC,IAAI,EAAE3B,IAAI,CAACuC,WAAW,CAACD,KAAK,CAAQ,CAAC,CACjD;AAoBD;;;;AAIA,OAAO,MAAMO,SAAS,GAAOC,OAY5B,IAAeA,OAAO","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Request.js","names":["Equal","dual","core","internalEffect","hasProperty","TypeId","requestVariance","byReferenceUnsafe","_E","_","_A","_R","RequestPrototype","StructuralProto","isRequest","u","of","args","Object","assign","create","tagged","tag","request","_tag","Class","prototype","TaggedClass","complete","self","result","sync","completeUnsafe","completeEffect","effect","matchEffect","onFailure","error","exitFail","onSuccess","value","exitSucceed","fail","failCause","cause","exitFailCause","succeed","makeEntry","options"],"sources":["../src/Request.ts"],"sourcesContent":[null],"mappings":"AAcA,OAAO,KAAKA,KAAK,MAAM,YAAY;AAEnC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AACtD,SAASC,WAAW,QAAQ,gBAAgB;AAG5C,MAAMC,MAAM,GAAG,iBAAiB;AA8KhC,MAAMC,eAAe,gBAAGN,KAAK,CAACO,iBAAiB,CAAC;EAC9C;EACAC,EAAE,EAAGC,CAAQ,IAAKA,CAAC;EACnB;EACAC,EAAE,EAAGD,CAAQ,IAAKA,CAAC;EACnB;EACAE,EAAE,EAAGF,CAAQ,IAAKA;CACnB,CAAC;AAEF;;;;;;;;;;;;;AAaA,OAAO,MAAMG,gBAAgB,GAA2B;EACtD,GAAGV,IAAI,CAACW,eAAe;EACvB,CAACR,MAAM,GAAGC;CACX;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,MAAMQ,SAAS,GAAIC,CAAU,IAA8CX,WAAW,CAACW,CAAC,EAAEV,MAAM,CAAC;AAExG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,OAAO,MAAMW,EAAE,GAAGA,CAAA,KAAyDC,IAAI,IAC7EC,MAAM,CAACC,MAAM,CAACD,MAAM,CAACE,MAAM,CAACR,gBAAgB,CAAC,EAAEK,IAAI,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,OAAO,MAAMI,MAAM,GACjBC,GAAc,IAEfL,IAAI,IAAI;EACP,MAAMM,OAAO,GAAGL,MAAM,CAACE,MAAM,CAACR,gBAA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,OAAO,MAAME,IAAI,gBAmCbzC,IAAI,CACN,CAAC,EACD,CAAgB4B,IAAc,EAAEQ,KAAe,KAA0BT,QAAQ,CAACC,IAAI,EAAE3B,IAAI,CAACoC,QAAQ,CAACD,KAAK,CAAQ,CAAC,CACrH;AAED;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMM,SAAS,gBAmClB1C,IAAI,CACN,CAAC,EACD,CAAgB4B,IAAc,EAAEe,KAA4B,KAC1DhB,QAAQ,CAACC,IAAI,EAAE3B,IAAI,CAAC2C,aAAa,CAACD,KAAK,CAAQ,CAAC,CACnD;AAED;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAME,OAAO,gBAmChB7C,IAAI,CACN,CAAC,EACD,CAAgB4B,IAAc,EAAEW,KAAiB,KAC/CZ,QAAQ,CAACC,IAAI,EAAE3B,IAAI,CAACuC,WAAW,CAACD,KAAK,CAAQ,CAAC,CACjD;AA4BD;;;;;;;;;;;;AAYA,OAAO,MAAMO,SAAS,GAAOC,OAY5B,IAAeA,OAAO","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/RequestResolver.d.ts b/.opencode/node_modules/effect/dist/RequestResolver.d.ts index 234041900d7dba47e857b2f57de5c6c703d7cb7e..ee644c98efa6e568eba18c1752d78ad665dc9519 100644 --- a/.opencode/node_modules/effect/dist/RequestResolver.d.ts +++ b/.opencode/node_modules/effect/dist/RequestResolver.d.ts @@ -1,4 +1,12 @@ /** + * Resolves data requests made with `Effect.request`. + * + * A `Request` describes what a fiber needs, while a `RequestResolver` describes + * how to collect request entries, group them into batches, run backend work, + * and complete each waiting entry. This module includes constructors for common + * resolver shapes and tools for controlling batching, grouping, delays, + * tracing, caching, racing, hooks around resolver execution, and persistence. + * * @since 2.0.0 */ import type { NonEmptyArray } from "./Array.ts"; @@ -15,29 +23,26 @@ import type * as Persistable from "./unstable/persistence/Persistable.ts"; import * as Persistence from "./unstable/persistence/Persistence.ts"; declare const TypeId = "~effect/RequestResolver"; /** - * The `RequestResolver` interface requires an environment `R` and handles - * the execution of requests of type `A`. - * - * Implementations must provide a `runAll` method, which processes a collection - * of requests and produces an effect that fulfills these requests. Requests are - * organized into a `Array>`, where the outer `Array` groups requests - * into batches that are executed sequentially, and each inner `Array` contains - * requests that can be executed in parallel. This structure allows - * implementations to analyze all incoming requests collectively and optimize - * query execution accordingly. - * - * Implementations are typically specialized for a subtype of `Request`. - * However, they are not strictly limited to these subtypes as long as they can - * map any given request type to `Request`. Implementations should inspect - * the collection of requests to identify the needed information and execute the - * corresponding queries. It is imperative that implementations resolve all the - * requests they receive. Failing to do so will lead to a `QueryFailure` error - * during query execution. - * - * @example + * A resolver that executes and completes batched `Request` entries. + * + * **Details** + * + * A resolver controls how requests are grouped, delayed, optionally + * pre-checked, and finally run. Its `runAll` method receives a non-empty batch + * of `Request.Entry` values for a single batch key and must complete every + * received entry, usually by calling `completeUnsafe` or one of the `Request` + * completion helpers. + * + * **Gotchas** + * + * If a resolver finishes without completing an entry, the waiting request fails + * because the resolver did not supply a result. + * + * **Example** (Defining a request resolver) + * * ```ts - * import type { Request } from "effect" * import { Effect, Exit, RequestResolver } from "effect" + * import type { Request } from "effect" * * interface GetUserRequest extends Request.Request { * readonly _tag: "GetUserRequest" @@ -54,8 +59,8 @@ declare const TypeId = "~effect/RequestResolver"; * ) * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface RequestResolver extends RequestResolver.Variance, Pipeable { readonly delay: Effect.Effect; @@ -80,13 +85,21 @@ export interface RequestResolver extends RequestResolv runAll(entries: NonEmptyArray>, key: unknown): Effect.Effect>; } /** + * Namespace containing type-level helpers associated with `RequestResolver`. + * * @since 2.0.0 - * @category models */ export declare namespace RequestResolver { /** - * @since 2.0.0 + * Variance marker carried by every `RequestResolver`. + * + * **Details** + * + * This marker preserves the request type accepted by the resolver for + * Effect's type-level machinery. Users normally do not implement it directly. + * * @category models + * @since 2.0.0 */ interface Variance { readonly [TypeId]: { @@ -97,16 +110,44 @@ export declare namespace RequestResolver { /** * Returns `true` if the specified value is a `RequestResolver`, `false` otherwise. * - * @since 2.0.0 + * **When to use** + * + * Use to narrow unknown values before passing them to APIs that require a + * `RequestResolver`. + * + * @see {@link RequestResolver} for the type narrowed by this guard + * * @category guards + * @since 2.0.0 */ export declare const isRequestResolver: (u: unknown) => u is RequestResolver; /** - * Low-level constructor for creating a request resolver with fine-grained + * Creates a request resolver with fine-grained * control over its behavior. * - * @since 4.0.0 + * **When to use** + * + * Use when you need to supply the resolver batching primitives directly, + * including the batch key, optional pre-check, delay effect, collection cutoff, + * and batch runner. + * + * **Details** + * + * `batchKey` groups request entries, `delay` schedules batch execution, + * `collectWhile` can end collection early, and `runAll` receives a non-empty + * batch for one key. + * + * **Gotchas** + * + * Accepted entries must be completed. If `runAll` succeeds with incomplete + * entries, waiting requests fail. If `preCheck` returns `false`, the entry is + * not batched, so it must be completed or linked to another completion path. + * + * @see {@link make} for constructing a resolver from a batch runner + * @see {@link makeGrouped} for constructing a resolver that groups requests by key + * * @category constructors + * @since 4.0.0 */ export declare const makeWith: (options: { readonly batchKey: (request: Request.Entry) => unknown; @@ -118,7 +159,8 @@ export declare const makeWith: (options: { /** * Constructs a request resolver with the specified method to run requests. * - * @example + * **Example** (Creating a request resolver) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -143,16 +185,19 @@ export declare const makeWith: (options: { * const getUserEffect = Effect.request(GetUserRequest({ id: 123 }), UserResolver) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const make: (runAll: (entries: NonEmptyArray>, key: unknown) => Effect.Effect>) => RequestResolver; /** * Constructs a request resolver with the requests grouped by a calculated key. * + * **Details** + * * The key can use the Equal trait to determine if two keys are equal. * - * @example + * **Example** (Grouping requests by key) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -178,8 +223,8 @@ export declare const make: (runAll: (entries: NonEmptyArr * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export declare const makeGrouped: (options: { readonly key: (entry: Request.Entry) => K; @@ -188,7 +233,8 @@ export declare const makeGrouped: (options: { /** * Constructs a request resolver from a pure function. * - * @example + * **Example** (Creating a resolver from a pure function) + * * ```ts * import { Effect, Request, RequestResolver } from "effect" * @@ -211,8 +257,8 @@ export declare const makeGrouped: (options: { * // Will resolve to 25 * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const fromFunction: (f: (entry: Request.Entry) => Request.Success) => RequestResolver; /** @@ -220,7 +266,8 @@ export declare const fromFunction: (f: (entry: Request.En * and returns a list of results of the same size. Each item in the result * list must correspond to the item at the same index in the request list. * - * @example + * **Example** (Batching pure request handling) + * * ```ts * import { Effect, Request, RequestResolver } from "effect" * @@ -242,14 +289,15 @@ export declare const fromFunction: (f: (entry: Request.En * const batchedEffect = Effect.all(effects) // [2, 4, 6] * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const fromFunctionBatched: (f: (entries: NonEmptyArray>) => Iterable>) => RequestResolver; /** * Constructs a request resolver from an effectual function. * - * @example + * **Example** (Creating a resolver from an effectful function) + * * ```ts * import { Effect, Request, RequestResolver } from "effect" * @@ -279,8 +327,8 @@ export declare const fromFunctionBatched: (f: (entries: N * ) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const fromEffect: (f: (entry: Request.Entry) => Effect.Effect, Request.Error>) => RequestResolver; /** @@ -289,10 +337,11 @@ export declare const fromEffect: (f: (entry: Request.Entr * in the result list must correspond to the item at the same index in the * request list. * - * @example + * **Example** (Handling tagged request batches) + * * ```ts - * import type { Request } from "effect" * import { Effect, RequestResolver } from "effect" + * import type { Request } from "effect" * * interface GetUser extends Request.Request { * readonly _tag: "GetUser" @@ -315,8 +364,8 @@ export declare const fromEffect: (f: (entry: Request.Entr * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const fromEffectTagged: ): (self: RequestResolver) => RequestResolver; /** * Sets the batch delay effect for this request resolver. * - * @example + * **Example** (Setting an effectful batch delay) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -421,15 +473,16 @@ export declare const setDelayEffect: { * ) * ``` * - * @since 4.0.0 * @category delay + * @since 4.0.0 */ (self: RequestResolver, delay: Effect.Effect): RequestResolver; }; /** * Sets the batch delay window for this request resolver to the specified duration. * - * @example + * **Example** (Setting a batch delay) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -453,14 +506,15 @@ export declare const setDelayEffect: { * const delayedResolver2 = RequestResolver.setDelay(resolver, 100) * ``` * - * @since 4.0.0 * @category delay + * @since 4.0.0 */ export declare const setDelay: { /** * Sets the batch delay window for this request resolver to the specified duration. * - * @example + * **Example** (Setting a batch delay) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -484,14 +538,15 @@ export declare const setDelay: { * const delayedResolver2 = RequestResolver.setDelay(resolver, 100) * ``` * - * @since 4.0.0 * @category delay + * @since 4.0.0 */ (duration: Duration.Input): (self: RequestResolver) => RequestResolver; /** * Sets the batch delay window for this request resolver to the specified duration. * - * @example + * **Example** (Setting a batch delay) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -515,16 +570,16 @@ export declare const setDelay: { * const delayedResolver2 = RequestResolver.setDelay(resolver, 100) * ``` * - * @since 4.0.0 * @category delay + * @since 4.0.0 */ (self: RequestResolver, duration: Duration.Input): RequestResolver; }; /** - * A request resolver aspect that executes requests between two effects, `before` - * and `after`, where the result of `before` can be used by `after`. + * Wraps request resolver execution between `before` and `after` effects. + * + * **Example** (Running effects around request resolution) * - * @example * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -547,25 +602,26 @@ export declare const setDelay: { * (entries) => * Effect.gen(function*() { * yield* Effect.log(`Starting batch of ${entries.length} requests`) - * return Date.now() + * return entries.length * }), - * (entries, startTime) => + * (entries, initialSize) => * Effect.gen(function*() { - * const duration = Date.now() - startTime - * yield* Effect.log(`Batch completed in ${duration}ms`) + * yield* Effect.log( + * `Batch completed with ${entries.length} requests (started with ${initialSize})` + * ) * }) * ) * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ export declare const around: { /** - * A request resolver aspect that executes requests between two effects, `before` - * and `after`, where the result of `before` can be used by `after`. + * Wraps request resolver execution between `before` and `after` effects. + * + * **Example** (Running effects around request resolution) * - * @example * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -588,25 +644,26 @@ export declare const around: { * (entries) => * Effect.gen(function*() { * yield* Effect.log(`Starting batch of ${entries.length} requests`) - * return Date.now() + * return entries.length * }), - * (entries, startTime) => + * (entries, initialSize) => * Effect.gen(function*() { - * const duration = Date.now() - startTime - * yield* Effect.log(`Batch completed in ${duration}ms`) + * yield* Effect.log( + * `Batch completed with ${entries.length} requests (started with ${initialSize})` + * ) * }) * ) * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ (before: (entries: NonEmptyArray>>) => Effect.Effect>, after: (entries: NonEmptyArray>>, a: A2) => Effect.Effect>): (self: RequestResolver) => RequestResolver; /** - * A request resolver aspect that executes requests between two effects, `before` - * and `after`, where the result of `before` can be used by `after`. + * Wraps request resolver execution between `before` and `after` effects. + * + * **Example** (Running effects around request resolution) * - * @example * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -629,32 +686,53 @@ export declare const around: { * (entries) => * Effect.gen(function*() { * yield* Effect.log(`Starting batch of ${entries.length} requests`) - * return Date.now() + * return entries.length * }), - * (entries, startTime) => + * (entries, initialSize) => * Effect.gen(function*() { - * const duration = Date.now() - startTime - * yield* Effect.log(`Batch completed in ${duration}ms`) + * yield* Effect.log( + * `Batch completed with ${entries.length} requests (started with ${initialSize})` + * ) * }) * ) * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ (self: RequestResolver, before: (entries: NonEmptyArray>>) => Effect.Effect>, after: (entries: NonEmptyArray>>, a: A2) => Effect.Effect>): RequestResolver; }; /** - * A request resolver that never executes requests. + * Creates a request resolver that never executes requests. + * + * **When to use** + * + * Use as a resolver value for request types that are statically impossible and + * should never be issued. + * + * **Gotchas** + * + * If this resolver is used for an actual request, the request waits forever + * unless the fiber is interrupted. + * + * @see {@link make} for constructing a resolver that executes batches and completes request entries * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const never: RequestResolver; /** - * Returns a request resolver that executes at most `n` requests in parallel. + * Returns a request resolver that collects at most `n` requests into each + * batch. + * + * **Details** + * + * When more than `n` requests are waiting for the same resolver and batch key, + * the current batch is run and additional requests are collected into later + * batches. + * + * **Example** (Limiting parallel request batches) * - * @example * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -683,14 +761,22 @@ export declare const never: RequestResolver; * ) * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ export declare const batchN: { /** - * Returns a request resolver that executes at most `n` requests in parallel. + * Returns a request resolver that collects at most `n` requests into each + * batch. + * + * **Details** + * + * When more than `n` requests are waiting for the same resolver and batch key, + * the current batch is run and additional requests are collected into later + * batches. + * + * **Example** (Limiting parallel request batches) * - * @example * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -719,14 +805,22 @@ export declare const batchN: { * ) * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ (n: number): (self: RequestResolver) => RequestResolver; /** - * Returns a request resolver that executes at most `n` requests in parallel. + * Returns a request resolver that collects at most `n` requests into each + * batch. + * + * **Details** + * + * When more than `n` requests are waiting for the same resolver and batch key, + * the current batch is run and additional requests are collected into later + * batches. + * + * **Example** (Limiting parallel request batches) * - * @example * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -755,16 +849,17 @@ export declare const batchN: { * ) * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ (self: RequestResolver, n: number): RequestResolver; }; /** - * Transform a request resolver by grouping requests using the specified key + * Transforms a request resolver by grouping requests using the specified key * function. * - * @example + * **Example** (Grouping resolver requests) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -807,15 +902,16 @@ export declare const batchN: { * ] * ``` * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ export declare const grouped: { /** - * Transform a request resolver by grouping requests using the specified key + * Transforms a request resolver by grouping requests using the specified key * function. * - * @example + * **Example** (Grouping resolver requests) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -858,15 +954,16 @@ export declare const grouped: { * ] * ``` * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ (f: (entry: Request.Entry) => K): (self: RequestResolver) => RequestResolver; /** - * Transform a request resolver by grouping requests using the specified key + * Transforms a request resolver by grouping requests using the specified key * function. * - * @example + * **Example** (Grouping resolver requests) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -909,19 +1006,22 @@ export declare const grouped: { * ] * ``` * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ (self: RequestResolver, f: (entry: Request.Entry) => K): RequestResolver; }; /** - * Returns a new request resolver that executes requests by sending them to this - * request resolver and that request resolver, returning the results from the first data - * source to complete and safely interrupting the loser. + * Returns a request resolver that sends each batch to both resolvers and + * completes with the first resolver to finish. + * + * **Details** * - * The batch delay is determined by the first request resolver. + * The losing resolver run is interrupted after the winning resolver completes + * the batch. + * + * **Example** (Racing request resolvers) * - * @example * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -955,18 +1055,21 @@ export declare const grouped: { * const racingResolver = RequestResolver.race(fastResolver, slowResolver) * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ export declare const race: { /** - * Returns a new request resolver that executes requests by sending them to this - * request resolver and that request resolver, returning the results from the first data - * source to complete and safely interrupting the loser. + * Returns a request resolver that sends each batch to both resolvers and + * completes with the first resolver to finish. * - * The batch delay is determined by the first request resolver. + * **Details** + * + * The losing resolver run is interrupted after the winning resolver completes + * the batch. + * + * **Example** (Racing request resolvers) * - * @example * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -1000,18 +1103,21 @@ export declare const race: { * const racingResolver = RequestResolver.race(fastResolver, slowResolver) * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ (that: RequestResolver): (self: RequestResolver) => RequestResolver; /** - * Returns a new request resolver that executes requests by sending them to this - * request resolver and that request resolver, returning the results from the first data - * source to complete and safely interrupting the loser. + * Returns a request resolver that sends each batch to both resolvers and + * completes with the first resolver to finish. + * + * **Details** + * + * The losing resolver run is interrupted after the winning resolver completes + * the batch. * - * The batch delay is determined by the first request resolver. + * **Example** (Racing request resolvers) * - * @example * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -1045,16 +1151,17 @@ export declare const race: { * const racingResolver = RequestResolver.race(fastResolver, slowResolver) * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ (self: RequestResolver, that: RequestResolver): RequestResolver; }; /** - * Add a tracing span to the request resolver, which will also add any span + * Adds a tracing span to the request resolver, which will also add any span * links from the request's. * - * @example + * **Example** (Adding a tracing span) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -1088,15 +1195,16 @@ export declare const race: { * const effect = Effect.request(GetDataRequest({ id: 123 }), tracedResolver) * ``` * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ export declare const withSpan: { /** - * Add a tracing span to the request resolver, which will also add any span + * Adds a tracing span to the request resolver, which will also add any span * links from the request's. * - * @example + * **Example** (Adding a tracing span) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -1130,15 +1238,16 @@ export declare const withSpan: { * const effect = Effect.request(GetDataRequest({ id: 123 }), tracedResolver) * ``` * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ (name: string, options?: Tracer.SpanOptions | ((entries: NonEmptyArray>) => Tracer.SpanOptions) | undefined): (self: RequestResolver) => RequestResolver; /** - * Add a tracing span to the request resolver, which will also add any span + * Adds a tracing span to the request resolver, which will also add any span * links from the request's. * - * @example + * **Example** (Adding a tracing span) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -1172,8 +1281,8 @@ export declare const withSpan: { * const effect = Effect.request(GetDataRequest({ id: 123 }), tracedResolver) * ``` * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ (self: RequestResolver, name: string, options?: Tracer.SpanOptions | ((entries: NonEmptyArray>) => Tracer.SpanOptions) | undefined): RequestResolver; }; @@ -1181,16 +1290,56 @@ export declare const withSpan: { * Wraps a request resolver in a cache, allowing it to cache results up to a * specified capacity and optional time-to-live. * + * **When to use** + * + * Use to turn a request resolver into a first-class `Cache` when callers need + * cache lookup, refresh, invalidation, or inspection around request results. + * + * **Details** + * + * The request value is the cache key. Cache misses run the resolver via + * `Effect.request`, `timeToLive` receives the request `Exit` and the request, + * and `requireServicesAt` controls whether services are required at lookup time + * or construction time. + * + * **Gotchas** + * + * Cache hits depend on the request value's equality semantics. + * + * @see {@link withCache} for keeping caching behind a resolver used with `Effect.request` + * @see {@link persisted} for storing persistable request results outside process memory + * @see {@link Cache.Cache} for operations available on the returned cache + * + * @category caching * @since 4.0.0 - * @category Caching */ export declare const asCache: { /** * Wraps a request resolver in a cache, allowing it to cache results up to a * specified capacity and optional time-to-live. * + * **When to use** + * + * Use to turn a request resolver into a first-class `Cache` when callers need + * cache lookup, refresh, invalidation, or inspection around request results. + * + * **Details** + * + * The request value is the cache key. Cache misses run the resolver via + * `Effect.request`, `timeToLive` receives the request `Exit` and the request, + * and `requireServicesAt` controls whether services are required at lookup time + * or construction time. + * + * **Gotchas** + * + * Cache hits depend on the request value's equality semantics. + * + * @see {@link withCache} for keeping caching behind a resolver used with `Effect.request` + * @see {@link persisted} for storing persistable request results outside process memory + * @see {@link Cache.Cache} for operations available on the returned cache + * + * @category caching * @since 4.0.0 - * @category Caching */ (options: { readonly capacity: number; @@ -1201,8 +1350,28 @@ export declare const asCache: { * Wraps a request resolver in a cache, allowing it to cache results up to a * specified capacity and optional time-to-live. * + * **When to use** + * + * Use to turn a request resolver into a first-class `Cache` when callers need + * cache lookup, refresh, invalidation, or inspection around request results. + * + * **Details** + * + * The request value is the cache key. Cache misses run the resolver via + * `Effect.request`, `timeToLive` receives the request `Exit` and the request, + * and `requireServicesAt` controls whether services are required at lookup time + * or construction time. + * + * **Gotchas** + * + * Cache hits depend on the request value's equality semantics. + * + * @see {@link withCache} for keeping caching behind a resolver used with `Effect.request` + * @see {@link persisted} for storing persistable request results outside process memory + * @see {@link Cache.Cache} for operations available on the returned cache + * + * @category caching * @since 4.0.0 - * @category Caching */ (self: RequestResolver, options: { readonly capacity: number; @@ -1211,30 +1380,87 @@ export declare const asCache: { }): Effect.Effect, Request.Error, "construction" extends ServiceMode ? never : Request.Services>, never, "construction" extends ServiceMode ? Request.Services : never>; }; /** - * Adds caching capabilities to a request resolver, allowing it to cache - * results up to a specified capacity. + * Adds a bounded in-memory cache to a request resolver. + * + * **When to use** + * + * Use to reuse completed results for repeated equal request values while still + * passing a `RequestResolver` to `Effect.request`. + * + * **Details** * + * Running the returned effect creates the cache and returns a wrapped resolver. + * The cache stores completed success or failure results by request equality up + * to `capacity`. The `strategy` option controls eviction order and defaults to + * `"lru"`; `"fifo"` keeps insertion order. + * + * **Gotchas** + * + * Entries do not expire by time, and completed failures are cached the same as + * successes. Request equality controls cache hits. + * + * @see {@link asCache} for exposing the resolver as a `Cache` with time-to-live and service lookup controls + * @see {@link persisted} for backing persistable requests with the configured persistence store + * + * @category caching * @since 4.0.0 - * @category Caching */ export declare const withCache: { /** - * Adds caching capabilities to a request resolver, allowing it to cache - * results up to a specified capacity. + * Adds a bounded in-memory cache to a request resolver. + * + * **When to use** + * + * Use to reuse completed results for repeated equal request values while still + * passing a `RequestResolver` to `Effect.request`. * + * **Details** + * + * Running the returned effect creates the cache and returns a wrapped resolver. + * The cache stores completed success or failure results by request equality up + * to `capacity`. The `strategy` option controls eviction order and defaults to + * `"lru"`; `"fifo"` keeps insertion order. + * + * **Gotchas** + * + * Entries do not expire by time, and completed failures are cached the same as + * successes. Request equality controls cache hits. + * + * @see {@link asCache} for exposing the resolver as a `Cache` with time-to-live and service lookup controls + * @see {@link persisted} for backing persistable requests with the configured persistence store + * + * @category caching * @since 4.0.0 - * @category Caching */ (options: { readonly capacity: number; readonly strategy?: "lru" | "fifo" | undefined; }): (self: RequestResolver) => Effect.Effect>; /** - * Adds caching capabilities to a request resolver, allowing it to cache - * results up to a specified capacity. + * Adds a bounded in-memory cache to a request resolver. + * + * **When to use** + * + * Use to reuse completed results for repeated equal request values while still + * passing a `RequestResolver` to `Effect.request`. + * + * **Details** + * + * Running the returned effect creates the cache and returns a wrapped resolver. + * The cache stores completed success or failure results by request equality up + * to `capacity`. The `strategy` option controls eviction order and defaults to + * `"lru"`; `"fifo"` keeps insertion order. + * + * **Gotchas** + * + * Entries do not expire by time, and completed failures are cached the same as + * successes. Request equality controls cache hits. + * + * @see {@link asCache} for exposing the resolver as a `Cache` with time-to-live and service lookup controls + * @see {@link persisted} for backing persistable requests with the configured persistence store * + * @category caching * @since 4.0.0 - * @category Caching */ (self: RequestResolver, options: { readonly capacity: number; @@ -1242,13 +1468,51 @@ export declare const withCache: { }): Effect.Effect>; }; /** - * @since 4.0.0 + * Wraps a request resolver with persistent storage for persistable requests. + * + * **When to use** + * + * Use to keep a `RequestResolver` interface while reusing completed + * `Persistable` request results through a `Persistence` store. + * + * **Details** + * + * Cached results are loaded from the configured persistence store before + * running the underlying resolver. Missing entries are resolved normally and + * written back to the store. Entries marked stale by `staleWhileRevalidate` + * receive the stored result and are also resolved again so the refreshed result + * can be written back to the store. Creating the persisted resolver requires + * `Persistence.Persistence` and `Scope`. + * + * @see {@link withCache} for in-memory resolver caching that does not require persistable request values or a persistence store + * @see {@link asCache} for exposing resolver results through a `Cache` instead of returning another resolver + * * @category Persistence + * @since 4.0.0 */ export declare const persisted: { /** - * @since 4.0.0 + * Wraps a request resolver with persistent storage for persistable requests. + * + * **When to use** + * + * Use to keep a `RequestResolver` interface while reusing completed + * `Persistable` request results through a `Persistence` store. + * + * **Details** + * + * Cached results are loaded from the configured persistence store before + * running the underlying resolver. Missing entries are resolved normally and + * written back to the store. Entries marked stale by `staleWhileRevalidate` + * receive the stored result and are also resolved again so the refreshed result + * can be written back to the store. Creating the persisted resolver requires + * `Persistence.Persistence` and `Scope`. + * + * @see {@link withCache} for in-memory resolver caching that does not require persistable request values or a persistence store + * @see {@link asCache} for exposing resolver results through a `Cache` instead of returning another resolver + * * @category Persistence + * @since 4.0.0 */ & Persistable.Any>(options: { readonly storeId: string; @@ -1256,8 +1520,27 @@ export declare const persisted: { readonly staleWhileRevalidate?: ((exit: Request.Result, request: A) => boolean) | undefined; }): (self: RequestResolver) => Effect.Effect, never, Persistence.Persistence | Scope>; /** - * @since 4.0.0 + * Wraps a request resolver with persistent storage for persistable requests. + * + * **When to use** + * + * Use to keep a `RequestResolver` interface while reusing completed + * `Persistable` request results through a `Persistence` store. + * + * **Details** + * + * Cached results are loaded from the configured persistence store before + * running the underlying resolver. Missing entries are resolved normally and + * written back to the store. Entries marked stale by `staleWhileRevalidate` + * receive the stored result and are also resolved again so the refreshed result + * can be written back to the store. Creating the persisted resolver requires + * `Persistence.Persistence` and `Scope`. + * + * @see {@link withCache} for in-memory resolver caching that does not require persistable request values or a persistence store + * @see {@link asCache} for exposing resolver results through a `Cache` instead of returning another resolver + * * @category Persistence + * @since 4.0.0 */ & Persistable.Any>(self: RequestResolver, options: { readonly storeId: string; diff --git a/.opencode/node_modules/effect/dist/RequestResolver.d.ts.map b/.opencode/node_modules/effect/dist/RequestResolver.d.ts.map index db6cdeaa2c7c151a7622333961da5404b330403f..9cdf6e310b4f87c3c38b645cc7348fa1c98d2489 100644 --- a/.opencode/node_modules/effect/dist/RequestResolver.d.ts.map +++ b/.opencode/node_modules/effect/dist/RequestResolver.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"RequestResolver.d.ts","sourceRoot":"","sources":["../src/RequestResolver.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,OAAO,K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,CAAC,WAAW,GAAG,KAAK,CAChC,CAAA;CAkFF,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/RequestResolver.js b/.opencode/node_modules/effect/dist/RequestResolver.js index e75216fb3ef76afbf84aab98f4327e5eb709393f..5b011845b9612453c87e489696d6186d554b8ca6 100644 --- a/.opencode/node_modules/effect/dist/RequestResolver.js +++ b/.opencode/node_modules/effect/dist/RequestResolver.js @@ -26,16 +26,44 @@ const RequestResolverProto = { /** * Returns `true` if the specified value is a `RequestResolver`, `false` otherwise. * - * @since 2.0.0 + * **When to use** + * + * Use to narrow unknown values before passing them to APIs that require a + * `RequestResolver`. + * + * @see {@link RequestResolver} for the type narrowed by this guard + * * @category guards + * @since 2.0.0 */ export const isRequestResolver = u => hasProperty(u, TypeId); /** - * Low-level constructor for creating a request resolver with fine-grained + * Creates a request resolver with fine-grained * control over its behavior. * - * @since 4.0.0 + * **When to use** + * + * Use when you need to supply the resolver batching primitives directly, + * including the batch key, optional pre-check, delay effect, collection cutoff, + * and batch runner. + * + * **Details** + * + * `batchKey` groups request entries, `delay` schedules batch execution, + * `collectWhile` can end collection early, and `runAll` receives a non-empty + * batch for one key. + * + * **Gotchas** + * + * Accepted entries must be completed. If `runAll` succeeds with incomplete + * entries, waiting requests fail. If `preCheck` returns `false`, the entry is + * not batched, so it must be completed or linked to another completion path. + * + * @see {@link make} for constructing a resolver from a batch runner + * @see {@link makeGrouped} for constructing a resolver that groups requests by key + * * @category constructors + * @since 4.0.0 */ export const makeWith = options => { const self = Object.create(RequestResolverProto); @@ -51,7 +79,8 @@ const defaultKey = _request => defaultKeyObject; /** * Constructs a request resolver with the specified method to run requests. * - * @example + * **Example** (Creating a request resolver) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -76,8 +105,8 @@ const defaultKey = _request => defaultKeyObject; * const getUserEffect = Effect.request(GetUserRequest({ id: 123 }), UserResolver) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const make = runAll => makeWith({ batchKey: defaultKey, @@ -88,9 +117,12 @@ export const make = runAll => makeWith({ /** * Constructs a request resolver with the requests grouped by a calculated key. * + * **Details** + * * The key can use the Equal trait to determine if two keys are equal. * - * @example + * **Example** (Grouping requests by key) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -116,8 +148,8 @@ export const make = runAll => makeWith({ * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export const makeGrouped = options => makeWith({ batchKey: hashGroupKey(options.key), @@ -140,7 +172,8 @@ const hashGroupKey = get => { /** * Constructs a request resolver from a pure function. * - * @example + * **Example** (Creating a resolver from a pure function) + * * ```ts * import { Effect, Request, RequestResolver } from "effect" * @@ -163,8 +196,8 @@ const hashGroupKey = get => { * // Will resolve to 25 * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const fromFunction = f => make(entries => Effect.sync(() => { for (let i = 0; i < entries.length; i++) { @@ -177,7 +210,8 @@ export const fromFunction = f => make(entries => Effect.sync(() => { * and returns a list of results of the same size. Each item in the result * list must correspond to the item at the same index in the request list. * - * @example + * **Example** (Batching pure request handling) + * * ```ts * import { Effect, Request, RequestResolver } from "effect" * @@ -199,8 +233,8 @@ export const fromFunction = f => make(entries => Effect.sync(() => { * const batchedEffect = Effect.all(effects) // [2, 4, 6] * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const fromFunctionBatched = f => make(entries => Effect.sync(() => { let i = 0; @@ -212,7 +246,8 @@ export const fromFunctionBatched = f => make(entries => Effect.sync(() => { /** * Constructs a request resolver from an effectual function. * - * @example + * **Example** (Creating a resolver from an effectful function) + * * ```ts * import { Effect, Request, RequestResolver } from "effect" * @@ -242,8 +277,8 @@ export const fromFunctionBatched = f => make(entries => Effect.sync(() => { * ) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const fromEffect = f => { effect.interruptChildrenPatch(); // ensure middleware is registered @@ -269,10 +304,11 @@ export const fromEffect = f => { * in the result list must correspond to the item at the same index in the * request list. * - * @example + * **Example** (Handling tagged request batches) + * * ```ts - * import type { Request } from "effect" * import { Effect, RequestResolver } from "effect" + * import type { Request } from "effect" * * interface GetUser extends Request.Request { * readonly _tag: "GetUser" @@ -295,8 +331,8 @@ export const fromEffect = f => { * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const fromEffectTagged = () => fns => make(entries => { const grouped = new Map(); @@ -329,7 +365,8 @@ export const fromEffectTagged = () => fns => make(entries => { /** * Sets the batch delay effect for this request resolver. * - * @example + * **Example** (Setting an effectful batch delay) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -356,8 +393,8 @@ export const fromEffectTagged = () => fns => make(entries => { * ) * ``` * - * @since 4.0.0 * @category delay + * @since 4.0.0 */ export const setDelayEffect = /*#__PURE__*/dual(2, (self, delay) => makeWith({ ...self, @@ -366,7 +403,8 @@ export const setDelayEffect = /*#__PURE__*/dual(2, (self, delay) => makeWith({ /** * Sets the batch delay window for this request resolver to the specified duration. * - * @example + * **Example** (Setting a batch delay) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -390,18 +428,18 @@ export const setDelayEffect = /*#__PURE__*/dual(2, (self, delay) => makeWith({ * const delayedResolver2 = RequestResolver.setDelay(resolver, 100) * ``` * - * @since 4.0.0 * @category delay + * @since 4.0.0 */ export const setDelay = /*#__PURE__*/dual(2, (self, duration) => makeWith({ ...self, delay: Effect.sleep(duration) })); /** - * A request resolver aspect that executes requests between two effects, `before` - * and `after`, where the result of `before` can be used by `after`. + * Wraps request resolver execution between `before` and `after` effects. + * + * **Example** (Running effects around request resolution) * - * @example * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -424,34 +462,55 @@ export const setDelay = /*#__PURE__*/dual(2, (self, duration) => makeWith({ * (entries) => * Effect.gen(function*() { * yield* Effect.log(`Starting batch of ${entries.length} requests`) - * return Date.now() + * return entries.length * }), - * (entries, startTime) => + * (entries, initialSize) => * Effect.gen(function*() { - * const duration = Date.now() - startTime - * yield* Effect.log(`Batch completed in ${duration}ms`) + * yield* Effect.log( + * `Batch completed with ${entries.length} requests (started with ${initialSize})` + * ) * }) * ) * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ export const around = /*#__PURE__*/dual(3, (self, before, after) => makeWith({ ...self, runAll: (entries, key) => Effect.acquireUseRelease(before(entries), () => self.runAll(entries, key), a => after(entries, a)) })); /** - * A request resolver that never executes requests. + * Creates a request resolver that never executes requests. + * + * **When to use** + * + * Use as a resolver value for request types that are statically impossible and + * should never be issued. + * + * **Gotchas** + * + * If this resolver is used for an actual request, the request waits forever + * unless the fiber is interrupted. + * + * @see {@link make} for constructing a resolver that executes batches and completes request entries * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const never = /*#__PURE__*/make(() => Effect.never); /** - * Returns a request resolver that executes at most `n` requests in parallel. + * Returns a request resolver that collects at most `n` requests into each + * batch. + * + * **Details** + * + * When more than `n` requests are waiting for the same resolver and batch key, + * the current batch is run and additional requests are collected into later + * batches. + * + * **Example** (Limiting parallel request batches) * - * @example * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -480,18 +539,19 @@ export const never = /*#__PURE__*/make(() => Effect.never); * ) * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ export const batchN = /*#__PURE__*/dual(2, (self, n) => makeWith({ ...self, collectWhile: requests => requests.size < n })); /** - * Transform a request resolver by grouping requests using the specified key + * Transforms a request resolver by grouping requests using the specified key * function. * - * @example + * **Example** (Grouping resolver requests) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -534,21 +594,24 @@ export const batchN = /*#__PURE__*/dual(2, (self, n) => makeWith({ * ] * ``` * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ export const grouped = /*#__PURE__*/dual(2, (self, f) => makeWith({ ...self, batchKey: hashGroupKey(f) })); /** - * Returns a new request resolver that executes requests by sending them to this - * request resolver and that request resolver, returning the results from the first data - * source to complete and safely interrupting the loser. + * Returns a request resolver that sends each batch to both resolvers and + * completes with the first resolver to finish. + * + * **Details** + * + * The losing resolver run is interrupted after the winning resolver completes + * the batch. * - * The batch delay is determined by the first request resolver. + * **Example** (Racing request resolvers) * - * @example * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -582,15 +645,16 @@ export const grouped = /*#__PURE__*/dual(2, (self, f) => makeWith({ * const racingResolver = RequestResolver.race(fastResolver, slowResolver) * ``` * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ export const race = /*#__PURE__*/dual(2, (self, that) => make((requests, key) => effect.race(self.runAll(requests, key), that.runAll(requests, key)))); /** - * Add a tracing span to the request resolver, which will also add any span + * Adds a tracing span to the request resolver, which will also add any span * links from the request's. * - * @example + * **Example** (Adding a tracing span) + * * ```ts * import { Effect, Exit, Request, RequestResolver } from "effect" * @@ -624,8 +688,8 @@ export const race = /*#__PURE__*/dual(2, (self, that) => make((requests, key) => * const effect = Effect.request(GetDataRequest({ id: 123 }), tracedResolver) * ``` * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ export const withSpan = /*#__PURE__*/dual(args => isRequestResolver(args[0]), (self, name, options) => makeWith({ ...self, @@ -656,8 +720,28 @@ export const withSpan = /*#__PURE__*/dual(args => isRequestResolver(args[0]), (s * Wraps a request resolver in a cache, allowing it to cache results up to a * specified capacity and optional time-to-live. * + * **When to use** + * + * Use to turn a request resolver into a first-class `Cache` when callers need + * cache lookup, refresh, invalidation, or inspection around request results. + * + * **Details** + * + * The request value is the cache key. Cache misses run the resolver via + * `Effect.request`, `timeToLive` receives the request `Exit` and the request, + * and `requireServicesAt` controls whether services are required at lookup time + * or construction time. + * + * **Gotchas** + * + * Cache hits depend on the request value's equality semantics. + * + * @see {@link withCache} for keeping caching behind a resolver used with `Effect.request` + * @see {@link persisted} for storing persistable request results outside process memory + * @see {@link Cache.Cache} for operations available on the returned cache + * + * @category caching * @since 4.0.0 - * @category Caching */ export const asCache = /*#__PURE__*/dual(2, (self, options) => Cache.makeWith(req => internal.request(req, self), { capacity: options.capacity, @@ -665,11 +749,30 @@ export const asCache = /*#__PURE__*/dual(2, (self, options) => Cache.makeWith(re requireServicesAt: options.requireServicesAt ?? "lookup" })); /** - * Adds caching capabilities to a request resolver, allowing it to cache - * results up to a specified capacity. + * Adds a bounded in-memory cache to a request resolver. + * + * **When to use** + * + * Use to reuse completed results for repeated equal request values while still + * passing a `RequestResolver` to `Effect.request`. + * + * **Details** + * + * Running the returned effect creates the cache and returns a wrapped resolver. + * The cache stores completed success or failure results by request equality up + * to `capacity`. The `strategy` option controls eviction order and defaults to + * `"lru"`; `"fifo"` keeps insertion order. * + * **Gotchas** + * + * Entries do not expire by time, and completed failures are cached the same as + * successes. Request equality controls cache hits. + * + * @see {@link asCache} for exposing the resolver as a `Cache` with time-to-live and service lookup controls + * @see {@link persisted} for backing persistable requests with the configured persistence store + * + * @category caching * @since 4.0.0 - * @category Caching */ export const withCache = /*#__PURE__*/dual(2, (self, options) => Effect.sync(() => { const strategy = options.strategy ?? "lru"; @@ -723,8 +826,27 @@ export const withCache = /*#__PURE__*/dual(2, (self, options) => Effect.sync(() }); })); /** - * @since 4.0.0 + * Wraps a request resolver with persistent storage for persistable requests. + * + * **When to use** + * + * Use to keep a `RequestResolver` interface while reusing completed + * `Persistable` request results through a `Persistence` store. + * + * **Details** + * + * Cached results are loaded from the configured persistence store before + * running the underlying resolver. Missing entries are resolved normally and + * written back to the store. Entries marked stale by `staleWhileRevalidate` + * receive the stored result and are also resolved again so the refreshed result + * can be written back to the store. Creating the persisted resolver requires + * `Persistence.Persistence` and `Scope`. + * + * @see {@link withCache} for in-memory resolver caching that does not require persistable request values or a persistence store + * @see {@link asCache} for exposing resolver results through a `Cache` instead of returning another resolver + * * @category Persistence + * @since 4.0.0 */ export const persisted = /*#__PURE__*/dual(2, /*#__PURE__*/Effect.fnUntraced(function* (self, options) { const store = yield* (yield* Persistence.Persistence).make(options); diff --git a/.opencode/node_modules/effect/dist/RequestResolver.js.map b/.opencode/node_modules/effect/dist/RequestResolver.js.map index c1704acb71883c01921ba6dbeaa7123723a577ac..3bfbf587d70ded54f1c849f24412b63a37afe4fa 100644 --- a/.opencode/node_modules/effect/dist/RequestResolver.js.map +++ b/.opencode/node_modules/effect/dist/RequestResolver.js.map @@ -1 +1 @@ -{"version":3,"file":"RequestResolver.js","names":["Arr","Cache","Context","Effect","Exit","constTrue","dual","identity","exitFail","exitSucceed","effect","internal","Iterable","MutableHashMap","pipeArguments","hasProperty","Tracer","Persistence","TypeId","RequestResolverProto","_A","_R","pipe","arguments","isRequestResolver","u","makeWith","options","self","Object","create","batchKey","preCheck","delay","collectWhile","runAll","defaultKeyObject","defaultKey","_request","make","yieldNow","makeGrouped","hashGroupKey","key","resolver","get","groupKeys","empty","entry","okey","_tag","value","set","fromFunction","f","entries","sync","i","length","completeUnsafe","fromFunctionBatched","result","fromEffect","interruptChildrenPatch","callback","resume","parent","getCurrentFiber","done","fiber","forkUnsafe","addObserver","exit","void","fromEffectTagged","fns","grouped","Map","len","group","request","push","forEach","tag","requests","matchCause","onFailure","cause","onSuccess","res","concurrency","discard","setDelayEffect","setDelay","duration","sleep","around","before","after","acquireUseRelease","a","never","batchN","n","size","race","that","withSpan","args","name","suspend","opts","links","slice","seen","Set","span","getOption","context","ParentSpan","has","add","attributes","batchSize","asCache","req","capacity","timeToLive","requireServicesAt","withCache","strategy","cache","onExit","toRemove","k","keys","remove","ocached","cached","undefined","prevComplete","uninterruptible","persisted","fnUntraced","store","results","getMany","map","_","provideContext","leftover","toPersist","staleWhileRevalidate","isArrayNonEmpty","catchCause","failCause","setMany"],"sources":["../src/RequestResolver.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,IA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,IAAI,CAAC;UACpB,CAAC;UACD8E,QAAQ,CAACrE,IAAI,CAACjC,KAAK,CAAC;UACpB,IAAIwB,IAAI,KAAKmE,SAAS,EAAE;QAC1B;QACA3F,KAAK,CAACW,cAAc,CAACa,IAAW,CAAC;MACnC;MACA,IAAI,CAACxE,GAAG,CAACyJ,eAAe,CAACH,QAAQ,CAAC,EAAE;QAClC;MACF;MACA,OAAOnJ,MAAM,CAACuJ,UAAU,CAAC9H,IAAI,CAACO,MAAM,CAACmH,QAAQ,EAAE3G,GAAG,CAAC,EAAG4C,KAAK,IAAI;QAC7D,KAAK,IAAI9B,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG6F,QAAQ,CAAC5F,MAAM,EAAED,CAAC,EAAE,EAAE;UACxC,MAAMT,KAAK,GAAGsG,QAAQ,CAAC7F,CAAC,CAAC;UACzB,IAAI,CAAC8F,SAAS,CAAC/B,GAAG,CAACxE,KAAK,CAACgC,OAAO,CAAC,EAAE;UACnChC,KAAK,CAACW,cAAc,CAACvD,IAAI,CAACuJ,SAAS,CAACpE,KAAK,CAAQ,CAAC;QACpD;QACA,OAAOpF,MAAM,CAACsE,IAAI;MACpB,CAAC,CAAC;MACF,OAAQuE,KAAK,CAACY,OAAO,CAACL,SAAS,CAAC,CAACjI,IAAI,CACnCnB,MAAM,CAACkJ,cAAc,CAAC9F,OAAO,CAAC,CAAC,CAAC,CAAC+D,OAAO,CAAC,CACA;IAC7C,CAAC;GACF,CAAC;AACJ,CAAC,CAAC,CACH","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"RequestResolver.js","names":["Arr","Cache","Context","Effect","Exit","constTrue","dual","identity","exitFail","exitSucceed","effect","internal","Iterable","MutableHashMap","pipeArguments","hasProperty","Tracer","Persistence","TypeId","RequestResolverProto","_A","_R","pipe","arguments","isRequestResolver","u","makeWith","options","self","Object","create","batchKey","preCheck","delay","collectWhile","runAll","defaultKeyObject","defaultKey","_request","make","yieldNow","makeGrouped","hashGroupKey","key","resolver","get","groupKeys","empty","entry","okey","_tag","value","set","fromFunction","f","entries","sync","i","length","completeUnsafe","fromFunctionBatched","result","fromEffect","interruptChildrenPatch","callback","resume","parent","getCurrentFiber","done","fiber","forkUnsafe","addObserver","exit","void","fromEffectTagged","fns","grouped","Map","len","group","request","push","forEach","tag","requests","matchCause","onFailure","cause","onSuccess","res","concurrency","discard","setDelayEffect","setDelay","duration","sleep","around","before","after","acquireUseRelease","a","never","batchN","n","size","race","that","withSpan","args","name","suspend","opts","links","slice","seen","Set","span","getOption","context","ParentSpan","has","add","attributes","batchSize","asCache","req","capacity","timeToLive","requireServicesAt","withCache","strategy","cache","onExit","toRemove","k","keys","remove","ocached","cached","undefined","prevComplete","uninterruptible","persisted","fnUntraced","store","results","getMany","map","_","provideContext","leftover","toPersist","staleWhileRevalidate","isArrayNonEmpty","catchCause","failCause","setMany"],"sources":["../src/RequestResolver.ts"],"sourcesContent":[null],"mappings":"AAYA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAASC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AACzD,SAASC,QAAQ,EAAEC,WAAW,QAAQ,oBAAoB;AAC1D,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAC9C,OAAO,KAAKC,QAAQ,MAAM,uBAAuB;AACjD,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AACrD,SAAwBC,aAAa,QAAQ,eAAe;AAC5D,SAASC,WAAW,QAAQ,gBAAgB;AAI5C,OAAO,KAAKC,MAAM,MAAM,aAAa;AAGrC,OAAO,KAAKC,WAAW,MAAM,uCAAuC;AAEpE,MAAMC,MAAM,GAAG,yBAAyB;AA6FxC,MAAMC,o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AG,CAAC,EAAG4C,KAAK,IAAI;QAC7D,KAAK,IAAI9B,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG6F,QAAQ,CAAC5F,MAAM,EAAED,CAAC,EAAE,EAAE;UACxC,MAAMT,KAAK,GAAGsG,QAAQ,CAAC7F,CAAC,CAAC;UACzB,IAAI,CAAC8F,SAAS,CAAC/B,GAAG,CAACxE,KAAK,CAACgC,OAAO,CAAC,EAAE;UACnChC,KAAK,CAACW,cAAc,CAACvD,IAAI,CAACuJ,SAAS,CAACpE,KAAK,CAAQ,CAAC;QACpD;QACA,OAAOpF,MAAM,CAACsE,IAAI;MACpB,CAAC,CAAC;MACF,OAAQuE,KAAK,CAACY,OAAO,CAACL,SAAS,CAAC,CAACjI,IAAI,CACnCnB,MAAM,CAACkJ,cAAc,CAAC9F,OAAO,CAAC,CAAC,CAAC,CAAC+D,OAAO,CAAC,CACA;IAC7C,CAAC;GACF,CAAC;AACJ,CAAC,CAAC,CACH","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Resource.d.ts b/.opencode/node_modules/effect/dist/Resource.d.ts index 64fbc012812e02f3ffbf6aa7f60cf2a72e66f03f..5eb53ebb0837ec9897e536cd0ad7e7ac6478c89e 100644 --- a/.opencode/node_modules/effect/dist/Resource.d.ts +++ b/.opencode/node_modules/effect/dist/Resource.d.ts @@ -9,8 +9,18 @@ declare const TypeId: "~effect/Resource"; * A `Resource` is a value loaded into memory that can be refreshed manually or * automatically according to a schedule. * - * @since 2.0.0 + * **When to use** + * + * Use to model a scoped value whose latest acquisition result is kept available + * for repeated reads and can be refreshed manually or on a schedule. + * + * @see {@link manual} for creating a resource refreshed by the caller + * @see {@link auto} for creating a resource refreshed according to a schedule + * @see {@link get} for reading the currently stored acquisition result + * @see {@link refresh} for forcing a new acquisition + * * @category models + * @since 2.0.0 */ export interface Resource extends Pipeable { readonly [TypeId]: typeof TypeId; @@ -18,37 +28,94 @@ export interface Resource extends Pipeable { readonly acquire: Effect.Effect; } /** - * @since 2.0.0 + * Returns `true` if the specified value is a `Resource`. + * + * **When to use** + * + * Use to validate unknown values at runtime boundaries before treating them as + * `Resource` values. + * + * **Details** + * + * This predicate narrows the input to `Resource`. + * * @category guards + * @since 4.0.0 */ export declare const isResource: (u: unknown) => u is Resource; /** * Creates a `Resource` that must be refreshed manually. * - * @since 2.0.0 + * **When to use** + * + * Use when you need manual control over resource refresh timing rather than an + * automatic schedule. + * + * @see {@link auto} for schedule-driven automatic refreshes + * @see {@link refresh} to manually trigger a resource refresh * @category constructors + * @since 2.0.0 */ export declare const manual: (acquire: Effect.Effect) => Effect.Effect, never, Scope.Scope | R>; /** * Creates a `Resource` that refreshes automatically according to the supplied * schedule. * - * @since 2.0.0 + * **When to use** + * + * Use when a resource should refresh in the background according to a schedule + * for the lifetime of its scope. + * + * @see {@link manual} for caller-controlled refresh timing + * @see {@link refresh} to trigger a refresh explicitly + * * @category constructors + * @since 2.0.0 */ export declare const auto: (acquire: Effect.Effect, policy: Schedule.Schedule) => Effect.Effect, never, R | R2 | Scope.Scope>; /** * Retrieves the current value stored in this resource. * - * @since 2.0.0 + * **When to use** + * + * Use to read the value currently cached by a `Resource`. + * + * **Gotchas** + * + * If the resource currently stores a failed acquisition result, the returned + * effect fails with the stored error. + * + * @see {@link refresh} to re-run acquisition and update the stored value before a later read + * * @category getters + * @since 2.0.0 */ export declare const get: (self: Resource) => Effect.Effect; /** - * Refreshes this resource. + * Re-runs this resource's acquisition effect and updates the current value. + * + * **When to use** + * + * Use to force an existing `Resource` to reacquire its value at a + * caller-controlled point. + * + * **Details** + * + * When acquisition succeeds, refreshing replaces the value stored in the + * resource's scoped reference and releases resources associated with the + * previous value. + * + * **Gotchas** + * + * If acquisition fails, the returned effect fails and the previously stored + * result is left as what `get` reads. + * + * @see {@link get} for reading the current stored value + * @see {@link manual} for resources refreshed only by caller action + * @see {@link auto} for schedule-driven automatic refreshes * + * @category resource management * @since 2.0.0 - * @category utils */ export declare const refresh: (self: Resource) => Effect.Effect; export {}; diff --git a/.opencode/node_modules/effect/dist/Resource.d.ts.map b/.opencode/node_modules/effect/dist/Resource.d.ts.map index f1651b756b64fbb0780dcde15e32148b6cd0b62b..77980636001aacefb50fb675da516b7371015579 100644 --- a/.opencode/node_modules/effect/dist/Resource.d.ts.map +++ b/.opencode/node_modules/effect/dist/Resource.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Resource.d.ts","sourceRoot":"","sources":["../src/Resource.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAGjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAE3C,QAAA,MAAM,MAAM,EAAG,kBAA2B,CAAA;AAE1C;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAE,SAAQ,QAAQ;IACpE,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;IAChC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IACxD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CACtC;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,OAAO,CAEX,CAAA;AAsB5D;;;;;GAKG;AACH,eAAO,MAAM,MAAM,GAAI,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C/B,QAAQ,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,KAC9C,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,KAAK,CAIzD,CAAA;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,GAAG,GAAI,CAAC,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,KAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CACV,CAAA;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,KAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CACH,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Resource.js b/.opencode/node_modules/effect/dist/Resource.js index 8e803ff09fbb4154189276a6521e7c7def37c4d7..7963170fbd6b660eaf6d763f2ae2621df6e3d914 100644 --- a/.opencode/node_modules/effect/dist/Resource.js +++ b/.opencode/node_modules/effect/dist/Resource.js @@ -1,4 +1,11 @@ /** + * Stores refreshable scoped values. + * + * A `Resource` keeps the latest successful or failed acquisition result. + * It can be read repeatedly, refreshed manually, or refreshed automatically on a + * schedule. Resource acquisition runs in a scope, so replacements and final + * cleanup release the resources owned by previous values. + * * @since 2.0.0 */ import * as Context from "./Context.js"; @@ -10,8 +17,19 @@ import { hasProperty } from "./Predicate.js"; import * as ScopedRef from "./ScopedRef.js"; const TypeId = "~effect/Resource"; /** - * @since 2.0.0 + * Returns `true` if the specified value is a `Resource`. + * + * **When to use** + * + * Use to validate unknown values at runtime boundaries before treating them as + * `Resource` values. + * + * **Details** + * + * This predicate narrows the input to `Resource`. + * * @category guards + * @since 4.0.0 */ export const isResource = u => hasProperty(u, TypeId); const Proto = { @@ -32,8 +50,15 @@ const makeUnsafe = (scopedRef, acquire) => { /** * Creates a `Resource` that must be refreshed manually. * - * @since 2.0.0 + * **When to use** + * + * Use when you need manual control over resource refresh timing rather than an + * automatic schedule. + * + * @see {@link auto} for schedule-driven automatic refreshes + * @see {@link refresh} to manually trigger a resource refresh * @category constructors + * @since 2.0.0 */ export const manual = acquire => Effect.contextWith(context => { const providedAcquire = Effect.updateContext(acquire, input => Context.merge(context, input)); @@ -43,22 +68,61 @@ export const manual = acquire => Effect.contextWith(context => { * Creates a `Resource` that refreshes automatically according to the supplied * schedule. * - * @since 2.0.0 + * **When to use** + * + * Use when a resource should refresh in the background according to a schedule + * for the lifetime of its scope. + * + * @see {@link manual} for caller-controlled refresh timing + * @see {@link refresh} to trigger a refresh explicitly + * * @category constructors + * @since 2.0.0 */ export const auto = (acquire, policy) => Effect.tap(manual(acquire), self => Effect.forkScoped(Effect.repeat(refresh(self), policy))); /** * Retrieves the current value stored in this resource. * - * @since 2.0.0 + * **When to use** + * + * Use to read the value currently cached by a `Resource`. + * + * **Gotchas** + * + * If the resource currently stores a failed acquisition result, the returned + * effect fails with the stored error. + * + * @see {@link refresh} to re-run acquisition and update the stored value before a later read + * * @category getters + * @since 2.0.0 */ export const get = self => Effect.flatMap(ScopedRef.get(self.scopedRef), identity); /** - * Refreshes this resource. + * Re-runs this resource's acquisition effect and updates the current value. + * + * **When to use** + * + * Use to force an existing `Resource` to reacquire its value at a + * caller-controlled point. + * + * **Details** + * + * When acquisition succeeds, refreshing replaces the value stored in the + * resource's scoped reference and releases resources associated with the + * previous value. + * + * **Gotchas** + * + * If acquisition fails, the returned effect fails and the previously stored + * result is left as what `get` reads. + * + * @see {@link get} for reading the current stored value + * @see {@link manual} for resources refreshed only by caller action + * @see {@link auto} for schedule-driven automatic refreshes * + * @category resource management * @since 2.0.0 - * @category utils */ export const refresh = self => ScopedRef.set(self.scopedRef, Effect.map(self.acquire, Exit.succeed)); //# sourceMappingURL=Resource.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Resource.js.map b/.opencode/node_modules/effect/dist/Resource.js.map index 3d4c494f1ca8d41530b6689870a6a1875a50cc43..136bfcd36108e912cd26675dc0c890c2493a5b6e 100644 --- a/.opencode/node_modules/effect/dist/Resource.js.map +++ b/.opencode/node_modules/effect/dist/Resource.js.map @@ -1 +1 @@ -{"version":3,"file":"Resource.js","names":["Context","Effect","Exit","identity","PipeInspectableProto","hasProperty","ScopedRef","TypeId","isResource","u","Proto","toJSON","_id","makeUnsafe","scopedRef","acquire","self","Object","create","manual","contextWith","context","providedAcquire","updateContext","input","merge","map","fromAcquire","exit","auto","policy","tap","forkScoped","repeat","refresh","get","flatMap","set","succeed"],"sources":["../src/Resource.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAASC,QAAQ,QAAQ,eAAe;AACxC,SAASC,oBAAoB,QAAQ,oBAAoB;AAEzD,SAASC,WAAW,QAAQ,gBAAgB;AAG5C,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C,MAAMC,MAAM,GAAG,kBAA2B;AAe1C;;;;AAIA,OAAO,MAAMC,UAAU,GACrBC,CAAU,IAC0BJ,WAAW,CAACI,CAAC,EAAEF,MAAM,CAAC;AAE5D,MAAMG,KAAK,GAAG;EACZ,GAAGN,oBAAoB;EACvB,CAACG,MAAM,GAAGA,MAAM;EAChBI,MAAMA,CAAA;IACJ,OAAO;MACLC,GAAG,EAAE;KACN;EACH;CACD;AAED,MAAMC,UAAU,GAAGA,CACjBC,SAA+C,EAC/CC,OAA4B,KACV;EAClB,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACR,KAAK,CAAC;EACjCM,IAAI,CAACF,SAAS,GAAGA,SAAS;EAC1BE,IAAI,CAACD,OAAO,GAAGA,OAAO;EACtB,OAAOC,IAAI;AACb,CAAC;AAED;;;;;;AAMA,OAAO,MAAMG,MAAM,GACjBJ,OAA+B,IAE/Bd,MAAM,CAACmB,WAAW,CAAEC,OAA2B,IAAI;EACjD,MAAMC,eAAe,GAAGrB,MAAM,CAACsB,aAAa,CAC1CR,OAAO,EACNS,KAA6B,IAAKxB,OAAO,CAACyB,KAAK,CAACJ,OAAO,EAAEG,KAAK,CAAC,CACjE;EACD,OAAOvB,MAAM,CAACyB,GAAG,CACfpB,SAAS,CAACqB,WAAW,CAAC1B,MAAM,CAAC2B,IAAI,CAACN,eAAe,CAAC,CAAC,EAClDR,SAAS,IAAKD,UAAU,CAACC,SAAS,EAAEQ,eAAe,CAAC,CACtD;AACH,CAAC,CAAC;AAEJ;;;;;;;AAOA,OAAO,MAAMO,IAAI,GAAGA,CAClBd,OAA+B,EAC/Be,MAA+C,KAE/C7B,MAAM,CAAC8B,GAAG,CACRZ,MAAM,CAACJ,OAAO,CAAC,EACdC,IAAI,IAAKf,MAAM,CAAC+B,UAAU,CAAC/B,MAAM,CAACgC,MAAM,CAACC,OAAO,CAAClB,IAAI,CAAC,EAAEc,MAAM,CAAC,CAAC,CAClE;AAEH;;;;;;AAMA,OAAO,MAAMK,GAAG,GAAUnB,IAAoB,IAC5Cf,MAAM,CAACmC,OAAO,CAAC9B,SAAS,CAAC6B,GAAG,CAACnB,IAAI,CAACF,SAAS,CAAC,EAAEX,QAAQ,CAAC;AAEzD;;;;;;AAMA,OAAO,MAAM+B,OAAO,GAAUlB,IAAoB,IAChDV,SAAS,CAAC+B,GAAG,CAACrB,IAAI,CAACF,SAAS,EAAEb,MAAM,CAACyB,GAAG,CAACV,IAAI,CAACD,OAAO,EAAEb,IAAI,CAACoC,OAAO,CAAC,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Resource.js","names":["Context","Effect","Exit","identity","PipeInspectableProto","hasProperty","ScopedRef","TypeId","isResource","u","Proto","toJSON","_id","makeUnsafe","scopedRef","acquire","self","Object","create","manual","contextWith","context","providedAcquire","updateContext","input","merge","map","fromAcquire","exit","auto","policy","tap","forkScoped","repeat","refresh","get","flatMap","set","succeed"],"sources":["../src/Resource.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;AAUA,OAAO,KAAKA,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAASC,QAAQ,QAAQ,eAAe;AACxC,SAASC,oBAAoB,QAAQ,oBAAoB;AAEzD,SAASC,WAAW,QAAQ,gBAAgB;AAG5C,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C,MAAMC,MAAM,GAAG,kBAA2B;AAyB1C;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,UAAU,GACrBC,CAAU,IAC0BJ,WAAW,CAACI,CAAC,EAAEF,MAAM,CAAC;AAE5D,MAAMG,KAAK,GAAG;EACZ,GAAGN,oBAAoB;EACvB,CAACG,MAAM,GAAGA,MAAM;EAChBI,MAAMA,CAAA;IACJ,OAAO;MACLC,GAAG,EAAE;KACN;EACH;CACD;AAED,MAAMC,UAAU,GAAGA,CACjBC,SAA+C,EAC/CC,OAA4B,KACV;EAClB,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACR,KAAK,CAAC;EACjCM,IAAI,CAACF,SAAS,GAAGA,SAAS;EAC1BE,IAAI,CAACD,OAAO,GAAGA,OAAO;EACtB,OAAOC,IAAI;AACb,CAAC;AAED;;;;;;;;;;;;;AAaA,OAAO,MAAMG,MAAM,GACjBJ,OAA+B,IAE/Bd,MAAM,CAACmB,WAAW,CAAEC,OAA2B,IAAI;EACjD,MAAMC,eAAe,GAAGrB,MAAM,CAACsB,aAAa,CAC1CR,OAAO,EACNS,KAA6B,IAAKxB,OAAO,CAACyB,KAAK,CAACJ,OAAO,EAAEG,KAAK,CAAC,CACjE;EACD,OAAOvB,MAAM,CAACyB,GAAG,CACfpB,SAAS,CAACqB,WAAW,CAAC1B,MAAM,CAAC2B,IAAI,CAACN,eAAe,CAAC,CAAC,EAClDR,SAAS,IAAKD,UAAU,CAACC,SAAS,EAAEQ,eAAe,CAAC,CACtD;AACH,CAAC,CAAC;AAEJ;;;;;;;;;;;;;;;AAeA,OAAO,MAAMO,IAAI,GAAGA,CAClBd,OAA+B,EAC/Be,MAA+C,KAE/C7B,MAAM,CAAC8B,GAAG,CACRZ,MAAM,CAACJ,OAAO,CAAC,EACdC,IAAI,IAAKf,MAAM,CAAC+B,UAAU,CAAC/B,MAAM,CAACgC,MAAM,CAACC,OAAO,CAAClB,IAAI,CAAC,EAAEc,MAAM,CAAC,CAAC,CAClE;AAEH;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMK,GAAG,GAAUnB,IAAoB,IAC5Cf,MAAM,CAACmC,OAAO,CAAC9B,SAAS,CAAC6B,GAAG,CAACnB,IAAI,CAACF,SAAS,CAAC,EAAEX,QAAQ,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAM+B,OAAO,GAAUlB,IAAoB,IAChDV,SAAS,CAAC+B,GAAG,CAACrB,IAAI,CAACF,SAAS,EAAEb,MAAM,CAACyB,GAAG,CAACV,IAAI,CAACD,OAAO,EAAEb,IAAI,CAACoC,OAAO,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Result.d.ts b/.opencode/node_modules/effect/dist/Result.d.ts index 7883c26f1ed28ef9cdb32716af404d9dbb55f2e0..5e1d36a7f7e33701223d58abb7c9620c0cca6c6a 100644 --- a/.opencode/node_modules/effect/dist/Result.d.ts +++ b/.opencode/node_modules/effect/dist/Result.d.ts @@ -1,73 +1,14 @@ /** - * A synchronous, pure type for representing computations that can succeed - * (`Success`) or fail (`Failure`). Unlike `Effect`, `Result` is - * evaluated eagerly and carries no side effects. - * - * **Mental model** - * - * - `Result` is a discriminated union: `Success | Failure` - * - `Success` wraps a value of type `A`, accessed via `.success` - * - `Failure` wraps an error of type `E`, accessed via `.failure` - * - `Result` is a monad: chain operations with {@link flatMap}, compose pipelines with `pipe` - * - All operations are pure and return new `Result` values; the input is never mutated - * - `Result` is yieldable in `Effect.gen`, producing the inner value or short-circuiting on failure - * - * **Common tasks** - * - * - Create from a value: {@link succeed}, {@link fail} - * - Create from nullable: {@link fromNullishOr} - * - Create from Option: {@link fromOption} - * - Create from throwing code: {@link try_ try} - * - Create from predicate: {@link liftPredicate} - * - Transform: {@link map}, {@link mapError}, {@link mapBoth} - * - Unwrap: {@link getOrElse}, {@link getOrNull}, {@link getOrUndefined}, {@link getOrThrow} - * - Pattern match: {@link match} - * - Sequence: {@link flatMap}, {@link andThen}, {@link all} - * - Recover: {@link orElse} - * - Filter: {@link filterOrFail} - * - Convert to Option: {@link getSuccess}, {@link getFailure} - * - Generator syntax: {@link gen} - * - Do notation: {@link Do}, {@link bind}, {@link let_ let} - * - Check variant: {@link isResult}, {@link isSuccess}, {@link isFailure} - * - * **Gotchas** - * - * - `E` defaults to `never`, so `Result` means a result that cannot fail - * - {@link andThen} accepts a `Result`, a function returning a `Result`, a plain value, or a function returning a plain value; {@link flatMap} only accepts a function returning a `Result` - * - {@link all} short-circuits on the first `Failure` and returns it; later elements are not inspected - * - {@link getOrThrow} throws the raw failure value `E`; use {@link getOrThrowWith} for custom error objects - * - {@link tap} runs a side-effect but does not change the result; its return value is ignored - * - * **Quickstart** - * - * **Example** (Parsing and validating with Result) + * Models a value that has already succeeded or failed. * - * ```ts - * import { Result } from "effect" - * - * const parse = (input: string): Result.Result => - * isNaN(Number(input)) - * ? Result.fail("not a number") - * : Result.succeed(Number(input)) - * - * const ensurePositive = (n: number): Result.Result => - * n > 0 ? Result.succeed(n) : Result.fail("not positive") - * - * const result = Result.flatMap(parse("42"), ensurePositive) - * - * console.log(Result.getOrElse(result, (err) => `Error: ${err}`)) - * // Output: 42 - * ``` - * - * **See also** - * - * - {@link succeed} / {@link fail} to create values - * - {@link match} to fold both branches - * - {@link gen} for generator-based composition + * A `Result` is `Success` when a value is available and + * `Failure` when an error is available. It is plain data, so inspecting + * or transforming it does not run side effects. This module includes helpers + * for creating, checking, mapping, combining, and extracting results, plus + * conversions to and from `Option` and nullable values. * * @since 4.0.0 */ -import type { Yieldable } from "./Effect.ts"; import * as Equivalence from "./Equivalence.ts"; import type { LazyArg } from "./Function.ts"; import type { TypeLambda } from "./HKT.ts"; @@ -82,18 +23,19 @@ declare const TypeId = "~effect/data/Result"; /** * A value that is either `Success` or `Failure`. * + * **When to use** + * + * Use when both success and failure should remain available as data and + * `Option` would lose failure information. + * + * **Details** + * * - Use {@link succeed} / {@link fail} to construct * - Use {@link match} to fold both branches * - Use {@link isSuccess} / {@link isFailure} to narrow the type * * `E` defaults to `never`, so `Result` means a result that cannot fail. * - * **Previously Known As** - * - * This API replaces the following from Effect 3.x: - * - * - `Either` - * * **Example** (Creating and matching a Result) * * ```ts @@ -114,13 +56,15 @@ declare const TypeId = "~effect/data/Result"; * @see {@link match} to fold both branches * @see {@link isSuccess} / {@link isFailure} for type guards * - * @category Models + * @category models * @since 4.0.0 */ export type Result = Success | Failure; /** * The failure variant of {@link Result}. Wraps an error of type `E`. * + * **Details** + * * - Access the error via the `.failure` property * - Use {@link isFailure} to narrow a `Result` to `Failure` * - Create with {@link fail} @@ -142,10 +86,10 @@ export type Result = Success | Failure; * @see {@link isFailure} to narrow the type * @see {@link Success} for the other variant * - * @category Models + * @category models * @since 4.0.0 */ -export interface Failure extends Pipeable, Inspectable, Yieldable, A, E> { +export interface Failure extends Pipeable, Inspectable { readonly _tag: "Failure"; readonly _op: "Failure"; readonly failure: E; @@ -153,13 +97,33 @@ export interface Failure extends Pipeable, Inspectable, Yieldable< readonly _A: Covariant; readonly _E: Covariant; }; + [Symbol.iterator](): ResultIterator>; [Unify.typeSymbol]?: unknown; [Unify.unifySymbol]?: ResultUnify; [Unify.ignoreSymbol]?: ResultUnifyIgnore; } +/** + * Iterator protocol used to yield a `Result` inside {@link gen}, returning the + * success value type back to the generator. + * + * **When to use** + * + * Use when defining or typing `[Symbol.iterator]()` for `Result` values so + * `yield*` can pass the success value type back into `Result.gen`. + * + * @see {@link gen} for writing generator-based `Result` code that consumes this iterator protocol + * + * @category generators + * @since 4.0.0 + */ +export interface ResultIterator> { + next(...args: ReadonlyArray): IteratorResult>; +} /** * The success variant of {@link Result}. Wraps a value of type `A`. * + * **Details** + * * - Access the value via the `.success` property * - Use {@link isSuccess} to narrow a `Result` to `Success` * - Create with {@link succeed} @@ -181,10 +145,10 @@ export interface Failure extends Pipeable, Inspectable, Yieldable< * @see {@link isSuccess} to narrow the type * @see {@link Failure} for the other variant * - * @category Models + * @category models * @since 4.0.0 */ -export interface Success extends Pipeable, Inspectable, Yieldable, A, E> { +export interface Success extends Pipeable, Inspectable { readonly _tag: "Success"; readonly _op: "Success"; readonly success: A; @@ -192,6 +156,7 @@ export interface Success extends Pipeable, Inspectable, Yieldable< readonly _A: Covariant; readonly _E: Covariant; }; + [Symbol.iterator](): ResultIterator>; [Unify.typeSymbol]?: unknown; [Unify.unifySymbol]?: ResultUnify; [Unify.ignoreSymbol]?: ResultUnifyIgnore; @@ -199,10 +164,12 @@ export interface Success extends Pipeable, Inspectable, Yieldable< /** * Type-level utility for unifying `Result` types in generic contexts. * + * **Details** + * * This is an internal interface used by the Effect type system. You typically * do not need to reference it directly. * - * @category Models + * @category models * @since 4.0.0 */ export interface ResultUnify * ``` * - * @category Type Level * @since 4.0.0 */ export declare namespace Result { /** * Extracts the failure type `E` from `Result`. * - * @since 4.0.0 * @category Type Level + * @since 4.0.0 */ type Failure> = [T] extends [Result] ? _E : never; /** * Extracts the success type `A` from `Result`. * - * @since 4.0.0 * @category Type Level + * @since 4.0.0 */ type Success> = [T] extends [Result] ? _A : never; } /** * Creates a `Result` holding a `Success` value. * + * **Details** + * * - Use when you have a value and want to lift it into the `Result` type * - The error type `E` defaults to `never` - * - Does not mutate input; allocates a new `Success` wrapper - * - * **Previously Known As** - * - * This API replaces the following from Effect 3.x: - * - * - `Either.right` * * **Example** (Wrapping a value) * @@ -296,24 +261,22 @@ export declare namespace Result { * ``` * * @see {@link fail} to create a Failure - * @see {@link void} for a pre-built `Success` + * @see {@link void_ void} for a pre-built `Success` * - * @category Constructors + * @category constructors * @since 4.0.0 */ export declare const succeed: (right: A) => Result; /** * Creates a `Result` holding a `Failure` value. * - * - Use when you want to represent a failed computation - * - The success type `A` defaults to `never` - * - Does not mutate input; allocates a new `Failure` wrapper + * **When to use** * - * **Previously Known As** + * Use to represent a failed `Result` with a typed failure value. * - * This API replaces the following from Effect 3.x: + * **Details** * - * - `Either.left` + * - The success type `A` defaults to `never` * * **Example** (Creating a failure) * @@ -329,17 +292,24 @@ export declare const succeed: (right: A) => Result; * @see {@link succeed} to create a Success * @see {@link mapError} to transform the error * - * @category Constructors + * @category constructors * @since 4.0.0 */ export declare const fail: (left: E) => Result; declare const void_: Result; export { /** - * A pre-built `Result` holding `undefined` as its success value. + * Provides a pre-built successful `Result` that carries `undefined`. + * + * **When to use** + * + * Use when you need a successful `Result` value that signals completion + * without carrying meaningful data. * - * - Use when you need a `Result` that represents "completed with no meaningful value" - * - Equivalent to `Result.succeed(undefined)` but avoids an extra allocation + * **Details** + * + * This is equivalent to `Result.succeed(undefined)`, but reuses a shared + * `Success` wrapper instead of allocating one each time. * * **Example** (Using void result) * @@ -352,27 +322,53 @@ export { * // Output: true * ``` * - * @see {@link succeed} + * @see {@link succeed} to create a Success with a specific value * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 3.13.0 */ void_ as void }; /** - * A pre-built `Result` holding `undefined` as its failure value. + * Provides a pre-built failed `Result` whose failure value is `undefined`. * - * - Use when you need a `Result` that represents "failed with no meaningful value" - * - Equivalent to `Result.fail(undefined)` but avoids an extra allocation + * **When to use** * - * @see {@link fail} + * Use when you need a failed `Result` value that acts only as a control signal + * without failure data. * - * @category Constructors + * **Details** + * + * This is equivalent to `Result.fail(undefined)` with type + * `Result`, but reuses a shared `Failure` wrapper instead of + * allocating one each time. + * + * **Example** (Using a failure without a payload) + * + * ```ts + * import { Result } from "effect" + * + * const result = Result.failVoid + * + * console.log(Result.isFailure(result)) + * // Output: true + * ``` + * + * @see {@link fail} to create a Failure with a specific value + * + * @category constructors * @since 4.0.0 */ export declare const failVoid: Result; /** * Converts a possibly `null` or `undefined` value into a `Result`. * + * **When to use** + * + * Use when you need `null` or `undefined` input to become a `Failure` while + * present values remain available as `Success`. + * + * **Details** + * * - Non-nullish values become `Success>` * - `null` or `undefined` becomes `Failure` using the provided function * - Supports both data-first and data-last (piped) usage @@ -393,13 +389,20 @@ export declare const failVoid: Result; * @see {@link fromOption} to convert from an Option * @see {@link succeed} / {@link fail} for direct construction * - * @category Constructors + * @category constructors * @since 4.0.0 */ export declare const fromNullishOr: { /** * Converts a possibly `null` or `undefined` value into a `Result`. * + * **When to use** + * + * Use when you need `null` or `undefined` input to become a `Failure` while + * present values remain available as `Success`. + * + * **Details** + * * - Non-nullish values become `Success>` * - `null` or `undefined` becomes `Failure` using the provided function * - Supports both data-first and data-last (piped) usage @@ -420,13 +423,20 @@ export declare const fromNullishOr: { * @see {@link fromOption} to convert from an Option * @see {@link succeed} / {@link fail} for direct construction * - * @category Constructors + * @category constructors * @since 4.0.0 */ (onNullish: (a: A) => E): (self: A) => Result, E>; /** * Converts a possibly `null` or `undefined` value into a `Result`. * + * **When to use** + * + * Use when you need `null` or `undefined` input to become a `Failure` while + * present values remain available as `Success`. + * + * **Details** + * * - Non-nullish values become `Success>` * - `null` or `undefined` becomes `Failure` using the provided function * - Supports both data-first and data-last (piped) usage @@ -447,7 +457,7 @@ export declare const fromNullishOr: { * @see {@link fromOption} to convert from an Option * @see {@link succeed} / {@link fail} for direct construction * - * @category Constructors + * @category constructors * @since 4.0.0 */ (self: A, onNullish: (a: A) => E): Result, E>; @@ -455,6 +465,13 @@ export declare const fromNullishOr: { /** * Converts an `Option` into a `Result`. * + * **When to use** + * + * Use when an existing `Option` should become a `Result`, preserving `Some` as + * success and turning `None` into a caller-provided failure. + * + * **Details** + * * - `Some` becomes `Success` * - `None` becomes `Failure` using the provided function * - Supports both data-first and data-last (piped) usage @@ -473,16 +490,24 @@ export declare const fromNullishOr: { * // Output: { _tag: "Failure", failure: "missing", ... } * ``` * - * @see {@link getSuccess} / {@link getFailure} to convert back to Option - * @see {@link fromNullishOr} to convert from nullable values + * @see {@link getSuccess} to extract the success value as an Option + * @see {@link getFailure} to extract the failure value as an Option + * @see {@link fromNullishOr} to build a Result from nullable values * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 2.0.0 */ export declare const fromOption: { /** * Converts an `Option` into a `Result`. * + * **When to use** + * + * Use when an existing `Option` should become a `Result`, preserving `Some` as + * success and turning `None` into a caller-provided failure. + * + * **Details** + * * - `Some` becomes `Success` * - `None` becomes `Failure` using the provided function * - Supports both data-first and data-last (piped) usage @@ -501,16 +526,24 @@ export declare const fromOption: { * // Output: { _tag: "Failure", failure: "missing", ... } * ``` * - * @see {@link getSuccess} / {@link getFailure} to convert back to Option - * @see {@link fromNullishOr} to convert from nullable values + * @see {@link getSuccess} to extract the success value as an Option + * @see {@link getFailure} to extract the failure value as an Option + * @see {@link fromNullishOr} to build a Result from nullable values * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 2.0.0 */ (onNone: () => E): (self: Option) => Result; /** * Converts an `Option` into a `Result`. * + * **When to use** + * + * Use when an existing `Option` should become a `Result`, preserving `Some` as + * success and turning `None` into a caller-provided failure. + * + * **Details** + * * - `Some` becomes `Success` * - `None` becomes `Failure` using the provided function * - Supports both data-first and data-last (piped) usage @@ -529,11 +562,12 @@ export declare const fromOption: { * // Output: { _tag: "Failure", failure: "missing", ... } * ``` * - * @see {@link getSuccess} / {@link getFailure} to convert back to Option - * @see {@link fromNullishOr} to convert from nullable values + * @see {@link getSuccess} to extract the success value as an Option + * @see {@link getFailure} to extract the failure value as an Option + * @see {@link fromNullishOr} to build a Result from nullable values * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 2.0.0 */ (self: Option, onNone: () => E): Result; }; @@ -546,7 +580,9 @@ declare const try_: { }; export { /** - * Wraps a synchronous computation that may throw into a `Result`. + * Wraps a synchronous computation that may throw into a `Result` safely. + * + * **Details** * * - If the function returns normally, the result is `Success` * - If the function throws, the exception is caught and becomes `Failure` @@ -573,14 +609,19 @@ export { * @see {@link succeed} / {@link fail} for direct construction * @see {@link fromNullishOr} for nullable values * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 2.0.0 */ try_ as try }; /** - * Tests whether a value is a `Result` (either `Success` or `Failure`). + * Checks whether a value is a `Result` (either `Success` or `Failure`). + * + * **When to use** + * + * Use to validate unknown input before operating on it as a `Result`. + * + * **Details** * - * - Use to validate unknown input before operating on it as a `Result` * - Returns `true` for both `Success` and `Failure` variants * - Acts as a TypeScript type guard, narrowing to `Result` * @@ -598,13 +639,19 @@ try_ as try }; * * @see {@link isSuccess} / {@link isFailure} to narrow to a specific variant * - * @category Type Guards + * @category guards * @since 4.0.0 */ export declare const isResult: (input: unknown) => input is Result; /** * Checks whether a `Result` is a `Failure`. * + * **When to use** + * + * Use to narrow a known `Result` to the `Failure` variant. + * + * **Details** + * * - Acts as a TypeScript type guard, narrowing to `Failure` * - After narrowing, you can access `.failure` to read the error value * @@ -624,13 +671,19 @@ export declare const isResult: (input: unknown) => input is Result(self: Result) => self is Failure; /** * Checks whether a `Result` is a `Success`. * + * **When to use** + * + * Use to narrow a known `Result` to the `Success` variant. + * + * **Details** + * * - Acts as a TypeScript type guard, narrowing to `Success` * - After narrowing, you can access `.success` to read the value * @@ -650,16 +703,22 @@ export declare const isFailure: (self: Result) => self is Failure(self: Result) => self is Success; /** * Extracts the success value as an `Option`, discarding the failure. * + * **When to use** + * + * Use when you need to extract the success value from a `Result` as an + * `Option` and discard failure information. + * + * **Details** + * * - `Success` becomes `Some` * - `Failure` becomes `None` - * - Use when you only care about the success case and want to discard error info * * **Example** (Extracting the success as an Option) * @@ -676,16 +735,22 @@ export declare const isSuccess: (self: Result) => self is Success(self: Result) => Option; /** * Extracts the failure value as an `Option`, discarding the success. * + * **When to use** + * + * Use when you need to extract the failure value from a `Result` as an + * `Option` and discard successful values. + * + * **Details** + * * - `Failure` becomes `Some` * - `Success` becomes `None` - * - Use when you only care about the error case * * **Example** (Extracting the failure as an Option) * @@ -702,13 +767,15 @@ export declare const getSuccess: (self: Result) => Option; * @see {@link getSuccess} to extract the success instead * @see {@link fromOption} for the reverse conversion * - * @category Getters + * @category getters * @since 4.0.0 */ export declare const getFailure: (self: Result) => Option; /** * Creates an `Equivalence` for comparing two `Result` values. * + * **Details** + * * - Two `Success` values are equal when the `success` equivalence says so * - Two `Failure` values are equal when the `failure` equivalence says so * - A `Success` and a `Failure` are never equal @@ -730,17 +797,22 @@ export declare const getFailure: (self: Result) => Option; * // Output: false * ``` * - * @category Equivalence + * @category instances * @since 4.0.0 */ export declare const makeEquivalence: (success: Equivalence.Equivalence, failure: Equivalence.Equivalence) => Equivalence.Equivalence>; /** * Transforms both the success and failure channels of a `Result`. * + * **When to use** + * + * Use to transform both success and failure values without changing whether the + * result succeeds or fails. + * + * **Details** + * * - Applies `onSuccess` if the result is a `Success` * - Applies `onFailure` if the result is a `Failure` - * - Returns a new `Result`; does not mutate the input - * - Use when you need to transform both channels in a single operation * * **Example** (Mapping both channels) * @@ -762,17 +834,22 @@ export declare const makeEquivalence: (success: Equivalence.Equivalence * @see {@link mapError} to transform only the error value * @see {@link match} to fold into a single value * - * @category Mapping - * @since 4.0.0 + * @category mapping + * @since 2.0.0 */ export declare const mapBoth: { /** * Transforms both the success and failure channels of a `Result`. * + * **When to use** + * + * Use to transform both success and failure values without changing whether the + * result succeeds or fails. + * + * **Details** + * * - Applies `onSuccess` if the result is a `Success` * - Applies `onFailure` if the result is a `Failure` - * - Returns a new `Result`; does not mutate the input - * - Use when you need to transform both channels in a single operation * * **Example** (Mapping both channels) * @@ -794,8 +871,8 @@ export declare const mapBoth: { * @see {@link mapError} to transform only the error value * @see {@link match} to fold into a single value * - * @category Mapping - * @since 4.0.0 + * @category mapping + * @since 2.0.0 */ (options: { readonly onFailure: (left: E) => E2; @@ -804,10 +881,15 @@ export declare const mapBoth: { /** * Transforms both the success and failure channels of a `Result`. * + * **When to use** + * + * Use to transform both success and failure values without changing whether the + * result succeeds or fails. + * + * **Details** + * * - Applies `onSuccess` if the result is a `Success` * - Applies `onFailure` if the result is a `Failure` - * - Returns a new `Result`; does not mutate the input - * - Use when you need to transform both channels in a single operation * * **Example** (Mapping both channels) * @@ -829,8 +911,8 @@ export declare const mapBoth: { * @see {@link mapError} to transform only the error value * @see {@link match} to fold into a single value * - * @category Mapping - * @since 4.0.0 + * @category mapping + * @since 2.0.0 */ (self: Result, options: { readonly onFailure: (left: E) => E2; @@ -840,9 +922,14 @@ export declare const mapBoth: { /** * Transforms the failure channel of a `Result`, leaving the success channel unchanged. * + * **When to use** + * + * Use to transform only the failure channel while preserving success values. + * + * **Details** + * * - If the result is a `Failure`, applies `f` to the error and returns a new `Failure` * - If the result is a `Success`, returns it as-is - * - Does not mutate the input * * **Example** (Adding context to an error) * @@ -860,16 +947,21 @@ export declare const mapBoth: { * @see {@link map} to transform only the success value * @see {@link mapBoth} to transform both channels * - * @category Mapping + * @category mapping * @since 4.0.0 */ export declare const mapError: { /** * Transforms the failure channel of a `Result`, leaving the success channel unchanged. * + * **When to use** + * + * Use to transform only the failure channel while preserving success values. + * + * **Details** + * * - If the result is a `Failure`, applies `f` to the error and returns a new `Failure` * - If the result is a `Success`, returns it as-is - * - Does not mutate the input * * **Example** (Adding context to an error) * @@ -887,16 +979,21 @@ export declare const mapError: { * @see {@link map} to transform only the success value * @see {@link mapBoth} to transform both channels * - * @category Mapping + * @category mapping * @since 4.0.0 */ (f: (err: E) => E2): (self: Result) => Result; /** * Transforms the failure channel of a `Result`, leaving the success channel unchanged. * + * **When to use** + * + * Use to transform only the failure channel while preserving success values. + * + * **Details** + * * - If the result is a `Failure`, applies `f` to the error and returns a new `Failure` * - If the result is a `Success`, returns it as-is - * - Does not mutate the input * * **Example** (Adding context to an error) * @@ -914,7 +1011,7 @@ export declare const mapError: { * @see {@link map} to transform only the success value * @see {@link mapBoth} to transform both channels * - * @category Mapping + * @category mapping * @since 4.0.0 */ (self: Result, f: (err: E) => E2): Result; @@ -922,9 +1019,15 @@ export declare const mapError: { /** * Transforms the success channel of a `Result`, leaving the failure channel unchanged. * + * **When to use** + * + * Use to apply a transformation to the success value of a `Result` while + * preserving any existing failure. + * + * **Details** + * * - If the result is a `Success`, applies `f` to the value and returns a new `Success` * - If the result is a `Failure`, returns it as-is - * - Does not mutate the input * - Use {@link flatMap} if `f` returns a `Result` (to avoid nested Results) * * **Example** (Doubling the success value) @@ -944,16 +1047,22 @@ export declare const mapError: { * @see {@link mapBoth} to transform both channels * @see {@link flatMap} when `f` returns a `Result` * - * @category Mapping - * @since 4.0.0 + * @category mapping + * @since 2.0.0 */ export declare const map: { /** * Transforms the success channel of a `Result`, leaving the failure channel unchanged. * + * **When to use** + * + * Use to apply a transformation to the success value of a `Result` while + * preserving any existing failure. + * + * **Details** + * * - If the result is a `Success`, applies `f` to the value and returns a new `Success` * - If the result is a `Failure`, returns it as-is - * - Does not mutate the input * - Use {@link flatMap} if `f` returns a `Result` (to avoid nested Results) * * **Example** (Doubling the success value) @@ -973,16 +1082,22 @@ export declare const map: { * @see {@link mapBoth} to transform both channels * @see {@link flatMap} when `f` returns a `Result` * - * @category Mapping - * @since 4.0.0 + * @category mapping + * @since 2.0.0 */ (f: (ok: A) => A2): (self: Result) => Result; /** * Transforms the success channel of a `Result`, leaving the failure channel unchanged. * + * **When to use** + * + * Use to apply a transformation to the success value of a `Result` while + * preserving any existing failure. + * + * **Details** + * * - If the result is a `Success`, applies `f` to the value and returns a new `Success` * - If the result is a `Failure`, returns it as-is - * - Does not mutate the input * - Use {@link flatMap} if `f` returns a `Result` (to avoid nested Results) * * **Example** (Doubling the success value) @@ -1002,18 +1117,24 @@ export declare const map: { * @see {@link mapBoth} to transform both channels * @see {@link flatMap} when `f` returns a `Result` * - * @category Mapping - * @since 4.0.0 + * @category mapping + * @since 2.0.0 */ (self: Result, f: (ok: A) => A2): Result; }; /** * Folds a `Result` into a single value by applying one of two functions. * + * **When to use** + * + * Use when a `Result`'s success and failure branches should be collapsed into + * one plain output type. + * + * **Details** + * * - Applies `onSuccess` if the result is a `Success` * - Applies `onFailure` if the result is a `Failure` * - Both branches must return the same type (or a common supertype) - * - Use when you need to "exit" the `Result` type and produce a plain value * * **Example** (Folding to a string) * @@ -1035,17 +1156,23 @@ export declare const map: { * @see {@link merge} to extract `A | E` without mapping * @see {@link getOrElse} to unwrap only the success with a fallback * - * @category Pattern Matching - * @since 4.0.0 + * @category pattern matching + * @since 2.0.0 */ export declare const match: { /** * Folds a `Result` into a single value by applying one of two functions. * + * **When to use** + * + * Use when a `Result`'s success and failure branches should be collapsed into + * one plain output type. + * + * **Details** + * * - Applies `onSuccess` if the result is a `Success` * - Applies `onFailure` if the result is a `Failure` * - Both branches must return the same type (or a common supertype) - * - Use when you need to "exit" the `Result` type and produce a plain value * * **Example** (Folding to a string) * @@ -1067,8 +1194,8 @@ export declare const match: { * @see {@link merge} to extract `A | E` without mapping * @see {@link getOrElse} to unwrap only the success with a fallback * - * @category Pattern Matching - * @since 4.0.0 + * @category pattern matching + * @since 2.0.0 */ (options: { readonly onFailure: (error: E) => B; @@ -1077,10 +1204,16 @@ export declare const match: { /** * Folds a `Result` into a single value by applying one of two functions. * + * **When to use** + * + * Use when a `Result`'s success and failure branches should be collapsed into + * one plain output type. + * + * **Details** + * * - Applies `onSuccess` if the result is a `Success` * - Applies `onFailure` if the result is a `Failure` * - Both branches must return the same type (or a common supertype) - * - Use when you need to "exit" the `Result` type and produce a plain value * * **Example** (Folding to a string) * @@ -1102,8 +1235,8 @@ export declare const match: { * @see {@link merge} to extract `A | E` without mapping * @see {@link getOrElse} to unwrap only the success with a fallback * - * @category Pattern Matching - * @since 4.0.0 + * @category pattern matching + * @since 2.0.0 */ (self: Result, options: { readonly onFailure: (error: E) => B; @@ -1113,6 +1246,13 @@ export declare const match: { /** * Lifts a value into a `Result` based on a predicate or refinement. * + * **When to use** + * + * Use to construct a `Result` from a raw value guarded by a predicate or + * refinement. + * + * **Details** + * * - If the predicate returns `true`, the value becomes `Success` * - If the predicate returns `false`, `orFailWith` produces the error for `Failure` * - Also accepts a `Refinement` to narrow the success type @@ -1137,13 +1277,20 @@ export declare const match: { * @see {@link filterOrFail} to validate a value that is already in a `Result` * @see {@link fromNullishOr} for nullable-based construction * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 3.4.0 */ export declare const liftPredicate: { /** * Lifts a value into a `Result` based on a predicate or refinement. * + * **When to use** + * + * Use to construct a `Result` from a raw value guarded by a predicate or + * refinement. + * + * **Details** + * * - If the predicate returns `true`, the value becomes `Success` * - If the predicate returns `false`, `orFailWith` produces the error for `Failure` * - Also accepts a `Refinement` to narrow the success type @@ -1168,13 +1315,20 @@ export declare const liftPredicate: { * @see {@link filterOrFail} to validate a value that is already in a `Result` * @see {@link fromNullishOr} for nullable-based construction * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 3.4.0 */ (refinement: Refinement, orFailWith: (a: A) => E): (a: A) => Result; /** * Lifts a value into a `Result` based on a predicate or refinement. * + * **When to use** + * + * Use to construct a `Result` from a raw value guarded by a predicate or + * refinement. + * + * **Details** + * * - If the predicate returns `true`, the value becomes `Success` * - If the predicate returns `false`, `orFailWith` produces the error for `Failure` * - Also accepts a `Refinement` to narrow the success type @@ -1199,13 +1353,20 @@ export declare const liftPredicate: { * @see {@link filterOrFail} to validate a value that is already in a `Result` * @see {@link fromNullishOr} for nullable-based construction * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 3.4.0 */ (predicate: Predicate, orFailWith: (a: A) => E): (a: B) => Result; /** * Lifts a value into a `Result` based on a predicate or refinement. * + * **When to use** + * + * Use to construct a `Result` from a raw value guarded by a predicate or + * refinement. + * + * **Details** + * * - If the predicate returns `true`, the value becomes `Success` * - If the predicate returns `false`, `orFailWith` produces the error for `Failure` * - Also accepts a `Refinement` to narrow the success type @@ -1230,13 +1391,20 @@ export declare const liftPredicate: { * @see {@link filterOrFail} to validate a value that is already in a `Result` * @see {@link fromNullishOr} for nullable-based construction * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 3.4.0 */ (self: A, refinement: Refinement, orFailWith: (a: A) => E): Result; /** * Lifts a value into a `Result` based on a predicate or refinement. * + * **When to use** + * + * Use to construct a `Result` from a raw value guarded by a predicate or + * refinement. + * + * **Details** + * * - If the predicate returns `true`, the value becomes `Success` * - If the predicate returns `false`, `orFailWith` produces the error for `Failure` * - Also accepts a `Refinement` to narrow the success type @@ -1261,8 +1429,8 @@ export declare const liftPredicate: { * @see {@link filterOrFail} to validate a value that is already in a `Result` * @see {@link fromNullishOr} for nullable-based construction * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 3.4.0 */ (self: B, predicate: Predicate, orFailWith: (a: A) => E): Result; }; @@ -1270,6 +1438,13 @@ export declare const liftPredicate: { * Validates the success value of a `Result` using a predicate, failing with a * custom error if the predicate returns `false`. * + * **When to use** + * + * Use to validate an already-successful `Result` value with a predicate or + * refinement. + * + * **Details** + * * - If the result is already a `Failure`, it is returned as-is * - If the predicate passes, the `Success` is returned unchanged * - If the predicate fails, `orFailWith` produces the error for a new `Failure` @@ -1295,14 +1470,21 @@ export declare const liftPredicate: { * @see {@link liftPredicate} to create a `Result` from a raw value with a predicate * @see {@link flatMap} for general conditional chaining * + * @category filtering * @since 4.0.0 - * @category Filtering */ export declare const filterOrFail: { /** * Validates the success value of a `Result` using a predicate, failing with a * custom error if the predicate returns `false`. * + * **When to use** + * + * Use to validate an already-successful `Result` value with a predicate or + * refinement. + * + * **Details** + * * - If the result is already a `Failure`, it is returned as-is * - If the predicate passes, the `Success` is returned unchanged * - If the predicate fails, `orFailWith` produces the error for a new `Failure` @@ -1328,14 +1510,21 @@ export declare const filterOrFail: { * @see {@link liftPredicate} to create a `Result` from a raw value with a predicate * @see {@link flatMap} for general conditional chaining * + * @category filtering * @since 4.0.0 - * @category Filtering */ (refinement: Refinement, B>, orFailWith: (value: NoInfer) => E2): (self: Result) => Result; /** * Validates the success value of a `Result` using a predicate, failing with a * custom error if the predicate returns `false`. * + * **When to use** + * + * Use to validate an already-successful `Result` value with a predicate or + * refinement. + * + * **Details** + * * - If the result is already a `Failure`, it is returned as-is * - If the predicate passes, the `Success` is returned unchanged * - If the predicate fails, `orFailWith` produces the error for a new `Failure` @@ -1361,14 +1550,21 @@ export declare const filterOrFail: { * @see {@link liftPredicate} to create a `Result` from a raw value with a predicate * @see {@link flatMap} for general conditional chaining * + * @category filtering * @since 4.0.0 - * @category Filtering */ (predicate: Predicate>, orFailWith: (value: NoInfer) => E2): (self: Result) => Result; /** * Validates the success value of a `Result` using a predicate, failing with a * custom error if the predicate returns `false`. * + * **When to use** + * + * Use to validate an already-successful `Result` value with a predicate or + * refinement. + * + * **Details** + * * - If the result is already a `Failure`, it is returned as-is * - If the predicate passes, the `Success` is returned unchanged * - If the predicate fails, `orFailWith` produces the error for a new `Failure` @@ -1394,14 +1590,21 @@ export declare const filterOrFail: { * @see {@link liftPredicate} to create a `Result` from a raw value with a predicate * @see {@link flatMap} for general conditional chaining * + * @category filtering * @since 4.0.0 - * @category Filtering */ (self: Result, refinement: Refinement, orFailWith: (value: A) => E2): Result; /** * Validates the success value of a `Result` using a predicate, failing with a * custom error if the predicate returns `false`. * + * **When to use** + * + * Use to validate an already-successful `Result` value with a predicate or + * refinement. + * + * **Details** + * * - If the result is already a `Failure`, it is returned as-is * - If the predicate passes, the `Success` is returned unchanged * - If the predicate fails, `orFailWith` produces the error for a new `Failure` @@ -1427,8 +1630,8 @@ export declare const filterOrFail: { * @see {@link liftPredicate} to create a `Result` from a raw value with a predicate * @see {@link flatMap} for general conditional chaining * + * @category filtering * @since 4.0.0 - * @category Filtering */ (self: Result, predicate: Predicate, orFailWith: (value: A) => E2): Result; }; @@ -1436,6 +1639,8 @@ export declare const filterOrFail: { * Unwraps a `Result` into `A | E` by returning the inner value regardless * of whether it is a success or failure. * + * **Details** + * * - `Success` returns `A` * - `Failure` returns `E` * - Useful when both channels share a compatible type @@ -1455,13 +1660,20 @@ export declare const filterOrFail: { * @see {@link match} to map each branch to a common type * @see {@link getOrElse} to provide a fallback for failures * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ export declare const merge: (self: Result) => E | A; /** * Extracts the success value, or computes a fallback from the error. * + * **When to use** + * + * Use when you need the success value from a `Result`, with a fallback computed + * from the failure value. + * + * **Details** + * * - `Success` returns the inner value * - `Failure` applies `onFailure` to the error and returns the result * - The return type is `A | A2` (union of both branches) @@ -1481,14 +1693,22 @@ export declare const merge: (self: Result) => E | A; * @see {@link getOrNull} / {@link getOrUndefined} for simpler fallbacks * @see {@link getOrThrow} to throw on failure * @see {@link match} to map both branches + * @see {@link orElse} to recover with another Result instead of unwrapping * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ export declare const getOrElse: { /** * Extracts the success value, or computes a fallback from the error. * + * **When to use** + * + * Use when you need the success value from a `Result`, with a fallback computed + * from the failure value. + * + * **Details** + * * - `Success` returns the inner value * - `Failure` applies `onFailure` to the error and returns the result * - The return type is `A | A2` (union of both branches) @@ -1508,14 +1728,22 @@ export declare const getOrElse: { * @see {@link getOrNull} / {@link getOrUndefined} for simpler fallbacks * @see {@link getOrThrow} to throw on failure * @see {@link match} to map both branches + * @see {@link orElse} to recover with another Result instead of unwrapping * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ (onFailure: (err: E) => A2): (self: Result) => A2 | A; /** * Extracts the success value, or computes a fallback from the error. * + * **When to use** + * + * Use when you need the success value from a `Result`, with a fallback computed + * from the failure value. + * + * **Details** + * * - `Success` returns the inner value * - `Failure` applies `onFailure` to the error and returns the result * - The return type is `A | A2` (union of both branches) @@ -1535,18 +1763,25 @@ export declare const getOrElse: { * @see {@link getOrNull} / {@link getOrUndefined} for simpler fallbacks * @see {@link getOrThrow} to throw on failure * @see {@link match} to map both branches + * @see {@link orElse} to recover with another Result instead of unwrapping * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ (self: Result, onFailure: (err: E) => A2): A | A2; }; /** * Extracts the success value, or returns `null` on failure. * + * **When to use** + * + * Use when you need to pass failed `Result` values to APIs that represent + * absence as `null`. + * + * **Details** + * * - `Success` returns `A` * - `Failure` returns `null` - * - Convenient for interop with APIs that use `null` to represent absence * * **Example** (Unwrapping to nullable) * @@ -1563,16 +1798,22 @@ export declare const getOrElse: { * @see {@link getOrUndefined} to return `undefined` instead * @see {@link getOrElse} for a custom fallback * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ export declare const getOrNull: (self: Result) => A | null; /** * Extracts the success value, or returns `undefined` on failure. * + * **When to use** + * + * Use when you need to pass failed `Result` values to APIs that represent + * absence as `undefined`. + * + * **Details** + * * - `Success` returns `A` * - `Failure` returns `undefined` - * - Convenient for interop with APIs that use `undefined` to represent absence * * **Example** (Unwrapping to optional) * @@ -1589,17 +1830,22 @@ export declare const getOrNull: (self: Result) => A | null; * @see {@link getOrNull} to return `null` instead * @see {@link getOrElse} for a custom fallback * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ export declare const getOrUndefined: (self: Result) => A | undefined; /** * Extracts the success value or throws a custom error derived from the failure. * + * **When to use** + * + * Use when converting a `Result` into a thrown exception with a custom error + * message or error type. + * + * **Details** + * * - `Success` returns `A` * - `Failure` throws the value returned by `onFailure(e)` - * - Use when you want to convert a `Result` into a thrown exception with a - * custom error message or error type * * **Example** (Throwing a custom error) * @@ -1621,17 +1867,22 @@ export declare const getOrUndefined: (self: Result) => A | undefined * @see {@link getOrThrow} to throw the raw failure value * @see {@link getOrElse} for a non-throwing alternative * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ export declare const getOrThrowWith: { /** * Extracts the success value or throws a custom error derived from the failure. * + * **When to use** + * + * Use when converting a `Result` into a thrown exception with a custom error + * message or error type. + * + * **Details** + * * - `Success` returns `A` * - `Failure` throws the value returned by `onFailure(e)` - * - Use when you want to convert a `Result` into a thrown exception with a - * custom error message or error type * * **Example** (Throwing a custom error) * @@ -1653,17 +1904,22 @@ export declare const getOrThrowWith: { * @see {@link getOrThrow} to throw the raw failure value * @see {@link getOrElse} for a non-throwing alternative * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ (onFailure: (err: E) => unknown): (self: Result) => A; /** * Extracts the success value or throws a custom error derived from the failure. * + * **When to use** + * + * Use when converting a `Result` into a thrown exception with a custom error + * message or error type. + * + * **Details** + * * - `Success` returns `A` * - `Failure` throws the value returned by `onFailure(e)` - * - Use when you want to convert a `Result` into a thrown exception with a - * custom error message or error type * * **Example** (Throwing a custom error) * @@ -1685,14 +1941,20 @@ export declare const getOrThrowWith: { * @see {@link getOrThrow} to throw the raw failure value * @see {@link getOrElse} for a non-throwing alternative * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ (self: Result, onFailure: (err: E) => unknown): A; }; /** * Extracts the success value or throws the raw failure value `E`. * + * **When to use** + * + * Use when unchecked boundaries should turn failures into thrown exceptions. + * + * **Details** + * * - `Success` returns `A` * - `Failure` throws `E` directly * - Use {@link getOrThrowWith} for a custom error object @@ -1712,17 +1974,23 @@ export declare const getOrThrowWith: { * @see {@link getOrThrowWith} for custom error mapping * @see {@link getOrElse} for a non-throwing alternative * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ export declare const getOrThrow: (self: Result) => A; /** * Returns the original `Result` if it is a `Success`, otherwise applies * `that` to the error and returns the resulting `Result`. * + * **When to use** + * + * Use when a failure should recover into another `Result` while keeping + * successes unchanged. + * + * **Details** + * * - `Success` is returned unchanged * - `Failure` calls `that(e)` to produce a new `Result` - * - Use to provide a recovery path or fallback computation on failure * * **Example** (Recovering from a failure) * @@ -1740,17 +2008,23 @@ export declare const getOrThrow: (self: Result) => A; * @see {@link getOrElse} to unwrap with a fallback value (not a Result) * @see {@link mapError} to transform the error without recovering * - * @category Error Handling - * @since 4.0.0 + * @category error handling + * @since 2.0.0 */ export declare const orElse: { /** * Returns the original `Result` if it is a `Success`, otherwise applies * `that` to the error and returns the resulting `Result`. * + * **When to use** + * + * Use when a failure should recover into another `Result` while keeping + * successes unchanged. + * + * **Details** + * * - `Success` is returned unchanged * - `Failure` calls `that(e)` to produce a new `Result` - * - Use to provide a recovery path or fallback computation on failure * * **Example** (Recovering from a failure) * @@ -1768,17 +2042,23 @@ export declare const orElse: { * @see {@link getOrElse} to unwrap with a fallback value (not a Result) * @see {@link mapError} to transform the error without recovering * - * @category Error Handling - * @since 4.0.0 + * @category error handling + * @since 2.0.0 */ (that: (err: E) => Result): (self: Result) => Result; /** * Returns the original `Result` if it is a `Success`, otherwise applies * `that` to the error and returns the resulting `Result`. * + * **When to use** + * + * Use when a failure should recover into another `Result` while keeping + * successes unchanged. + * + * **Details** + * * - `Success` is returned unchanged * - `Failure` calls `that(e)` to produce a new `Result` - * - Use to provide a recovery path or fallback computation on failure * * **Example** (Recovering from a failure) * @@ -1796,14 +2076,21 @@ export declare const orElse: { * @see {@link getOrElse} to unwrap with a fallback value (not a Result) * @see {@link mapError} to transform the error without recovering * - * @category Error Handling - * @since 4.0.0 + * @category error handling + * @since 2.0.0 */ (self: Result, that: (err: E) => Result): Result; }; /** * Chains a function that returns a `Result` onto a successful value. * + * **When to use** + * + * Use to sequence `Result`-returning computations that should short-circuit on + * failure. + * + * **Details** + * * - If `self` is a `Success`, applies `f` to the value and returns the resulting `Result` * - If `self` is a `Failure`, short-circuits and returns it unchanged * - The error types are merged into a union (`E | E2`) @@ -1827,13 +2114,20 @@ export declare const orElse: { * @see {@link andThen} for a more flexible variant that also accepts plain values * @see {@link map} when `f` does not return a `Result` * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ export declare const flatMap: { /** * Chains a function that returns a `Result` onto a successful value. * + * **When to use** + * + * Use to sequence `Result`-returning computations that should short-circuit on + * failure. + * + * **Details** + * * - If `self` is a `Success`, applies `f` to the value and returns the resulting `Result` * - If `self` is a `Failure`, short-circuits and returns it unchanged * - The error types are merged into a union (`E | E2`) @@ -1857,13 +2151,20 @@ export declare const flatMap: { * @see {@link andThen} for a more flexible variant that also accepts plain values * @see {@link map} when `f` does not return a `Result` * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ (f: (a: A) => Result): (self: Result) => Result; /** * Chains a function that returns a `Result` onto a successful value. * + * **When to use** + * + * Use to sequence `Result`-returning computations that should short-circuit on + * failure. + * + * **Details** + * * - If `self` is a `Success`, applies `f` to the value and returns the resulting `Result` * - If `self` is a `Failure`, short-circuits and returns it unchanged * - The error types are merged into a union (`E | E2`) @@ -1887,13 +2188,20 @@ export declare const flatMap: { * @see {@link andThen} for a more flexible variant that also accepts plain values * @see {@link map} when `f` does not return a `Result` * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ (self: Result, f: (a: A) => Result): Result; }; /** - * A flexible variant of {@link flatMap} that accepts multiple input shapes. + * Provides a flexible variant of {@link flatMap} that accepts multiple input shapes. + * + * **When to use** + * + * Use to sequence a next step that may be a `Result`, a function, or a plain + * value. + * + * **Details** * * The second argument can be: * - A function `(a: A) => Result` (same as `flatMap`) @@ -1929,12 +2237,19 @@ export declare const flatMap: { * @see {@link flatMap} for the stricter variant (function returning Result only) * @see {@link map} when you always return a plain value * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ export declare const andThen: { /** - * A flexible variant of {@link flatMap} that accepts multiple input shapes. + * Provides a flexible variant of {@link flatMap} that accepts multiple input shapes. + * + * **When to use** + * + * Use to sequence a next step that may be a `Result`, a function, or a plain + * value. + * + * **Details** * * The second argument can be: * - A function `(a: A) => Result` (same as `flatMap`) @@ -1970,12 +2285,19 @@ export declare const andThen: { * @see {@link flatMap} for the stricter variant (function returning Result only) * @see {@link map} when you always return a plain value * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ (f: (a: A) => Result): (self: Result) => Result; /** - * A flexible variant of {@link flatMap} that accepts multiple input shapes. + * Provides a flexible variant of {@link flatMap} that accepts multiple input shapes. + * + * **When to use** + * + * Use to sequence a next step that may be a `Result`, a function, or a plain + * value. + * + * **Details** * * The second argument can be: * - A function `(a: A) => Result` (same as `flatMap`) @@ -2011,12 +2333,19 @@ export declare const andThen: { * @see {@link flatMap} for the stricter variant (function returning Result only) * @see {@link map} when you always return a plain value * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ (f: Result): (self: Result) => Result; /** - * A flexible variant of {@link flatMap} that accepts multiple input shapes. + * Provides a flexible variant of {@link flatMap} that accepts multiple input shapes. + * + * **When to use** + * + * Use to sequence a next step that may be a `Result`, a function, or a plain + * value. + * + * **Details** * * The second argument can be: * - A function `(a: A) => Result` (same as `flatMap`) @@ -2052,12 +2381,19 @@ export declare const andThen: { * @see {@link flatMap} for the stricter variant (function returning Result only) * @see {@link map} when you always return a plain value * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ (f: (a: A) => A2): (self: Result) => Result; /** - * A flexible variant of {@link flatMap} that accepts multiple input shapes. + * Provides a flexible variant of {@link flatMap} that accepts multiple input shapes. + * + * **When to use** + * + * Use to sequence a next step that may be a `Result`, a function, or a plain + * value. + * + * **Details** * * The second argument can be: * - A function `(a: A) => Result` (same as `flatMap`) @@ -2093,12 +2429,19 @@ export declare const andThen: { * @see {@link flatMap} for the stricter variant (function returning Result only) * @see {@link map} when you always return a plain value * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ (right: NotFunction): (self: Result) => Result; /** - * A flexible variant of {@link flatMap} that accepts multiple input shapes. + * Provides a flexible variant of {@link flatMap} that accepts multiple input shapes. + * + * **When to use** + * + * Use to sequence a next step that may be a `Result`, a function, or a plain + * value. + * + * **Details** * * The second argument can be: * - A function `(a: A) => Result` (same as `flatMap`) @@ -2134,12 +2477,19 @@ export declare const andThen: { * @see {@link flatMap} for the stricter variant (function returning Result only) * @see {@link map} when you always return a plain value * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ (self: Result, f: (a: A) => Result): Result; /** - * A flexible variant of {@link flatMap} that accepts multiple input shapes. + * Provides a flexible variant of {@link flatMap} that accepts multiple input shapes. + * + * **When to use** + * + * Use to sequence a next step that may be a `Result`, a function, or a plain + * value. + * + * **Details** * * The second argument can be: * - A function `(a: A) => Result` (same as `flatMap`) @@ -2175,12 +2525,19 @@ export declare const andThen: { * @see {@link flatMap} for the stricter variant (function returning Result only) * @see {@link map} when you always return a plain value * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ (self: Result, f: Result): Result; /** - * A flexible variant of {@link flatMap} that accepts multiple input shapes. + * Provides a flexible variant of {@link flatMap} that accepts multiple input shapes. + * + * **When to use** + * + * Use to sequence a next step that may be a `Result`, a function, or a plain + * value. + * + * **Details** * * The second argument can be: * - A function `(a: A) => Result` (same as `flatMap`) @@ -2216,12 +2573,19 @@ export declare const andThen: { * @see {@link flatMap} for the stricter variant (function returning Result only) * @see {@link map} when you always return a plain value * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ (self: Result, f: (a: A) => A2): Result; /** - * A flexible variant of {@link flatMap} that accepts multiple input shapes. + * Provides a flexible variant of {@link flatMap} that accepts multiple input shapes. + * + * **When to use** + * + * Use to sequence a next step that may be a `Result`, a function, or a plain + * value. + * + * **Details** * * The second argument can be: * - A function `(a: A) => Result` (same as `flatMap`) @@ -2257,14 +2621,21 @@ export declare const andThen: { * @see {@link flatMap} for the stricter variant (function returning Result only) * @see {@link map} when you always return a plain value * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ (self: Result, f: NotFunction): Result; }; /** * Collects a structure of `Result`s into a single `Result` of collected values. * + * **When to use** + * + * Use to collect independent `Result` values into one `Result` while preserving + * the original structure. + * + * **Details** + * * Accepts: * - A tuple/array: returns `Result` with a tuple/array of success values * - A struct (record): returns `Result` with a struct of success values @@ -2291,8 +2662,8 @@ export declare const andThen: { * @see {@link flatMap} for chaining two Results sequentially * @see {@link gen} for generator-based composition of multiple Results * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ export declare const all: > | Record>>(input: I) => [I] extends [ReadonlyArray>] ? Result<{ -readonly [K in keyof I]: [I[K]] extends [Result] ? R : never; @@ -2302,6 +2673,13 @@ export declare const all: > | Record` becomes `Failure` (i.e., `Result`) * - `Failure` becomes `Success` (i.e., `Result`) * - Useful when you want to apply success-oriented operations (like `map`) @@ -2321,12 +2699,19 @@ export declare const all: > | Record(self: Result) => Result; /** - * Generator-based syntax for composing `Result` values sequentially. + * Provides generator-based syntax for composing `Result` values sequentially. + * + * **When to use** + * + * Use when you need generator syntax to compose sequential `Result` + * computations instead of nested `flatMap` calls. + * + * **Details** * * - Use `yield*` to unwrap a `Result` inside the generator; if any yielded * `Result` is a `Failure`, the generator short-circuits and returns that failure @@ -2351,12 +2736,20 @@ export declare const flip: (self: Result) => Result; * @see {@link flatMap} for point-free sequential composition * @see {@link all} to collect multiple independent Results * - * @category Generators - * @since 4.0.0 + * @category generators + * @since 2.0.0 */ export declare const gen: Gen.Gen; /** - * Starting point for the "do notation" simulation with `Result`. + * Provides the starting point for the "do notation" simulation with `Result`. + * + * **When to use** + * + * Use to start a `Result` do-notation pipeline from an empty successful record + * before adding named fields from `Result`-producing computations and pure + * computed values. + * + * **Details** * * Creates a `Result<{}>` (success with an empty object). Use with * {@link bind} to add `Result`-producing fields and {@link let_ let} @@ -2380,15 +2773,24 @@ export declare const gen: Gen.Gen; * @see {@link bind} to add Result-producing fields * @see {@link let_ let} to add pure computed fields * @see {@link gen} for an alternative generator-based syntax + * @see {@link bindTo} for starting a do-notation chain from an existing Result * - * @category Do Notation - * @since 4.0.0 + * @category do notation + * @since 2.0.0 */ export declare const Do: Result<{}>; /** * Adds a named field to the do-notation accumulator by running a `Result`-producing * function that receives the current accumulated object. * + * **When to use** + * + * Use when you need to add a `Result`-producing step to a `Result` + * do-notation pipeline and store its successful value under a named field in + * the accumulated object. + * + * **Details** + * * - Short-circuits on the first `Failure` * - The field name must not collide with existing keys * - Use {@link let_ let} for pure (non-Result) computed fields @@ -2411,14 +2813,22 @@ export declare const Do: Result<{}>; * @see {@link let_ let} for pure computed fields * @see {@link bindTo} to wrap an initial Result into a named field * - * @category Do Notation - * @since 4.0.0 + * @category do notation + * @since 2.0.0 */ export declare const bind: { /** * Adds a named field to the do-notation accumulator by running a `Result`-producing * function that receives the current accumulated object. * + * **When to use** + * + * Use when you need to add a `Result`-producing step to a `Result` + * do-notation pipeline and store its successful value under a named field in + * the accumulated object. + * + * **Details** + * * - Short-circuits on the first `Failure` * - The field name must not collide with existing keys * - Use {@link let_ let} for pure (non-Result) computed fields @@ -2441,8 +2851,8 @@ export declare const bind: { * @see {@link let_ let} for pure computed fields * @see {@link bindTo} to wrap an initial Result into a named field * - * @category Do Notation - * @since 4.0.0 + * @category do notation + * @since 2.0.0 */ (name: Exclude, f: (a: NoInfer) => Result): (self: Result) => Result<{ [K in N | keyof A]: K extends keyof A ? A[K] : B; @@ -2451,6 +2861,14 @@ export declare const bind: { * Adds a named field to the do-notation accumulator by running a `Result`-producing * function that receives the current accumulated object. * + * **When to use** + * + * Use when you need to add a `Result`-producing step to a `Result` + * do-notation pipeline and store its successful value under a named field in + * the accumulated object. + * + * **Details** + * * - Short-circuits on the first `Failure` * - The field name must not collide with existing keys * - Use {@link let_ let} for pure (non-Result) computed fields @@ -2473,8 +2891,8 @@ export declare const bind: { * @see {@link let_ let} for pure computed fields * @see {@link bindTo} to wrap an initial Result into a named field * - * @category Do Notation - * @since 4.0.0 + * @category do notation + * @since 2.0.0 */ (self: Result, name: Exclude, f: (a: NoInfer) => Result): Result<{ [K in N | keyof A]: K extends keyof A ? A[K] : B; @@ -2482,8 +2900,17 @@ export declare const bind: { }; /** * Wraps the success value of a `Result` into a named field, producing a - * `Result>`. This is typically used to start a do-notation - * chain from an existing `Result`. + * `Result>`. + * + * **When to use** + * + * Use to name the success value of an existing `Result` before continuing a + * do-notation pipeline. + * + * **Details** + * + * This is typically used to start a do-notation chain from an existing + * `Result`. * * **Example** (Wrapping a value into a named field) * @@ -2501,14 +2928,23 @@ export declare const bind: { * @see {@link Do} to start from an empty object * @see {@link bind} to add more fields * - * @category Do Notation - * @since 4.0.0 + * @category do notation + * @since 2.0.0 */ export declare const bindTo: { /** * Wraps the success value of a `Result` into a named field, producing a - * `Result>`. This is typically used to start a do-notation - * chain from an existing `Result`. + * `Result>`. + * + * **When to use** + * + * Use to name the success value of an existing `Result` before continuing a + * do-notation pipeline. + * + * **Details** + * + * This is typically used to start a do-notation chain from an existing + * `Result`. * * **Example** (Wrapping a value into a named field) * @@ -2526,14 +2962,23 @@ export declare const bindTo: { * @see {@link Do} to start from an empty object * @see {@link bind} to add more fields * - * @category Do Notation - * @since 4.0.0 + * @category do notation + * @since 2.0.0 */ (name: N): (self: Result) => Result, L>; /** * Wraps the success value of a `Result` into a named field, producing a - * `Result>`. This is typically used to start a do-notation - * chain from an existing `Result`. + * `Result>`. + * + * **When to use** + * + * Use to name the success value of an existing `Result` before continuing a + * do-notation pipeline. + * + * **Details** + * + * This is typically used to start a do-notation chain from an existing + * `Result`. * * **Example** (Wrapping a value into a named field) * @@ -2551,8 +2996,8 @@ export declare const bindTo: { * @see {@link Do} to start from an empty object * @see {@link bind} to add more fields * - * @category Do Notation - * @since 4.0.0 + * @category do notation + * @since 2.0.0 */ (self: Result, name: N): Result, L>; }; @@ -2569,6 +3014,13 @@ export { * Adds a named field to the do-notation accumulator by computing a pure * (non-Result) value from the current accumulated object. * + * **When to use** + * + * Use when you need to add a derived field that cannot fail inside a + * do-notation pipeline. + * + * **Details** + * * - Use {@link bind} when the computation returns a `Result` * - The field name must not collide with existing keys * @@ -2590,13 +3042,20 @@ export { * @see {@link Do} to start the do-notation chain * @see {@link bind} for Result-producing fields * - * @category Do Notation - * @since 4.0.0 + * @category do notation + * @since 2.0.0 */ let_ as let }; /** * Transforms `Option>` into `Result, E>`. * + * **When to use** + * + * Use when optional absence should be treated as a successful `None`, while an + * inner `Result` failure should still fail the whole result. + * + * **Details** + * * - `None` becomes `Success(None)` * - `Some(Success(a))` becomes `Success(Some(a))` * - `Some(Failure(e))` becomes `Failure(e)` @@ -2617,14 +3076,21 @@ let_ as let }; * * @see {@link transposeMapOption} to map and transpose in one step * - * @since 3.14.0 * @category Transposing + * @since 3.14.0 */ export declare const transposeOption: (self: Option>) => Result, E>; /** * Maps an `Option` value with a `Result`-producing function, then transposes * the structure from `Option>` to `Result, E>`. * + * **When to use** + * + * Use when an optional value should be validated only when present, preserving + * absence as a successful `None`. + * + * **Details** + * * - `None` becomes `Success(None)` (the function is never called) * - `Some(a)` where `f(a)` is `Success(b)` becomes `Success(Some(b))` * - `Some(a)` where `f(a)` is `Failure(e)` becomes `Failure(e)` @@ -2648,15 +3114,22 @@ export declare const transposeOption: (self: Option(f: (self: A) => Result) => (self: Option) => Result, E>) & ((self: Option, f: (self: A) => Result) => Result, E>); /** - * A pre-built `Result>` that succeeds with `None`. + * Provides a pre-built `Result>` that succeeds with `None`. * - * - Equivalent to `Result.succeed(Option.none())` but avoids an extra allocation - * - Useful with {@link transposeOption} patterns + * **When to use** + * + * Use when an optional success should be absent, such as the `None` branch of + * `transposeOption` or `transposeMapOption`. + * + * **Details** + * + * This is equivalent to `Result.succeed(Option.none())`, but reuses a shared + * `Success` wrapper instead of allocating one each time. * * **Example** (Using succeedNone) * @@ -2668,14 +3141,18 @@ export declare const transposeMapOption: ((f: (self: A) => Resu * ``` * * @see {@link succeedSome} for the `Some` counterpart + * @see {@link transposeOption} to transpose an Option that already contains a Result + * @see {@link transposeMapOption} to map and transpose an Option in one step * - * @category Constructors + * @category constructors * @since 4.0.0 */ export declare const succeedNone: Result, never>; /** * Creates a `Result>` that succeeds with `Some(a)`. * + * **Details** + * * - Equivalent to `Result.succeed(Option.some(a))` * - Useful with {@link transposeOption} patterns * @@ -2691,13 +3168,15 @@ export declare const succeedNone: Result, never>; * * @see {@link succeedNone} for the `None` counterpart * - * @category Constructors + * @category constructors * @since 4.0.0 */ export declare const succeedSome: (a: A) => Result, E>; /** * Runs a side-effect on the success value without altering the `Result`. * + * **Details** + * * - If the result is a `Success`, calls `f` with the value (return value is ignored) * - If the result is a `Failure`, `f` is not called * - Returns the original `Result` unchanged (same reference) @@ -2720,13 +3199,15 @@ export declare const succeedSome: (a: A) => Result, E>; * * @see {@link map} to transform the success value * - * @category Mapping + * @category mapping * @since 4.0.0 */ export declare const tap: { /** * Runs a side-effect on the success value without altering the `Result`. * + * **Details** + * * - If the result is a `Success`, calls `f` with the value (return value is ignored) * - If the result is a `Failure`, `f` is not called * - Returns the original `Result` unchanged (same reference) @@ -2749,13 +3230,15 @@ export declare const tap: { * * @see {@link map} to transform the success value * - * @category Mapping + * @category mapping * @since 4.0.0 */ (f: (a: A) => void): (self: Result) => Result; /** * Runs a side-effect on the success value without altering the `Result`. * + * **Details** + * * - If the result is a `Success`, calls `f` with the value (return value is ignored) * - If the result is a `Failure`, `f` is not called * - Returns the original `Result` unchanged (same reference) @@ -2778,7 +3261,7 @@ export declare const tap: { * * @see {@link map} to transform the success value * - * @category Mapping + * @category mapping * @since 4.0.0 */ (self: Result, f: (a: A) => void): Result; diff --git a/.opencode/node_modules/effect/dist/Result.d.ts.map b/.opencode/node_modules/effect/dist/Result.d.ts.map index 0318ac7298cc391d027e0930b7309a3a31adeab9..c7162e9bf0301ca6455f22e5196fa2a96f11ba21 100644 --- a/.opencode/node_modules/effect/dist/Result.d.ts.map +++ b/.opencode/node_modules/effect/dist/Result.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Result.d.ts","sourceRoot":"","sources":["../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E,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAS5D,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Result.js b/.opencode/node_modules/effect/dist/Result.js index d112161812a1c6bc048859dbe7cfaa5a5023d535..e40c1a6f12962c216f4a4086c026fe6c66e32958 100644 --- a/.opencode/node_modules/effect/dist/Result.js +++ b/.opencode/node_modules/effect/dist/Result.js @@ -1,69 +1,11 @@ /** - * A synchronous, pure type for representing computations that can succeed - * (`Success`) or fail (`Failure`). Unlike `Effect`, `Result` is - * evaluated eagerly and carries no side effects. - * - * **Mental model** - * - * - `Result` is a discriminated union: `Success | Failure` - * - `Success` wraps a value of type `A`, accessed via `.success` - * - `Failure` wraps an error of type `E`, accessed via `.failure` - * - `Result` is a monad: chain operations with {@link flatMap}, compose pipelines with `pipe` - * - All operations are pure and return new `Result` values; the input is never mutated - * - `Result` is yieldable in `Effect.gen`, producing the inner value or short-circuiting on failure - * - * **Common tasks** - * - * - Create from a value: {@link succeed}, {@link fail} - * - Create from nullable: {@link fromNullishOr} - * - Create from Option: {@link fromOption} - * - Create from throwing code: {@link try_ try} - * - Create from predicate: {@link liftPredicate} - * - Transform: {@link map}, {@link mapError}, {@link mapBoth} - * - Unwrap: {@link getOrElse}, {@link getOrNull}, {@link getOrUndefined}, {@link getOrThrow} - * - Pattern match: {@link match} - * - Sequence: {@link flatMap}, {@link andThen}, {@link all} - * - Recover: {@link orElse} - * - Filter: {@link filterOrFail} - * - Convert to Option: {@link getSuccess}, {@link getFailure} - * - Generator syntax: {@link gen} - * - Do notation: {@link Do}, {@link bind}, {@link let_ let} - * - Check variant: {@link isResult}, {@link isSuccess}, {@link isFailure} - * - * **Gotchas** - * - * - `E` defaults to `never`, so `Result` means a result that cannot fail - * - {@link andThen} accepts a `Result`, a function returning a `Result`, a plain value, or a function returning a plain value; {@link flatMap} only accepts a function returning a `Result` - * - {@link all} short-circuits on the first `Failure` and returns it; later elements are not inspected - * - {@link getOrThrow} throws the raw failure value `E`; use {@link getOrThrowWith} for custom error objects - * - {@link tap} runs a side-effect but does not change the result; its return value is ignored - * - * **Quickstart** - * - * **Example** (Parsing and validating with Result) + * Models a value that has already succeeded or failed. * - * ```ts - * import { Result } from "effect" - * - * const parse = (input: string): Result.Result => - * isNaN(Number(input)) - * ? Result.fail("not a number") - * : Result.succeed(Number(input)) - * - * const ensurePositive = (n: number): Result.Result => - * n > 0 ? Result.succeed(n) : Result.fail("not positive") - * - * const result = Result.flatMap(parse("42"), ensurePositive) - * - * console.log(Result.getOrElse(result, (err) => `Error: ${err}`)) - * // Output: 42 - * ``` - * - * **See also** - * - * - {@link succeed} / {@link fail} to create values - * - {@link match} to fold both branches - * - {@link gen} for generator-based composition + * A `Result` is `Success` when a value is available and + * `Failure` when an error is available. It is plain data, so inspecting + * or transforming it does not run side effects. This module includes helpers + * for creating, checking, mapping, combining, and extracting results, plus + * conversions to and from `Option` and nullable values. * * @since 4.0.0 */ @@ -77,15 +19,10 @@ const TypeId = "~effect/data/Result"; /** * Creates a `Result` holding a `Success` value. * + * **Details** + * * - Use when you have a value and want to lift it into the `Result` type * - The error type `E` defaults to `never` - * - Does not mutate input; allocates a new `Success` wrapper - * - * **Previously Known As** - * - * This API replaces the following from Effect 3.x: - * - * - `Either.right` * * **Example** (Wrapping a value) * @@ -99,24 +36,22 @@ const TypeId = "~effect/data/Result"; * ``` * * @see {@link fail} to create a Failure - * @see {@link void} for a pre-built `Success` + * @see {@link void_ void} for a pre-built `Success` * - * @category Constructors + * @category constructors * @since 4.0.0 */ export const succeed = result.succeed; /** * Creates a `Result` holding a `Failure` value. * - * - Use when you want to represent a failed computation - * - The success type `A` defaults to `never` - * - Does not mutate input; allocates a new `Failure` wrapper + * **When to use** * - * **Previously Known As** + * Use to represent a failed `Result` with a typed failure value. * - * This API replaces the following from Effect 3.x: + * **Details** * - * - `Either.left` + * - The success type `A` defaults to `never` * * **Example** (Creating a failure) * @@ -132,17 +67,24 @@ export const succeed = result.succeed; * @see {@link succeed} to create a Success * @see {@link mapError} to transform the error * - * @category Constructors + * @category constructors * @since 4.0.0 */ export const fail = result.fail; const void_ = /*#__PURE__*/succeed(void 0); export { /** - * A pre-built `Result` holding `undefined` as its success value. + * Provides a pre-built successful `Result` that carries `undefined`. + * + * **When to use** + * + * Use when you need a successful `Result` value that signals completion + * without carrying meaningful data. * - * - Use when you need a `Result` that represents "completed with no meaningful value" - * - Equivalent to `Result.succeed(undefined)` but avoids an extra allocation + * **Details** + * + * This is equivalent to `Result.succeed(undefined)`, but reuses a shared + * `Success` wrapper instead of allocating one each time. * * **Example** (Using void result) * @@ -155,27 +97,53 @@ export { * // Output: true * ``` * - * @see {@link succeed} + * @see {@link succeed} to create a Success with a specific value * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 3.13.0 */ void_ as void }; /** - * A pre-built `Result` holding `undefined` as its failure value. + * Provides a pre-built failed `Result` whose failure value is `undefined`. * - * - Use when you need a `Result` that represents "failed with no meaningful value" - * - Equivalent to `Result.fail(undefined)` but avoids an extra allocation + * **When to use** * - * @see {@link fail} + * Use when you need a failed `Result` value that acts only as a control signal + * without failure data. * - * @category Constructors + * **Details** + * + * This is equivalent to `Result.fail(undefined)` with type + * `Result`, but reuses a shared `Failure` wrapper instead of + * allocating one each time. + * + * **Example** (Using a failure without a payload) + * + * ```ts + * import { Result } from "effect" + * + * const result = Result.failVoid + * + * console.log(Result.isFailure(result)) + * // Output: true + * ``` + * + * @see {@link fail} to create a Failure with a specific value + * + * @category constructors * @since 4.0.0 */ export const failVoid = /*#__PURE__*/fail(void 0); /** * Converts a possibly `null` or `undefined` value into a `Result`. * + * **When to use** + * + * Use when you need `null` or `undefined` input to become a `Failure` while + * present values remain available as `Success`. + * + * **Details** + * * - Non-nullish values become `Success>` * - `null` or `undefined` becomes `Failure` using the provided function * - Supports both data-first and data-last (piped) usage @@ -196,13 +164,20 @@ export const failVoid = /*#__PURE__*/fail(void 0); * @see {@link fromOption} to convert from an Option * @see {@link succeed} / {@link fail} for direct construction * - * @category Constructors + * @category constructors * @since 4.0.0 */ export const fromNullishOr = /*#__PURE__*/dual(2, (self, onNullish) => self == null ? fail(onNullish(self)) : succeed(self)); /** * Converts an `Option` into a `Result`. * + * **When to use** + * + * Use when an existing `Option` should become a `Result`, preserving `Some` as + * success and turning `None` into a caller-provided failure. + * + * **Details** + * * - `Some` becomes `Success` * - `None` becomes `Failure` using the provided function * - Supports both data-first and data-last (piped) usage @@ -221,11 +196,12 @@ export const fromNullishOr = /*#__PURE__*/dual(2, (self, onNullish) => self == n * // Output: { _tag: "Failure", failure: "missing", ... } * ``` * - * @see {@link getSuccess} / {@link getFailure} to convert back to Option - * @see {@link fromNullishOr} to convert from nullable values + * @see {@link getSuccess} to extract the success value as an Option + * @see {@link getFailure} to extract the failure value as an Option + * @see {@link fromNullishOr} to build a Result from nullable values * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 2.0.0 */ export const fromOption = result.fromOption; const try_ = evaluate => { @@ -245,7 +221,9 @@ const try_ = evaluate => { }; export { /** - * Wraps a synchronous computation that may throw into a `Result`. + * Wraps a synchronous computation that may throw into a `Result` safely. + * + * **Details** * * - If the function returns normally, the result is `Success` * - If the function throws, the exception is caught and becomes `Failure` @@ -272,14 +250,19 @@ export { * @see {@link succeed} / {@link fail} for direct construction * @see {@link fromNullishOr} for nullable values * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 2.0.0 */ try_ as try }; /** - * Tests whether a value is a `Result` (either `Success` or `Failure`). + * Checks whether a value is a `Result` (either `Success` or `Failure`). + * + * **When to use** + * + * Use to validate unknown input before operating on it as a `Result`. + * + * **Details** * - * - Use to validate unknown input before operating on it as a `Result` * - Returns `true` for both `Success` and `Failure` variants * - Acts as a TypeScript type guard, narrowing to `Result` * @@ -297,13 +280,19 @@ try_ as try }; * * @see {@link isSuccess} / {@link isFailure} to narrow to a specific variant * - * @category Type Guards + * @category guards * @since 4.0.0 */ export const isResult = result.isResult; /** * Checks whether a `Result` is a `Failure`. * + * **When to use** + * + * Use to narrow a known `Result` to the `Failure` variant. + * + * **Details** + * * - Acts as a TypeScript type guard, narrowing to `Failure` * - After narrowing, you can access `.failure` to read the error value * @@ -323,13 +312,19 @@ export const isResult = result.isResult; * @see {@link isSuccess} for the opposite check * @see {@link isResult} to check if a value is any Result * - * @category Type Guards + * @category guards * @since 4.0.0 */ export const isFailure = result.isFailure; /** * Checks whether a `Result` is a `Success`. * + * **When to use** + * + * Use to narrow a known `Result` to the `Success` variant. + * + * **Details** + * * - Acts as a TypeScript type guard, narrowing to `Success` * - After narrowing, you can access `.success` to read the value * @@ -349,16 +344,22 @@ export const isFailure = result.isFailure; * @see {@link isFailure} for the opposite check * @see {@link isResult} to check if a value is any Result * - * @category Type Guards + * @category guards * @since 4.0.0 */ export const isSuccess = result.isSuccess; /** * Extracts the success value as an `Option`, discarding the failure. * + * **When to use** + * + * Use when you need to extract the success value from a `Result` as an + * `Option` and discard failure information. + * + * **Details** + * * - `Success` becomes `Some` * - `Failure` becomes `None` - * - Use when you only care about the success case and want to discard error info * * **Example** (Extracting the success as an Option) * @@ -375,16 +376,22 @@ export const isSuccess = result.isSuccess; * @see {@link getFailure} to extract the error instead * @see {@link fromOption} for the reverse conversion * - * @category Getters + * @category getters * @since 4.0.0 */ export const getSuccess = result.getSuccess; /** * Extracts the failure value as an `Option`, discarding the success. * + * **When to use** + * + * Use when you need to extract the failure value from a `Result` as an + * `Option` and discard successful values. + * + * **Details** + * * - `Failure` becomes `Some` * - `Success` becomes `None` - * - Use when you only care about the error case * * **Example** (Extracting the failure as an Option) * @@ -401,13 +408,15 @@ export const getSuccess = result.getSuccess; * @see {@link getSuccess} to extract the success instead * @see {@link fromOption} for the reverse conversion * - * @category Getters + * @category getters * @since 4.0.0 */ export const getFailure = result.getFailure; /** * Creates an `Equivalence` for comparing two `Result` values. * + * **Details** + * * - Two `Success` values are equal when the `success` equivalence says so * - Two `Failure` values are equal when the `failure` equivalence says so * - A `Success` and a `Failure` are never equal @@ -429,17 +438,22 @@ export const getFailure = result.getFailure; * // Output: false * ``` * - * @category Equivalence + * @category instances * @since 4.0.0 */ export const makeEquivalence = (success, failure) => Equivalence.make((x, y) => isFailure(x) ? isFailure(y) && failure(x.failure, y.failure) : isSuccess(y) && success(x.success, y.success)); /** * Transforms both the success and failure channels of a `Result`. * + * **When to use** + * + * Use to transform both success and failure values without changing whether the + * result succeeds or fails. + * + * **Details** + * * - Applies `onSuccess` if the result is a `Success` * - Applies `onFailure` if the result is a `Failure` - * - Returns a new `Result`; does not mutate the input - * - Use when you need to transform both channels in a single operation * * **Example** (Mapping both channels) * @@ -461,8 +475,8 @@ export const makeEquivalence = (success, failure) => Equivalence.make((x, y) => * @see {@link mapError} to transform only the error value * @see {@link match} to fold into a single value * - * @category Mapping - * @since 4.0.0 + * @category mapping + * @since 2.0.0 */ export const mapBoth = /*#__PURE__*/dual(2, (self, { onFailure, @@ -471,9 +485,14 @@ export const mapBoth = /*#__PURE__*/dual(2, (self, { /** * Transforms the failure channel of a `Result`, leaving the success channel unchanged. * + * **When to use** + * + * Use to transform only the failure channel while preserving success values. + * + * **Details** + * * - If the result is a `Failure`, applies `f` to the error and returns a new `Failure` * - If the result is a `Success`, returns it as-is - * - Does not mutate the input * * **Example** (Adding context to an error) * @@ -491,16 +510,22 @@ export const mapBoth = /*#__PURE__*/dual(2, (self, { * @see {@link map} to transform only the success value * @see {@link mapBoth} to transform both channels * - * @category Mapping + * @category mapping * @since 4.0.0 */ export const mapError = /*#__PURE__*/dual(2, (self, f) => isFailure(self) ? fail(f(self.failure)) : succeed(self.success)); /** * Transforms the success channel of a `Result`, leaving the failure channel unchanged. * + * **When to use** + * + * Use to apply a transformation to the success value of a `Result` while + * preserving any existing failure. + * + * **Details** + * * - If the result is a `Success`, applies `f` to the value and returns a new `Success` * - If the result is a `Failure`, returns it as-is - * - Does not mutate the input * - Use {@link flatMap} if `f` returns a `Result` (to avoid nested Results) * * **Example** (Doubling the success value) @@ -520,17 +545,23 @@ export const mapError = /*#__PURE__*/dual(2, (self, f) => isFailure(self) ? fail * @see {@link mapBoth} to transform both channels * @see {@link flatMap} when `f` returns a `Result` * - * @category Mapping - * @since 4.0.0 + * @category mapping + * @since 2.0.0 */ export const map = /*#__PURE__*/dual(2, (self, f) => isSuccess(self) ? succeed(f(self.success)) : fail(self.failure)); /** * Folds a `Result` into a single value by applying one of two functions. * + * **When to use** + * + * Use when a `Result`'s success and failure branches should be collapsed into + * one plain output type. + * + * **Details** + * * - Applies `onSuccess` if the result is a `Success` * - Applies `onFailure` if the result is a `Failure` * - Both branches must return the same type (or a common supertype) - * - Use when you need to "exit" the `Result` type and produce a plain value * * **Example** (Folding to a string) * @@ -552,8 +583,8 @@ export const map = /*#__PURE__*/dual(2, (self, f) => isSuccess(self) ? succeed(f * @see {@link merge} to extract `A | E` without mapping * @see {@link getOrElse} to unwrap only the success with a fallback * - * @category Pattern Matching - * @since 4.0.0 + * @category pattern matching + * @since 2.0.0 */ export const match = /*#__PURE__*/dual(2, (self, { onFailure, @@ -562,6 +593,13 @@ export const match = /*#__PURE__*/dual(2, (self, { /** * Lifts a value into a `Result` based on a predicate or refinement. * + * **When to use** + * + * Use to construct a `Result` from a raw value guarded by a predicate or + * refinement. + * + * **Details** + * * - If the predicate returns `true`, the value becomes `Success` * - If the predicate returns `false`, `orFailWith` produces the error for `Failure` * - Also accepts a `Refinement` to narrow the success type @@ -586,14 +624,21 @@ export const match = /*#__PURE__*/dual(2, (self, { * @see {@link filterOrFail} to validate a value that is already in a `Result` * @see {@link fromNullishOr} for nullable-based construction * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 3.4.0 */ export const liftPredicate = /*#__PURE__*/dual(3, (a, predicate, orFailWith) => predicate(a) ? succeed(a) : fail(orFailWith(a))); /** * Validates the success value of a `Result` using a predicate, failing with a * custom error if the predicate returns `false`. * + * **When to use** + * + * Use to validate an already-successful `Result` value with a predicate or + * refinement. + * + * **Details** + * * - If the result is already a `Failure`, it is returned as-is * - If the predicate passes, the `Success` is returned unchanged * - If the predicate fails, `orFailWith` produces the error for a new `Failure` @@ -619,14 +664,16 @@ export const liftPredicate = /*#__PURE__*/dual(3, (a, predicate, orFailWith) => * @see {@link liftPredicate} to create a `Result` from a raw value with a predicate * @see {@link flatMap} for general conditional chaining * + * @category filtering * @since 4.0.0 - * @category Filtering */ export const filterOrFail = /*#__PURE__*/dual(3, (self, predicate, orFailWith) => flatMap(self, a => predicate(a) ? succeed(a) : fail(orFailWith(a)))); /** * Unwraps a `Result` into `A | E` by returning the inner value regardless * of whether it is a success or failure. * + * **Details** + * * - `Success` returns `A` * - `Failure` returns `E` * - Useful when both channels share a compatible type @@ -646,8 +693,8 @@ export const filterOrFail = /*#__PURE__*/dual(3, (self, predicate, orFailWith) = * @see {@link match} to map each branch to a common type * @see {@link getOrElse} to provide a fallback for failures * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ export const merge = /*#__PURE__*/match({ onFailure: identity, @@ -656,6 +703,13 @@ export const merge = /*#__PURE__*/match({ /** * Extracts the success value, or computes a fallback from the error. * + * **When to use** + * + * Use when you need the success value from a `Result`, with a fallback computed + * from the failure value. + * + * **Details** + * * - `Success` returns the inner value * - `Failure` applies `onFailure` to the error and returns the result * - The return type is `A | A2` (union of both branches) @@ -675,17 +729,24 @@ export const merge = /*#__PURE__*/match({ * @see {@link getOrNull} / {@link getOrUndefined} for simpler fallbacks * @see {@link getOrThrow} to throw on failure * @see {@link match} to map both branches + * @see {@link orElse} to recover with another Result instead of unwrapping * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ export const getOrElse = /*#__PURE__*/dual(2, (self, onFailure) => isFailure(self) ? onFailure(self.failure) : self.success); /** * Extracts the success value, or returns `null` on failure. * + * **When to use** + * + * Use when you need to pass failed `Result` values to APIs that represent + * absence as `null`. + * + * **Details** + * * - `Success` returns `A` * - `Failure` returns `null` - * - Convenient for interop with APIs that use `null` to represent absence * * **Example** (Unwrapping to nullable) * @@ -702,16 +763,22 @@ export const getOrElse = /*#__PURE__*/dual(2, (self, onFailure) => isFailure(sel * @see {@link getOrUndefined} to return `undefined` instead * @see {@link getOrElse} for a custom fallback * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ export const getOrNull = /*#__PURE__*/getOrElse(constNull); /** * Extracts the success value, or returns `undefined` on failure. * + * **When to use** + * + * Use when you need to pass failed `Result` values to APIs that represent + * absence as `undefined`. + * + * **Details** + * * - `Success` returns `A` * - `Failure` returns `undefined` - * - Convenient for interop with APIs that use `undefined` to represent absence * * **Example** (Unwrapping to optional) * @@ -728,17 +795,22 @@ export const getOrNull = /*#__PURE__*/getOrElse(constNull); * @see {@link getOrNull} to return `null` instead * @see {@link getOrElse} for a custom fallback * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ export const getOrUndefined = /*#__PURE__*/getOrElse(constUndefined); /** * Extracts the success value or throws a custom error derived from the failure. * + * **When to use** + * + * Use when converting a `Result` into a thrown exception with a custom error + * message or error type. + * + * **Details** + * * - `Success` returns `A` * - `Failure` throws the value returned by `onFailure(e)` - * - Use when you want to convert a `Result` into a thrown exception with a - * custom error message or error type * * **Example** (Throwing a custom error) * @@ -760,8 +832,8 @@ export const getOrUndefined = /*#__PURE__*/getOrElse(constUndefined); * @see {@link getOrThrow} to throw the raw failure value * @see {@link getOrElse} for a non-throwing alternative * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ export const getOrThrowWith = /*#__PURE__*/dual(2, (self, onFailure) => { if (isSuccess(self)) { @@ -772,6 +844,12 @@ export const getOrThrowWith = /*#__PURE__*/dual(2, (self, onFailure) => { /** * Extracts the success value or throws the raw failure value `E`. * + * **When to use** + * + * Use when unchecked boundaries should turn failures into thrown exceptions. + * + * **Details** + * * - `Success` returns `A` * - `Failure` throws `E` directly * - Use {@link getOrThrowWith} for a custom error object @@ -791,17 +869,23 @@ export const getOrThrowWith = /*#__PURE__*/dual(2, (self, onFailure) => { * @see {@link getOrThrowWith} for custom error mapping * @see {@link getOrElse} for a non-throwing alternative * - * @category Getters - * @since 4.0.0 + * @category getters + * @since 2.0.0 */ export const getOrThrow = /*#__PURE__*/getOrThrowWith(identity); /** * Returns the original `Result` if it is a `Success`, otherwise applies * `that` to the error and returns the resulting `Result`. * + * **When to use** + * + * Use when a failure should recover into another `Result` while keeping + * successes unchanged. + * + * **Details** + * * - `Success` is returned unchanged * - `Failure` calls `that(e)` to produce a new `Result` - * - Use to provide a recovery path or fallback computation on failure * * **Example** (Recovering from a failure) * @@ -819,13 +903,20 @@ export const getOrThrow = /*#__PURE__*/getOrThrowWith(identity); * @see {@link getOrElse} to unwrap with a fallback value (not a Result) * @see {@link mapError} to transform the error without recovering * - * @category Error Handling - * @since 4.0.0 + * @category error handling + * @since 2.0.0 */ export const orElse = /*#__PURE__*/dual(2, (self, that) => isFailure(self) ? that(self.failure) : succeed(self.success)); /** * Chains a function that returns a `Result` onto a successful value. * + * **When to use** + * + * Use to sequence `Result`-returning computations that should short-circuit on + * failure. + * + * **Details** + * * - If `self` is a `Success`, applies `f` to the value and returns the resulting `Result` * - If `self` is a `Failure`, short-circuits and returns it unchanged * - The error types are merged into a union (`E | E2`) @@ -849,12 +940,19 @@ export const orElse = /*#__PURE__*/dual(2, (self, that) => isFailure(self) ? tha * @see {@link andThen} for a more flexible variant that also accepts plain values * @see {@link map} when `f` does not return a `Result` * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ export const flatMap = /*#__PURE__*/dual(2, (self, f) => isFailure(self) ? fail(self.failure) : f(self.success)); /** - * A flexible variant of {@link flatMap} that accepts multiple input shapes. + * Provides a flexible variant of {@link flatMap} that accepts multiple input shapes. + * + * **When to use** + * + * Use to sequence a next step that may be a `Result`, a function, or a plain + * value. + * + * **Details** * * The second argument can be: * - A function `(a: A) => Result` (same as `flatMap`) @@ -890,8 +988,8 @@ export const flatMap = /*#__PURE__*/dual(2, (self, f) => isFailure(self) ? fail( * @see {@link flatMap} for the stricter variant (function returning Result only) * @see {@link map} when you always return a plain value * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ export const andThen = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => { const out = isFunction(f) ? f(a) : f; @@ -900,6 +998,13 @@ export const andThen = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => { /** * Collects a structure of `Result`s into a single `Result` of collected values. * + * **When to use** + * + * Use to collect independent `Result` values into one `Result` while preserving + * the original structure. + * + * **Details** + * * Accepts: * - A tuple/array: returns `Result` with a tuple/array of success values * - A struct (record): returns `Result` with a struct of success values @@ -926,8 +1031,8 @@ export const andThen = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => { * @see {@link flatMap} for chaining two Results sequentially * @see {@link gen} for generator-based composition of multiple Results * - * @category Sequencing - * @since 4.0.0 + * @category sequencing + * @since 2.0.0 */ // @ts-expect-error export const all = input => { @@ -954,6 +1059,13 @@ export const all = input => { /** * Swaps the success and failure channels of a `Result`. * + * **When to use** + * + * Use to swap channels when failure-focused operations are easier through + * success-oriented combinators. + * + * **Details** + * * - `Success` becomes `Failure` (i.e., `Result`) * - `Failure` becomes `Success` (i.e., `Result`) * - Useful when you want to apply success-oriented operations (like `map`) @@ -973,12 +1085,19 @@ export const all = input => { * * @see {@link mapError} to transform the error without swapping * - * @category Utilities - * @since 4.0.0 + * @category transforming + * @since 2.0.0 */ export const flip = self => isFailure(self) ? succeed(self.failure) : fail(self.success); /** - * Generator-based syntax for composing `Result` values sequentially. + * Provides generator-based syntax for composing `Result` values sequentially. + * + * **When to use** + * + * Use when you need generator syntax to compose sequential `Result` + * computations instead of nested `flatMap` calls. + * + * **Details** * * - Use `yield*` to unwrap a `Result` inside the generator; if any yielded * `Result` is a `Failure`, the generator short-circuits and returns that failure @@ -1003,8 +1122,8 @@ export const flip = self => isFailure(self) ? succeed(self.failure) : fail(self. * @see {@link flatMap} for point-free sequential composition * @see {@link all} to collect multiple independent Results * - * @category Generators - * @since 4.0.0 + * @category generators + * @since 2.0.0 */ export const gen = (...args) => { const f = args.length === 1 ? args[0] : args[1].bind(args[0]); @@ -1023,7 +1142,15 @@ export const gen = (...args) => { // do notation // ------------------------------------------------------------------------------------- /** - * Starting point for the "do notation" simulation with `Result`. + * Provides the starting point for the "do notation" simulation with `Result`. + * + * **When to use** + * + * Use to start a `Result` do-notation pipeline from an empty successful record + * before adding named fields from `Result`-producing computations and pure + * computed values. + * + * **Details** * * Creates a `Result<{}>` (success with an empty object). Use with * {@link bind} to add `Result`-producing fields and {@link let_ let} @@ -1047,15 +1174,24 @@ export const gen = (...args) => { * @see {@link bind} to add Result-producing fields * @see {@link let_ let} to add pure computed fields * @see {@link gen} for an alternative generator-based syntax + * @see {@link bindTo} for starting a do-notation chain from an existing Result * - * @category Do Notation - * @since 4.0.0 + * @category do notation + * @since 2.0.0 */ export const Do = /*#__PURE__*/succeed({}); /** * Adds a named field to the do-notation accumulator by running a `Result`-producing * function that receives the current accumulated object. * + * **When to use** + * + * Use when you need to add a `Result`-producing step to a `Result` + * do-notation pipeline and store its successful value under a named field in + * the accumulated object. + * + * **Details** + * * - Short-circuits on the first `Failure` * - The field name must not collide with existing keys * - Use {@link let_ let} for pure (non-Result) computed fields @@ -1078,14 +1214,23 @@ export const Do = /*#__PURE__*/succeed({}); * @see {@link let_ let} for pure computed fields * @see {@link bindTo} to wrap an initial Result into a named field * - * @category Do Notation - * @since 4.0.0 + * @category do notation + * @since 2.0.0 */ export const bind = /*#__PURE__*/doNotation.bind(map, flatMap); /** * Wraps the success value of a `Result` into a named field, producing a - * `Result>`. This is typically used to start a do-notation - * chain from an existing `Result`. + * `Result>`. + * + * **When to use** + * + * Use to name the success value of an existing `Result` before continuing a + * do-notation pipeline. + * + * **Details** + * + * This is typically used to start a do-notation chain from an existing + * `Result`. * * **Example** (Wrapping a value into a named field) * @@ -1103,8 +1248,8 @@ export const bind = /*#__PURE__*/doNotation.bind(map, flatMap); * @see {@link Do} to start from an empty object * @see {@link bind} to add more fields * - * @category Do Notation - * @since 4.0.0 + * @category do notation + * @since 2.0.0 */ export const bindTo = /*#__PURE__*/doNotation.bindTo(map); const let_ = /*#__PURE__*/doNotation.let_(map); @@ -1113,6 +1258,13 @@ export { * Adds a named field to the do-notation accumulator by computing a pure * (non-Result) value from the current accumulated object. * + * **When to use** + * + * Use when you need to add a derived field that cannot fail inside a + * do-notation pipeline. + * + * **Details** + * * - Use {@link bind} when the computation returns a `Result` * - The field name must not collide with existing keys * @@ -1134,13 +1286,20 @@ export { * @see {@link Do} to start the do-notation chain * @see {@link bind} for Result-producing fields * - * @category Do Notation - * @since 4.0.0 + * @category do notation + * @since 2.0.0 */ let_ as let }; /** * Transforms `Option>` into `Result, E>`. * + * **When to use** + * + * Use when optional absence should be treated as a successful `None`, while an + * inner `Result` failure should still fail the whole result. + * + * **Details** + * * - `None` becomes `Success(None)` * - `Some(Success(a))` becomes `Success(Some(a))` * - `Some(Failure(e))` becomes `Failure(e)` @@ -1161,8 +1320,8 @@ let_ as let }; * * @see {@link transposeMapOption} to map and transpose in one step * - * @since 3.14.0 * @category Transposing + * @since 3.14.0 */ export const transposeOption = self => { return option_.isNone(self) ? succeedNone : map(self.value, option_.some); @@ -1171,6 +1330,13 @@ export const transposeOption = self => { * Maps an `Option` value with a `Result`-producing function, then transposes * the structure from `Option>` to `Result, E>`. * + * **When to use** + * + * Use when an optional value should be validated only when present, preserving + * absence as a successful `None`. + * + * **Details** + * * - `None` becomes `Success(None)` (the function is never called) * - `Some(a)` where `f(a)` is `Success(b)` becomes `Success(Some(b))` * - `Some(a)` where `f(a)` is `Failure(e)` becomes `Failure(e)` @@ -1194,15 +1360,22 @@ export const transposeOption = self => { * * @see {@link transposeOption} when the Option already contains a Result * - * @since 3.15.0 * @category Transposing + * @since 3.15.0 */ export const transposeMapOption = /*#__PURE__*/dual(2, (self, f) => option_.isNone(self) ? succeedNone : map(f(self.value), option_.some)); /** - * A pre-built `Result>` that succeeds with `None`. + * Provides a pre-built `Result>` that succeeds with `None`. * - * - Equivalent to `Result.succeed(Option.none())` but avoids an extra allocation - * - Useful with {@link transposeOption} patterns + * **When to use** + * + * Use when an optional success should be absent, such as the `None` branch of + * `transposeOption` or `transposeMapOption`. + * + * **Details** + * + * This is equivalent to `Result.succeed(Option.none())`, but reuses a shared + * `Success` wrapper instead of allocating one each time. * * **Example** (Using succeedNone) * @@ -1214,14 +1387,18 @@ export const transposeMapOption = /*#__PURE__*/dual(2, (self, f) => option_.isNo * ``` * * @see {@link succeedSome} for the `Some` counterpart + * @see {@link transposeOption} to transpose an Option that already contains a Result + * @see {@link transposeMapOption} to map and transpose an Option in one step * - * @category Constructors + * @category constructors * @since 4.0.0 */ export const succeedNone = /*#__PURE__*/succeed(option_.none); /** * Creates a `Result>` that succeeds with `Some(a)`. * + * **Details** + * * - Equivalent to `Result.succeed(Option.some(a))` * - Useful with {@link transposeOption} patterns * @@ -1237,13 +1414,15 @@ export const succeedNone = /*#__PURE__*/succeed(option_.none); * * @see {@link succeedNone} for the `None` counterpart * - * @category Constructors + * @category constructors * @since 4.0.0 */ export const succeedSome = a => succeed(option_.some(a)); /** * Runs a side-effect on the success value without altering the `Result`. * + * **Details** + * * - If the result is a `Success`, calls `f` with the value (return value is ignored) * - If the result is a `Failure`, `f` is not called * - Returns the original `Result` unchanged (same reference) @@ -1266,7 +1445,7 @@ export const succeedSome = a => succeed(option_.some(a)); * * @see {@link map} to transform the success value * - * @category Mapping + * @category mapping * @since 4.0.0 */ export const tap = /*#__PURE__*/dual(2, (self, f) => { diff --git a/.opencode/node_modules/effect/dist/Result.js.map b/.opencode/node_modules/effect/dist/Result.js.map index 84accfe9424814c163adfbc366a95d71018ef6d2..20a1af9ab28eccd122028beb84544d8096feaaf4 100644 --- a/.opencode/node_modules/effect/dist/Result.js.map +++ b/.opencode/node_modules/effect/dist/Result.js.map @@ -1 +1 @@ -{"version":3,"file":"Result.js","names":["Equivalence","constNull","constUndefined","dual","identity","doNotation","option_","result","isFunction","TypeId","succeed","fail","void_","void","failVoid","fromNullishOr","self","onNullish","fromOption","try_","evaluate","e","try","catch","isResult","isFailure","isSuccess","getSuccess","getFailure","makeEquivalence","success","failure","make","x","y","mapBoth","onFailure","onSuccess","mapError","f","map","match","liftPredicate","a","predicate","orFailWith","filterOrFail","flatMap","merge","getOrElse","getOrNull","getOrUndefined","getOrThrowWith","getOrThrow","orElse","that","andThen","out","all","input","Symbol","iterator","push","key","Object","keys","flip","gen","args","length","bind","state","next","done","current","value","Do","bindTo","let_","let","transposeOption","isNone","succeedNone","some","transposeMapOption","none","succeedSome","tap"],"sources":["../src/Result.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,OAAO,KAAKA,WAAW,MAAM,kBAAkB;AAE/C,SAASC,SAAS,EAAEC,cAAc,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAGzE,OAAO,KAAKC,UAAU,MAAM,0BAA0B;AACtD,OAAO,KAAKC,OAAO,MAAM,sBAAsB;AAC/C,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAI9C,SAASC,UAAU,QAAQ,gBAAgB;AAK3C,MAAMC,MAAM,GAAG,qBAAqB;AAsMpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,MAAMC,OAAO,GAA+BH,MAAM,CAACG,OAAO;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,MAAMC,IAAI,GAAqCJ,MAAM,CAACI,IAAI;AAEjE,MAAMC,KAAK,gBAAiBF,OAAO,CAAC,KAAK,CAAC,CAAC;AAC3C;AACE;;;;;;;;;;;;;;;;;;;;;;AAsBAE,KAAK,IAAIC,IAAI;AA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js","names":["Equivalence","constNull","constUndefined","dual","identity","doNotation","option_","result","isFunction","TypeId","succeed","fail","void_","void","failVoid","fromNullishOr","self","onNullish","fromOption","try_","evaluate","e","try","catch","isResult","isFailure","isSuccess","getSuccess","getFailure","makeEquivalence","success","failure","make","x","y","mapBoth","onFailure","onSuccess","mapError","f","map","match","liftPredicate","a","predicate","orFailWith","filterOrFail","flatMap","merge","getOrElse","getOrNull","getOrUndefined","getOrThrowWith","getOrThrow","orElse","that","andThen","out","all","input","Symbol","iterator","push","key","Object","keys","flip","gen","args","length","bind","state","next","done","current","value","Do","bindTo","let_","let","transposeOption","isNone","succeedNone","some","transposeMapOption","none","succeedSome","tap"],"sources":["../src/Result.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAYA,OAAO,KAAKA,WAAW,MAAM,kBAAkB;AAE/C,SAASC,SAAS,EAAEC,cAAc,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAGzE,OAAO,KAAKC,UAAU,MAAM,0BAA0B;AACtD,OAAO,KAAKC,OAAO,MAAM,sBAAsB;AAC/C,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAI9C,SAASC,UAAU,QAAQ,gBAAgB;AAK3C,MAAMC,MAAM,GAAG,qBAAqB;AAsOpC;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMC,OAAO,GAA+BH,MAAM,CAACG,OAAO;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAO,MAAMC,IAAI,GAAqCJ,MAAM,CAACI,IAAI;AAEjE,MAAMC,KAAK,gBAAiBF,OAAO,CAAC,KAAK,CAAC,CAAC;AAC3C;AACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BAE,KAAK,IAAIC,IAAI;AAGf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,MAAMC,QAAQ,gBAAwBH,IAAI,CAAC,KAAK,CAAC,CAAC;AAEzD;;;;;;;;;;;;;;;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,SAAS,CAACV,IAAI,CAAC,EAAE;IACnBuB,CAAC,CAACvB,IAAI,CAACc,OAAO,CAAC;EACjB;EACA,OAAOd,IAAI;AACb,CAAC,CACF","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Runtime.d.ts b/.opencode/node_modules/effect/dist/Runtime.d.ts index 2f938efe0fc4d5320e560feb6220c7a5ec268fca..c9ab657e62dfc6fa5792171e2330f7fd4b537742 100644 --- a/.opencode/node_modules/effect/dist/Runtime.d.ts +++ b/.opencode/node_modules/effect/dist/Runtime.d.ts @@ -4,13 +4,19 @@ import type * as Fiber from "./Fiber.ts"; /** * Represents a teardown function that handles program completion and determines the exit code. * - * The teardown function is called when an Effect program completes (either successfully or with failure) - * and is responsible for determining the appropriate exit code and performing any cleanup operations. + * **When to use** * - * @param exit - The result of the Effect program execution - * @param onExit - Callback to execute with the determined exit code + * Use when integrating {@link makeRunMain} with a host platform that needs to + * translate an Effect `Exit` into a process, worker, or application exit code. + * + * **Details** + * + * A teardown function is called when an Effect program completes, either + * successfully or with a failure. It determines the appropriate exit code and + * can perform cleanup before invoking the supplied `onExit` callback. + * + * **Example** (Customizing teardown behavior) * - * @example * ```ts * import { Effect, Exit, Runtime } from "effect" * @@ -38,60 +44,91 @@ import type * as Fiber from "./Fiber.ts"; * runMain(program, { teardown: customTeardown }) * ``` * - * @category Model + * @category models * @since 4.0.0 */ export interface Teardown { (exit: Exit.Exit, onExit: (code: number) => void): void; } /** - * The default teardown function that determines exit codes based on Effect completion. + * The default teardown function that determines exit codes from an Effect exit. * - * This teardown function follows standard Unix conventions: - * - Returns exit code 0 for successful completion - * - Returns exit code 1 for failures (except interruption-only failures) - * - Returns exit code 0 for interruption-only failures + * **When to use** * - * @example - * ```ts - * import { Effect, Exit, Runtime } from "effect" + * Use as the standard teardown for main programs with conventional process + * exit codes and support for {@link errorExitCode}. + * + * **Details** + * + * This teardown follows these exit-code rules: + * + * - `0` for successful completion. + * - `130` for interruption-only failures. + * - The squashed error's {@link errorExitCode} value for other failures when + * present. + * - `1` for other failures. * - * // The default teardown behavior - * const program1 = Effect.succeed(42) - * const program2 = Effect.fail("error") - * const program3 = Effect.interrupt + * **Gotchas** + * + * The `130` code is used only when the Cause contains interruptions and no + * other failure reasons. Mixed causes use the squashed error path instead. + * + * **Example** (Using default teardown) + * + * ```ts + * import { Exit, Runtime } from "effect" * - * // Using defaultTeardown directly * const logExitCode = (exit: Exit.Exit) => { * Runtime.defaultTeardown(exit, (code) => { * console.log(`Exit code: ${code}`) * }) * } * - * // Success case - exit code 0 * logExitCode(Exit.succeed(42)) + * // Output: Exit code: 0 * - * // Failure case - exit code 1 * logExitCode(Exit.fail("error")) + * // Output: Exit code: 1 * - * // Interruption case - exit code 0 * logExitCode(Exit.interrupt(123)) + * // Output: Exit code: 130 * ``` * - * @category Teardown + * @see {@link errorExitCode} for customizing failure exit codes + * + * @category running * @since 4.0.0 */ export declare const defaultTeardown: Teardown; /** * Creates a platform-specific main program runner that handles Effect execution lifecycle. * - * This function creates a runner that can execute Effect programs as main entry points, - * handling process signals, fiber management, and teardown operations. The provided - * function receives a fiber and teardown callback to implement platform-specific behavior. + * **When to use** + * + * Use when building a runtime adapter for a host platform. + * + * **Details** * - * @param f - Function that sets up platform-specific behavior for the running Effect + * The runner executes Effect programs as main entry points. The provided + * function receives a forked fiber and a teardown callback so it can install + * platform-specific signal handling, fiber observers, and final exit behavior. + * + * Most applications should use a platform-provided runner, such as + * `NodeRuntime.runMain`, rather than constructing one directly. + * + * `disableErrorReporting` disables the automatic log emitted for unreported + * non-interruption failures. It does not change exit-code calculation or the + * custom teardown callback. + * + * **Gotchas** + * + * The setup function is responsible for observing the fiber and eventually + * invoking teardown. `makeRunMain` also tries to keep the host process alive + * with a long interval while the main fiber is running; if the host blocks + * timers, the runner still starts but cannot use that keep-alive fallback. + * + * **Example** (Creating platform runners) * - * @example * ```ts * import { Effect, Fiber, Runtime } from "effect" * @@ -135,7 +172,7 @@ export declare const defaultTeardown: Teardown; * }) * ``` * - * @category Run main + * @category running * @since 4.0.0 */ export declare const makeRunMain: (f: (options: { @@ -158,7 +195,14 @@ declare global { } } /** - * @category Exit code management + * Type-level key for the `Runtime.errorExitCode` marker. + * + * **When to use** + * + * Use to type properties keyed by `Runtime.errorExitCode` on custom error + * values. + * + * @category symbols * @since 4.0.0 */ export type errorExitCode = "~effect/Runtime/errorExitCode"; @@ -166,6 +210,24 @@ export type errorExitCode = "~effect/Runtime/errorExitCode"; * Allows associating an exit code with an error for determining the process * exit code on failure. * + * **When to use** + * + * Use when error classes should map failures to a specific process exit code + * when handled by {@link defaultTeardown}. + * + * **Details** + * + * Attach this marker as a readonly property on an error object. When the main + * program fails, {@link defaultTeardown} squashes the Cause and reads the marker + * from the resulting error value. + * + * **Gotchas** + * + * The marker is read from the squashed failure value. If a Cause contains + * multiple failures, the selected squashed error determines the exit code. + * + * **Example** (Setting a process exit code) + * * ```ts * import { Data, Effect, Runtime } from "effect" * import { NodeRuntime } from "@effect/platform-node" @@ -178,29 +240,81 @@ export type errorExitCode = "~effect/Runtime/errorExitCode"; * NodeRuntime.runMain(Effect.fail(new MyError())) * ``` * - * @category Exit code management + * @see {@link errorReported} for controlling automatic error logging + * @see {@link defaultTeardown} for the default failure exit-code rules that read this marker + * @see {@link getErrorExitCode} for reading the marker from unknown error values + * + * @category symbols * @since 4.0.0 */ export declare const errorExitCode: errorExitCode; /** - * @category Exit code management + * Reads the runtime exit-code marker from an unknown error value. + * + * **When to use** + * + * Use to read a custom failure exit code from an unknown error value, falling + * back to the default failure code. + * + * **Details** + * + * Returns the numeric `[Runtime.errorExitCode]` property when it is present on + * an object. Otherwise returns `1`, the default failure exit code used by + * `defaultTeardown`. + * + * **Gotchas** + * + * Non-object values, missing markers, and non-number marker values all return + * `1`. + * + * @see {@link errorExitCode} for the marker read by this function + * + * @category accessors * @since 4.0.0 */ export declare const getErrorExitCode: (u: unknown) => number; /** - * @category Error reporting management + * Type-level key for the `Runtime.errorReported` marker. + * + * **When to use** + * + * Use to type properties keyed by `Runtime.errorReported` on custom error + * values. + * + * @category symbols * @since 4.0.0 */ export type errorReported = "~effect/Runtime/errorReported"; /** - * Allows an error to opt-out of error reporting. + * Defines the runtime marker that controls default `runMain` error logging for an error. + * + * **When to use** + * + * Use when you need error classes reported by application code to avoid being + * logged again by the default main runner. + * + * **Details** + * + * Set `[Runtime.errorReported]` to `false` on an error object to suppress the + * runtime log because the error has already been reported. Omitted or + * non-boolean values are treated as `true`, so failures are logged by default. + * + * **Gotchas** + * + * This marker controls only automatic error logging. It does not change the + * failure Cause or the process exit code. + * `makeRunMain` reads the marker from `Cause.squash(cause)`, so for causes + * with multiple failures, the squashed error determines whether default logging + * is suppressed. + * + * **Example** (Suppressing error reporting) * * ```ts * import { Data, Effect, Runtime } from "effect" * import { NodeRuntime } from "@effect/platform-node" * * class MyError extends Data.TaggedError("MyError") { - * readonly [Runtime.errorReported] = true + * readonly [Runtime.errorReported] = false * } * * // If the program fails with MyError, the process will exit with code 1 but @@ -208,12 +322,34 @@ export type errorReported = "~effect/Runtime/errorReported"; * NodeRuntime.runMain(Effect.fail(new MyError())) * ``` * - * @category Error reporting management + * @see {@link errorExitCode} for controlling failure exit codes + * @see {@link getErrorReported} for reading the marker from unknown error values + * + * @category symbols * @since 4.0.0 */ export declare const errorReported: errorReported; /** - * @category Error reporting management + * Reads the runtime error-reporting marker from an unknown error value. + * + * **When to use** + * + * Use to read whether an unknown error value should be treated as already + * reported by the default main runner. + * + * **Details** + * + * Returns a boolean `[Runtime.errorReported]` property when it is present on an + * object. Otherwise returns `true`, so failures are logged by default. + * + * **Gotchas** + * + * Non-object values, missing markers, and non-boolean marker values all return + * `true`. + * + * @see {@link errorReported} for the marker read by this function + * + * @category accessors * @since 4.0.0 */ export declare const getErrorReported: (u: unknown) => boolean; diff --git a/.opencode/node_modules/effect/dist/Runtime.d.ts.map b/.opencode/node_modules/effect/dist/Runtime.d.ts.map index 44b4788dadfe515611223d848a75404f1b6b5d00..b17909161bb7798921efe1e71bdab19ad1de083d 100644 --- a/.opencode/node_modules/effect/dist/Runtime.d.ts.map +++ b/.opencode/node_modules/effect/dist/Runtime.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Runtime.d.ts","sourceRoot":"","sources":["../src/Runtime.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAA;AAEnC,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,WAAW,QAAQ;IACvB,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAA;CACpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,eAAe,EAAE,QAO7B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,eAAO,MAAM,WAAW,GACtB,GAAG,CAAC,CAAC,EAAE,CAAC,EACN,OAAO,EAAE;IACP,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACjC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;CAC5B,KACE,IAAI,KACR;IACD,CACE,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;KACzC,GACA,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,C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C,aAAa,CAAC,CAAC,EAAE,MAAM,CAAA;QACjC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC,EAAE,OAAO,CAAA;KACnC;CACF;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,GAAG,+BAA+B,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,aAAa,EAAE,aAA+C,CAAA;AAE3E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,gBAAgB,GAAI,GAAG,OAAO,KAAG,MAQ7C,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,GAAG,+BAA+B,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,aAAa,EAAE,aAA+C,CAAA;AAE3E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,gBAAgB,GAAI,GAAG,OAAO,KAAG,OAQ7C,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Runtime.js b/.opencode/node_modules/effect/dist/Runtime.js index b56a1520344ea5051b419b85a787e19137ae934a..534604dcd22a4d46ca820612fe9a5613b03e143a 100644 --- a/.opencode/node_modules/effect/dist/Runtime.js +++ b/.opencode/node_modules/effect/dist/Runtime.js @@ -1,28 +1,11 @@ /** - * This module provides utilities for running Effect programs and managing their execution lifecycle. - * - * The Runtime module contains functions for creating main program runners that handle process - * teardown, error reporting, and exit code management. These utilities are particularly useful - * for creating CLI applications and server processes that need to manage their lifecycle properly. - * - * @example - * ```ts - * import { Effect, Fiber, Runtime } from "effect" - * - * // Create a main runner for Node.js - * const runMain = Runtime.makeRunMain((options) => { - * process.on("SIGINT", () => Effect.runFork(Fiber.interrupt(options.fiber))) - * process.on("SIGTERM", () => Effect.runFork(Fiber.interrupt(options.fiber))) - * - * options.fiber.addObserver((exit) => { - * options.teardown(exit, (code) => process.exit(code)) - * }) - * }) - * - * // Use the runner - * const program = Effect.log("Hello, World!") - * runMain(program) - * ``` + * Helpers for turning an `Effect` program into a host application's main entry + * point. This module is the low-level layer used by platform adapters to run a + * main effect, observe its fiber, report unhandled failures, and translate the + * resulting `Exit` into an application or process exit code. It provides + * `makeRunMain`, the default teardown behavior, and error markers for custom + * exit codes and already-reported failures. Application code usually calls the + * platform-provided runner instead of using this module directly. * * @since 4.0.0 */ @@ -31,40 +14,52 @@ import * as Effect from "effect/Effect"; import * as Exit from "effect/Exit"; import { constVoid, dual } from "effect/Function"; /** - * The default teardown function that determines exit codes based on Effect completion. + * The default teardown function that determines exit codes from an Effect exit. * - * This teardown function follows standard Unix conventions: - * - Returns exit code 0 for successful completion - * - Returns exit code 1 for failures (except interruption-only failures) - * - Returns exit code 0 for interruption-only failures + * **When to use** * - * @example - * ```ts - * import { Effect, Exit, Runtime } from "effect" + * Use as the standard teardown for main programs with conventional process + * exit codes and support for {@link errorExitCode}. + * + * **Details** + * + * This teardown follows these exit-code rules: * - * // The default teardown behavior - * const program1 = Effect.succeed(42) - * const program2 = Effect.fail("error") - * const program3 = Effect.interrupt + * - `0` for successful completion. + * - `130` for interruption-only failures. + * - The squashed error's {@link errorExitCode} value for other failures when + * present. + * - `1` for other failures. + * + * **Gotchas** + * + * The `130` code is used only when the Cause contains interruptions and no + * other failure reasons. Mixed causes use the squashed error path instead. + * + * **Example** (Using default teardown) + * + * ```ts + * import { Exit, Runtime } from "effect" * - * // Using defaultTeardown directly * const logExitCode = (exit: Exit.Exit) => { * Runtime.defaultTeardown(exit, (code) => { * console.log(`Exit code: ${code}`) * }) * } * - * // Success case - exit code 0 * logExitCode(Exit.succeed(42)) + * // Output: Exit code: 0 * - * // Failure case - exit code 1 * logExitCode(Exit.fail("error")) + * // Output: Exit code: 1 * - * // Interruption case - exit code 0 * logExitCode(Exit.interrupt(123)) + * // Output: Exit code: 130 * ``` * - * @category Teardown + * @see {@link errorExitCode} for customizing failure exit codes + * + * @category running * @since 4.0.0 */ export const defaultTeardown = (exit, onExit) => { @@ -75,13 +70,32 @@ export const defaultTeardown = (exit, onExit) => { /** * Creates a platform-specific main program runner that handles Effect execution lifecycle. * - * This function creates a runner that can execute Effect programs as main entry points, - * handling process signals, fiber management, and teardown operations. The provided - * function receives a fiber and teardown callback to implement platform-specific behavior. + * **When to use** + * + * Use when building a runtime adapter for a host platform. + * + * **Details** * - * @param f - Function that sets up platform-specific behavior for the running Effect + * The runner executes Effect programs as main entry points. The provided + * function receives a forked fiber and a teardown callback so it can install + * platform-specific signal handling, fiber observers, and final exit behavior. + * + * Most applications should use a platform-provided runner, such as + * `NodeRuntime.runMain`, rather than constructing one directly. + * + * `disableErrorReporting` disables the automatic log emitted for unreported + * non-interruption failures. It does not change exit-code calculation or the + * custom teardown callback. + * + * **Gotchas** + * + * The setup function is responsible for observing the fiber and eventually + * invoking teardown. `makeRunMain` also tries to keep the host process alive + * with a long interval while the main fiber is running; if the host blocks + * timers, the runner still starts but cannot use that keep-alive fallback. + * + * **Example** (Creating platform runners) * - * @example * ```ts * import { Effect, Fiber, Runtime } from "effect" * @@ -125,7 +139,7 @@ export const defaultTeardown = (exit, onExit) => { * }) * ``` * - * @category Run main + * @category running * @since 4.0.0 */ export const makeRunMain = f => dual(args => Effect.isEffect(args[0]), (effect, options) => { @@ -150,6 +164,24 @@ export const makeRunMain = f => dual(args => Effect.isEffect(args[0]), (effect, * Allows associating an exit code with an error for determining the process * exit code on failure. * + * **When to use** + * + * Use when error classes should map failures to a specific process exit code + * when handled by {@link defaultTeardown}. + * + * **Details** + * + * Attach this marker as a readonly property on an error object. When the main + * program fails, {@link defaultTeardown} squashes the Cause and reads the marker + * from the resulting error value. + * + * **Gotchas** + * + * The marker is read from the squashed failure value. If a Cause contains + * multiple failures, the selected squashed error determines the exit code. + * + * **Example** (Setting a process exit code) + * * ```ts * import { Data, Effect, Runtime } from "effect" * import { NodeRuntime } from "@effect/platform-node" @@ -162,12 +194,36 @@ export const makeRunMain = f => dual(args => Effect.isEffect(args[0]), (effect, * NodeRuntime.runMain(Effect.fail(new MyError())) * ``` * - * @category Exit code management + * @see {@link errorReported} for controlling automatic error logging + * @see {@link defaultTeardown} for the default failure exit-code rules that read this marker + * @see {@link getErrorExitCode} for reading the marker from unknown error values + * + * @category symbols * @since 4.0.0 */ export const errorExitCode = "~effect/Runtime/errorExitCode"; /** - * @category Exit code management + * Reads the runtime exit-code marker from an unknown error value. + * + * **When to use** + * + * Use to read a custom failure exit code from an unknown error value, falling + * back to the default failure code. + * + * **Details** + * + * Returns the numeric `[Runtime.errorExitCode]` property when it is present on + * an object. Otherwise returns `1`, the default failure exit code used by + * `defaultTeardown`. + * + * **Gotchas** + * + * Non-object values, missing markers, and non-number marker values all return + * `1`. + * + * @see {@link errorExitCode} for the marker read by this function + * + * @category accessors * @since 4.0.0 */ export const getErrorExitCode = u => { @@ -180,14 +236,35 @@ export const getErrorExitCode = u => { return 1; }; /** - * Allows an error to opt-out of error reporting. + * Defines the runtime marker that controls default `runMain` error logging for an error. + * + * **When to use** + * + * Use when you need error classes reported by application code to avoid being + * logged again by the default main runner. + * + * **Details** + * + * Set `[Runtime.errorReported]` to `false` on an error object to suppress the + * runtime log because the error has already been reported. Omitted or + * non-boolean values are treated as `true`, so failures are logged by default. + * + * **Gotchas** + * + * This marker controls only automatic error logging. It does not change the + * failure Cause or the process exit code. + * `makeRunMain` reads the marker from `Cause.squash(cause)`, so for causes + * with multiple failures, the squashed error determines whether default logging + * is suppressed. + * + * **Example** (Suppressing error reporting) * * ```ts * import { Data, Effect, Runtime } from "effect" * import { NodeRuntime } from "@effect/platform-node" * * class MyError extends Data.TaggedError("MyError") { - * readonly [Runtime.errorReported] = true + * readonly [Runtime.errorReported] = false * } * * // If the program fails with MyError, the process will exit with code 1 but @@ -195,12 +272,34 @@ export const getErrorExitCode = u => { * NodeRuntime.runMain(Effect.fail(new MyError())) * ``` * - * @category Error reporting management + * @see {@link errorExitCode} for controlling failure exit codes + * @see {@link getErrorReported} for reading the marker from unknown error values + * + * @category symbols * @since 4.0.0 */ export const errorReported = "~effect/Runtime/errorReported"; /** - * @category Error reporting management + * Reads the runtime error-reporting marker from an unknown error value. + * + * **When to use** + * + * Use to read whether an unknown error value should be treated as already + * reported by the default main runner. + * + * **Details** + * + * Returns a boolean `[Runtime.errorReported]` property when it is present on an + * object. Otherwise returns `true`, so failures are logged by default. + * + * **Gotchas** + * + * Non-object values, missing markers, and non-boolean marker values all return + * `true`. + * + * @see {@link errorReported} for the marker read by this function + * + * @category accessors * @since 4.0.0 */ export const getErrorReported = u => { diff --git a/.opencode/node_modules/effect/dist/Runtime.js.map b/.opencode/node_modules/effect/dist/Runtime.js.map index d2433e048fee351f6e0db80ba19007cf3152b389..fb87ef2bc00c8d5bda6ea507b0f60fb4560a48eb 100644 --- a/.opencode/node_modules/effect/dist/Runtime.js.map +++ b/.opencode/node_modules/effect/dist/Runtime.js.map @@ -1 +1 @@ -{"version":3,"file":"Runtime.js","names":["Cause","Effect","Exit","constVoid","dual","defaultTeardown","exit","onExit","isSuccess","hasInterruptsOnly","cause","getErrorExitCode","squash","makeRunMain","f","args","isEffect","effect","options","fiber","disableErrorReporting","runFork","tapCause","void","isReported","getErrorReported","logError","keepAlive","globalThis","setInterval","addObserver","clearInterval","teardown","errorExitCode","u","code","errorReported"],"sources":["../src/Runtime.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAO,KAAKA,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,IAAI,MAAM,aAAa;AACnC,SAASC,SAAS,EAAEC,IAAI,QAAQ,iBAAiB;AA+CjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,OAAO,MAAMC,eAAe,GAAaA,CACvCC,IAAqB,EACrBC,MAA8B,KAC5B;EACF,IAAIL,IAAI,CAACM,SAAS,CAACF,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QAAQ,IAAI3B,eAAe;EACrD,OAAOS,CAAC,CAAC;IAAEK,KAAK;IAAEa;EAAQ,CAAE,CAAC;AAC/B,CAAC,CAAC;AAeJ;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,aAAa,GAAkB,+BAA+B;AAE3E;;;;AAIA,OAAO,MAAMtB,gBAAgB,GAAIuB,CAAU,IAAY;EACrD,IAAI,OAAOA,CAAC,KAAK,QAAQ,IAAIA,CAAC,KAAK,IAAI,IAAID,aAAa,IAAIC,CAAC,EAAE;IAC7D,MAAMC,IAAI,GAAGD,CAAC,CAACD,aAAa,CAAC;IAC7B,IAAI,OAAOE,IAAI,KAAK,QAAQ,EAAE;MAC5B,OAAOA,IAAI;IACb;EACF;EACA,OAAO,CAAC;AACV,CAAC;AAQD;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,aAAa,GAAkB,+BAA+B;AAE3E;;;;AAIA,OAAO,MAAMX,gBAAgB,GAAIS,CAAU,IAAa;EACtD,IAAI,OAAOA,CAAC,KAAK,QAAQ,IAAIA,CAAC,KAAK,IAAI,IAAIE,aAAa,IAAIF,CAAC,EAAE;IAC7D,MAAMV,UAAU,GAAGU,CAAC,CAACE,aAAa,CAAC;IACnC,IAAI,OAAOZ,UAAU,KAAK,SAAS,EAAE;MACnC,OAAOA,UAAU;IACnB;EACF;EACA,OAAO,IAAI;AACb,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Runtime.js","names":["Cause","Effect","Exit","constVoid","dual","defaultTeardown","exit","onExit","isSuccess","hasInterruptsOnly","cause","getErrorExitCode","squash","makeRunMain","f","args","isEffect","effect","options","fiber","disableErrorReporting","runFork","tapCause","void","isReported","getErrorReported","logError","keepAlive","globalThis","setInterval","addObserver","clearInterval","teardown","errorExitCode","u","code","errorReported"],"sources":["../src/Runtime.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAWA,OAAO,KAAKA,KAAK,MAAM,cAAc;AACrC,OAAO,KA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U;IACnB;EACF;EACA,OAAO,IAAI;AACb,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Schedule.d.ts b/.opencode/node_modules/effect/dist/Schedule.d.ts index 1db66a9726f18f1db7571ff39db7df66b97f9b86..190508838b4022cc7eac3443c49419f6fd0d9eda 100644 --- a/.opencode/node_modules/effect/dist/Schedule.d.ts +++ b/.opencode/node_modules/effect/dist/Schedule.d.ts @@ -12,9 +12,14 @@ declare const TypeId = "~effect/Schedule"; /** * A Schedule defines a strategy for repeating or retrying effects based on some policy. * - * @example + * **Example** (Defining retry and repeat schedules) + * * ```ts - * import { Console, Effect, Schedule } from "effect" + * import { Console, Data, Effect, Schedule } from "effect" + * + * class NetworkError extends Data.TaggedError("NetworkError")<{ + * readonly attempt: number + * }> {} * * // Basic retry schedule - retry up to 3 times with exponential backoff * const retrySchedule = Schedule.exponential("100 millis").pipe( @@ -25,32 +30,37 @@ declare const TypeId = "~effect/Schedule"; * const repeatSchedule: Schedule.Schedule = Schedule * .spaced("30 seconds") * - * // Advanced schedule with custom logic - * const smartRetry = Schedule.exponential("1 second") - * * const program = Effect.gen(function*() { - * // Using retry schedule + * let attempts = 0 + * * const result1 = yield* Effect.retry( - * Effect.suspend(() => Math.random() > 0.5 ? Effect.fail("temporary error") : Effect.succeed("Success")), + * Effect.gen(function*() { + * attempts++ + * if (attempts < 3) { + * return yield* Effect.fail(new NetworkError({ attempt: attempts })) + * } + * return "Success" + * }), * retrySchedule * ) + * console.log(result1) // "Success" * - * // Using repeat schedule * yield* Console.log("heartbeat").pipe( * Effect.repeat(repeatSchedule.pipe(Schedule.take(5))) * ) * }) * ``` * + * @category models * @since 2.0.0 - * @category Models */ export interface Schedule extends Schedule.Variance, Pipeable { } /** * Metadata provided to schedule functions containing timing and input information. * - * @example + * **Example** (Reading schedule input metadata) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -69,8 +79,8 @@ export interface Schedule { readonly input: Input; @@ -83,18 +93,19 @@ export interface InputMetadata { /** * Extended metadata that includes both input metadata and the output value from the schedule. * - * @example + * **Example** (Logging schedule output metadata) + * * ```ts * import { Console, Duration, Effect, Schedule } from "effect" * - * // Custom schedule that logs metadata including output + * // Custom schedule that logs metadata and output for each recurrence * const loggingSchedule = Schedule.unfold(0, (n) => Effect.succeed(n + 1)).pipe( * Schedule.addDelay(() => Effect.succeed(Duration.millis(100))), - * Schedule.tapOutput((output) => { - * return Console.log( - * `Output: ${output}` - * ) - * }) + * Schedule.collectWhile((metadata) => + * Console.log( + * `Output: ${metadata.output}, attempt: ${metadata.attempt}, elapsed: ${metadata.elapsed}ms` + * ).pipe(Effect.as(metadata.attempt <= 3)) + * ) * ) * * const program = Effect.gen(function*() { @@ -105,27 +116,37 @@ export interface InputMetadata { * }) * * // Output logs will show: - * // "Output: 0, Attempt: 1, Elapsed: 0ms, Since previous: 0ms" - * // "Output: 1, Attempt: 2, Elapsed: 100ms, Since previous: 100ms" - * // "Output: 2, Attempt: 3, Elapsed: 200ms, Since previous: 100ms" + * // Output: 0, attempt: 1, elapsed: 0ms + * // Output: 1, attempt: 2, elapsed: 100ms + * // Output: 2, attempt: 3, elapsed: 200ms * ``` * + * @category metadata * @since 4.0.0 - * @category Metadata */ export interface Metadata extends InputMetadata { readonly output: Output; readonly duration: Duration.Duration; } /** + * Context reference containing metadata for the currently running schedule step. + * + * **Details** + * + * Repeat, retry, stream, and channel scheduling operations provide this service + * to effects run between schedule steps. The default value contains undefined + * input and output values, zero duration, and zeroed timing fields before any + * schedule step has produced metadata. + * + * @category metadata * @since 4.0.0 - * @category Metadata */ export declare const CurrentMetadata: Context.Reference>; /** * The Schedule namespace contains types and utilities for working with schedules. * - * @example + * **Example** (Creating custom schedules with the namespace) + * * ```ts * import { Duration, Effect, Schedule } from "effect" * @@ -153,13 +174,13 @@ export declare const CurrentMetadata: Context.Reference { readonly [TypeId]: VarianceStruct; } /** - * Internal structure that holds the variance annotations for Schedule type parameters. - * - * @example - * ```ts - * import { Effect, Schedule } from "effect" - * - * // The variance struct defines how Schedule's type parameters behave - * // This internal interface is used for type variance annotations - * - * // Example showing variance relationships: - * interface Animal { - * name: string - * } - * interface Dog extends Animal { - * breed: string - * } - * - * // Output is covariant - more specific types can be substituted - * const stringSchedule = Schedule.spaced("1 second").pipe( - * Schedule.map(() => Effect.succeed("output")) - * ) + * Type-level marker used by `Schedule.Variance` to record the variance of + * `Schedule` type parameters. * - * // Input is contravariant - more general types can be accepted - * const numberSchedule = Schedule.exponential("100 millis") + * **Details** * - * // This enables proper type relationships where schedules can be composed safely - * ``` + * This interface exists for TypeScript inference and assignability. Users + * normally do not construct or inspect it directly. * - * @since 2.0.0 - * @category Models + * @category models + * @since 4.0.0 */ interface VarianceStruct { readonly _Out: Covariant; @@ -231,7 +232,8 @@ export declare namespace Schedule { /** * Type guard that checks if a value is a Schedule. * - * @example + * **Example** (Checking for schedules) + * * ```ts * import { Schedule } from "effect" * @@ -244,64 +246,63 @@ export declare namespace Schedule { * console.log(Schedule.isSchedule(undefined)) // false * ``` * - * @since 2.0.0 * @category guards + * @since 2.0.0 */ export declare const isSchedule: (u: unknown) => u is Schedule; /** * Creates a Schedule from a step function that returns a Pull. * - * @example - * ```ts - * import { Schedule } from "effect" + * **Example** (Creating a custom schedule from a step function) * - * // fromStep is an advanced function for creating custom schedules - * // It requires a step function that returns a Pull value + * ```ts + * import { Cause, Duration, Effect, Schedule } from "effect" * - * // Most users should use simpler schedule constructors like: - * const simpleSchedule = Schedule.exponential("100 millis") - * const spacedSchedule = Schedule.spaced("1 second") - * const recurringSchedule = Schedule.recurs(5) + * const schedule = Schedule.fromStep(Effect.sync(() => { + * let count = 0 * - * // These can be combined and transformed as needed - * const complexSchedule = simpleSchedule.pipe( - * Schedule.both(Schedule.recurs(3)) - * ) + * return (_now: number, _input: string) => { + * if (count >= 3) { + * return Cause.done(count) + * } + * return Effect.succeed([count++, Duration.millis(100)] as [number, Duration.Duration]) + * } + * })) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export declare const fromStep: (step: Effect<(now: number, input: Input) => Pull.Pull<[Output, Duration.Duration], ErrorX, Output, EnvX>, Error, Env>) => Schedule, Env | EnvX>; /** * Creates a Schedule from a step function that receives metadata about the schedule's execution. * - * @example - * ```ts - * import { Effect, Schedule } from "effect" + * **Example** (Creating a metadata-aware schedule) * - * // fromStepWithMetadata is an advanced function for creating schedules - * // that need access to execution metadata like timing and recurrence count + * ```ts + * import { Cause, Duration, Effect, Schedule } from "effect" * - * // Most users should use simpler metadata-aware functions like: - * const metadataSchedule = Schedule.spaced("1 second").pipe( - * Schedule.collectWhile((metadata) => Effect.succeed(metadata.attempt <= 5)) - * ) + * const firstThreeInputs = Schedule.fromStepWithMetadata(Effect.succeed((metadata: Schedule.InputMetadata) => { + * if (metadata.attempt > 3) { + * return Cause.done("finished") + * } * - * // Or use existing schedules with metadata transformations: - * const conditionalSchedule = Schedule.exponential("100 millis").pipe( - * Schedule.tapOutput((output) => Effect.log(`Output: ${output}`)) - * ) + * return Effect.succeed([ + * `attempt ${metadata.attempt}: ${metadata.input}`, + * Duration.millis(250) + * ] as [string, Duration.Duration]) + * })) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export declare const fromStepWithMetadata: (step: Effect<(options: InputMetadata) => Pull.Pull<[Output, Duration.Duration], ErrorX, Output, EnvX>, Error, Env>) => Schedule, Env | EnvX>; /** * Extracts the step function from a Schedule. * - * @example + * **Example** (Extracting a schedule step function) + * * ```ts * import { Effect, Schedule } from "effect" * @@ -311,30 +312,46 @@ export declare const fromStepWithMetadata: (schedule: Schedule) => Effect<(now: number, input: Input) => Pull.Pull<[Output, Duration.Duration], Error, Output, Env>, never, Env>; /** - * Extracts a step function from a Schedule that provides metadata about each - * execution. It will also handle sleeping for the computed delay. + * Extracts a step function from a `Schedule` that sleeps for each computed + * delay and returns metadata for the completed step. + * + * **When to use** + * + * Use to drive a schedule manually while preserving the computed output, + * delay, input, attempt, and elapsed timing metadata for each step. + * + * **Details** + * + * The returned step reads the current time from `Clock` when invoked, calls the + * schedule step with that timestamp and input, sleeps for the returned + * duration, and then yields `Metadata`. + * + * @see {@link toStep} for manually supplying the timestamp and handling the returned delay yourself + * @see {@link toStepWithSleep} for the same automatic sleeping behavior when only the schedule output is needed * - * @since 4.0.0 * @category destructors + * @since 4.0.0 */ export declare const toStepWithMetadata: (schedule: Schedule) => Effect<(input: Input) => Pull.Pull, Error, Output, Env>, never, Env>; /** * Extracts a step function from a Schedule that automatically handles sleep delays. * - * @example + * **Example** (Extracting a sleeping step function) + * * ```ts * import { Effect, Schedule } from "effect" * @@ -357,37 +374,34 @@ export declare const toStepWithMetadata: (schedule: S * }) * ``` * - * @since 4.0.0 * @category destructors + * @since 4.0.0 */ export declare const toStepWithSleep: (schedule: Schedule) => Effect<(input: Input) => Pull.Pull, never, Env>; /** * Returns a new `Schedule` that adds the delay computed by the specified - * effectful function to the the next recurrence of the schedule. + * effectful function to the next recurrence of the schedule. + * + * **Example** (Adding extra delay to a schedule) * - * @example * ```ts * import { Console, Data, Duration, Effect, Schedule } from "effect" * * class RetryAttemptError extends Data.TaggedError("RetryAttemptError")<{ readonly message: string }> {} * - * // Add random jitter to schedule delays - * const jitteredSchedule = Schedule.addDelay( + * // Add a deterministic extra delay based on the schedule output + * const delayedSchedule = Schedule.addDelay( * Schedule.exponential("100 millis").pipe(Schedule.take(5)), * (output) => - * // Add random jitter between 0-50ms - * Effect.succeed(Duration.millis(Math.random() * 50)) + * Effect.succeed(Duration.millis(Duration.toMillis(output) * 0.25)) * ) * - * const jitterProgram = Effect.gen(function*() { + * const repeatProgram = Effect.gen(function*() { * yield* Effect.repeat( - * Effect.gen(function*() { - * yield* Console.log(`Task executed at ${new Date().toISOString()}`) - * return "jittered task" - * }), - * jitteredSchedule.pipe( + * Effect.succeed("delayed task"), + * delayedSchedule.pipe( * Schedule.tapOutput((delay) => - * Console.log(`Base delay with jitter applied`) + * Console.log(`Base delay: ${delay}`) * ) * ) * ) @@ -415,12 +429,15 @@ export declare const toStepWithSleep: (schedule: Sche * ) * }) * - * // Add effectful delay computation + * // Add effectful delay computation from deterministic service data + * const loadByExecution = [1, 3, 2, 4] as const + * * const dynamicSchedule = Schedule.addDelay( * Schedule.spaced("1 second").pipe(Schedule.take(4)), - * (executionNumber) => - * // Simulate checking system load and return additional delay - * Effect.succeed(Duration.millis(Math.random() > 0.7 ? 2000 : 500)) + * (executionNumber) => { + * const load = loadByExecution[executionNumber] ?? 1 + * return Effect.succeed(Duration.millis(load * 100)) + * } * ) * * const dynamicProgram = Effect.gen(function*() { @@ -433,25 +450,6 @@ export declare const toStepWithSleep: (schedule: Sche * ) * }) * - * // Add delay based on previous execution results (30% extra) - * const resultBasedSchedule = Schedule.addDelay( - * Schedule.fibonacci("200 millis").pipe(Schedule.take(5)), - * (fibonacciDelay) => - * Effect.succeed(Duration.millis(Duration.toMillis(fibonacciDelay) * 0.3)) - * ) - * - * const resultProgram = Effect.gen(function*() { - * yield* Effect.repeat( - * Effect.gen(function*() { - * yield* Console.log("Result-based delay task") - * return Math.random() - * }), - * resultBasedSchedule.pipe( - * Schedule.tapOutput((delay) => Console.log(`Fibonacci delay: ${delay}`)) - * ) - * ) - * }) - * * // Combine with retry for progressive backoff * const progressiveRetrySchedule = Schedule.addDelay( * Schedule.exponential("50 millis").pipe(Schedule.take(4)), @@ -476,37 +474,34 @@ export declare const toStepWithSleep: (schedule: Sche * }) * ``` * + * @category delays & timeouts * @since 2.0.0 - * @category utils */ export declare const addDelay: { /** * Returns a new `Schedule` that adds the delay computed by the specified - * effectful function to the the next recurrence of the schedule. + * effectful function to the next recurrence of the schedule. + * + * **Example** (Adding extra delay to a schedule) * - * @example * ```ts * import { Console, Data, Duration, Effect, Schedule } from "effect" * * class RetryAttemptError extends Data.TaggedError("RetryAttemptError")<{ readonly message: string }> {} * - * // Add random jitter to schedule delays - * const jitteredSchedule = Schedule.addDelay( + * // Add a deterministic extra delay based on the schedule output + * const delayedSchedule = Schedule.addDelay( * Schedule.exponential("100 millis").pipe(Schedule.take(5)), * (output) => - * // Add random jitter between 0-50ms - * Effect.succeed(Duration.millis(Math.random() * 50)) + * Effect.succeed(Duration.millis(Duration.toMillis(output) * 0.25)) * ) * - * const jitterProgram = Effect.gen(function*() { + * const repeatProgram = Effect.gen(function*() { * yield* Effect.repeat( - * Effect.gen(function*() { - * yield* Console.log(`Task executed at ${new Date().toISOString()}`) - * return "jittered task" - * }), - * jitteredSchedule.pipe( + * Effect.succeed("delayed task"), + * delayedSchedule.pipe( * Schedule.tapOutput((delay) => - * Console.log(`Base delay with jitter applied`) + * Console.log(`Base delay: ${delay}`) * ) * ) * ) @@ -534,12 +529,15 @@ export declare const addDelay: { * ) * }) * - * // Add effectful delay computation + * // Add effectful delay computation from deterministic service data + * const loadByExecution = [1, 3, 2, 4] as const + * * const dynamicSchedule = Schedule.addDelay( * Schedule.spaced("1 second").pipe(Schedule.take(4)), - * (executionNumber) => - * // Simulate checking system load and return additional delay - * Effect.succeed(Duration.millis(Math.random() > 0.7 ? 2000 : 500)) + * (executionNumber) => { + * const load = loadByExecution[executionNumber] ?? 1 + * return Effect.succeed(Duration.millis(load * 100)) + * } * ) * * const dynamicProgram = Effect.gen(function*() { @@ -552,25 +550,6 @@ export declare const addDelay: { * ) * }) * - * // Add delay based on previous execution results (30% extra) - * const resultBasedSchedule = Schedule.addDelay( - * Schedule.fibonacci("200 millis").pipe(Schedule.take(5)), - * (fibonacciDelay) => - * Effect.succeed(Duration.millis(Duration.toMillis(fibonacciDelay) * 0.3)) - * ) - * - * const resultProgram = Effect.gen(function*() { - * yield* Effect.repeat( - * Effect.gen(function*() { - * yield* Console.log("Result-based delay task") - * return Math.random() - * }), - * resultBasedSchedule.pipe( - * Schedule.tapOutput((delay) => Console.log(`Fibonacci delay: ${delay}`)) - * ) - * ) - * }) - * * // Combine with retry for progressive backoff * const progressiveRetrySchedule = Schedule.addDelay( * Schedule.exponential("50 millis").pipe(Schedule.take(4)), @@ -595,37 +574,34 @@ export declare const addDelay: { * }) * ``` * + * @category delays & timeouts * @since 2.0.0 - * @category utils */ (f: (output: Output) => Effect): (self: Schedule) => Schedule; /** * Returns a new `Schedule` that adds the delay computed by the specified - * effectful function to the the next recurrence of the schedule. + * effectful function to the next recurrence of the schedule. + * + * **Example** (Adding extra delay to a schedule) * - * @example * ```ts * import { Console, Data, Duration, Effect, Schedule } from "effect" * * class RetryAttemptError extends Data.TaggedError("RetryAttemptError")<{ readonly message: string }> {} * - * // Add random jitter to schedule delays - * const jitteredSchedule = Schedule.addDelay( + * // Add a deterministic extra delay based on the schedule output + * const delayedSchedule = Schedule.addDelay( * Schedule.exponential("100 millis").pipe(Schedule.take(5)), * (output) => - * // Add random jitter between 0-50ms - * Effect.succeed(Duration.millis(Math.random() * 50)) + * Effect.succeed(Duration.millis(Duration.toMillis(output) * 0.25)) * ) * - * const jitterProgram = Effect.gen(function*() { + * const repeatProgram = Effect.gen(function*() { * yield* Effect.repeat( - * Effect.gen(function*() { - * yield* Console.log(`Task executed at ${new Date().toISOString()}`) - * return "jittered task" - * }), - * jitteredSchedule.pipe( + * Effect.succeed("delayed task"), + * delayedSchedule.pipe( * Schedule.tapOutput((delay) => - * Console.log(`Base delay with jitter applied`) + * Console.log(`Base delay: ${delay}`) * ) * ) * ) @@ -653,12 +629,15 @@ export declare const addDelay: { * ) * }) * - * // Add effectful delay computation + * // Add effectful delay computation from deterministic service data + * const loadByExecution = [1, 3, 2, 4] as const + * * const dynamicSchedule = Schedule.addDelay( * Schedule.spaced("1 second").pipe(Schedule.take(4)), - * (executionNumber) => - * // Simulate checking system load and return additional delay - * Effect.succeed(Duration.millis(Math.random() > 0.7 ? 2000 : 500)) + * (executionNumber) => { + * const load = loadByExecution[executionNumber] ?? 1 + * return Effect.succeed(Duration.millis(load * 100)) + * } * ) * * const dynamicProgram = Effect.gen(function*() { @@ -671,25 +650,6 @@ export declare const addDelay: { * ) * }) * - * // Add delay based on previous execution results (30% extra) - * const resultBasedSchedule = Schedule.addDelay( - * Schedule.fibonacci("200 millis").pipe(Schedule.take(5)), - * (fibonacciDelay) => - * Effect.succeed(Duration.millis(Duration.toMillis(fibonacciDelay) * 0.3)) - * ) - * - * const resultProgram = Effect.gen(function*() { - * yield* Effect.repeat( - * Effect.gen(function*() { - * yield* Console.log("Result-based delay task") - * return Math.random() - * }), - * resultBasedSchedule.pipe( - * Schedule.tapOutput((delay) => Console.log(`Fibonacci delay: ${delay}`)) - * ) - * ) - * }) - * * // Combine with retry for progressive backoff * const progressiveRetrySchedule = Schedule.addDelay( * Schedule.exponential("50 millis").pipe(Schedule.take(4)), @@ -714,17 +674,17 @@ export declare const addDelay: { * }) * ``` * + * @category delays & timeouts * @since 2.0.0 - * @category utils */ (self: Schedule, f: (output: Output) => Effect): Schedule; }; /** - * Returns a new `Schedule` that will first execute the left (i.e. `self`) - * schedule to completion. Once the left schedule is complete, the right (i.e. - * `other`) schedule will be executed to completion. + * Returns a schedule that runs `self` to completion, then runs `other`, and + * merges their outputs. + * + * **Example** (Sequencing quick and slow retries) * - * @example * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -756,16 +716,16 @@ export declare const addDelay: { * }) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ export declare const andThen: { /** - * Returns a new `Schedule` that will first execute the left (i.e. `self`) - * schedule to completion. Once the left schedule is complete, the right (i.e. - * `other`) schedule will be executed to completion. + * Returns a schedule that runs `self` to completion, then runs `other`, and + * merges their outputs. + * + * **Example** (Sequencing quick and slow retries) * - * @example * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -797,16 +757,16 @@ export declare const andThen: { * }) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ (other: Schedule): (self: Schedule) => Schedule; /** - * Returns a new `Schedule` that will first execute the left (i.e. `self`) - * schedule to completion. Once the left schedule is complete, the right (i.e. - * `other`) schedule will be executed to completion. + * Returns a schedule that runs `self` to completion, then runs `other`, and + * merges their outputs. + * + * **Example** (Sequencing quick and slow retries) * - * @example * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -838,21 +798,23 @@ export declare const andThen: { * }) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ (self: Schedule, other: Schedule): Schedule; }; /** - * Returns a new `Schedule` that will first execute the left (i.e. `self`) - * schedule to completion. Once the left schedule is complete, the right (i.e. - * `other`) schedule will be executed to completion. + * Returns a schedule that runs `self` to completion, then runs `other`, and + * preserves which schedule produced each output. + * + * **Details** * - * The output of the resulting schedule is a `Result` where outputs of the - * left schedule are emitted as `Result.Err` and outputs of the right - * schedule are emitted as `Result.Ok`. + * The resulting schedule emits a `Result` to indicate which phase produced + * each output: outputs from `self` are emitted as `Failure`, and outputs from + * `other` are emitted as `Success`. + * + * **Example** (Tracking sequential schedule phases) * - * @example * ```ts * import { Console, Effect, Result, Schedule } from "effect" * @@ -880,20 +842,22 @@ export declare const andThen: { * }) * ``` * - * @since 2.0.0 * @category sequencing + * @since 4.0.0 */ export declare const andThenResult: { /** - * Returns a new `Schedule` that will first execute the left (i.e. `self`) - * schedule to completion. Once the left schedule is complete, the right (i.e. - * `other`) schedule will be executed to completion. + * Returns a schedule that runs `self` to completion, then runs `other`, and + * preserves which schedule produced each output. + * + * **Details** + * + * The resulting schedule emits a `Result` to indicate which phase produced + * each output: outputs from `self` are emitted as `Failure`, and outputs from + * `other` are emitted as `Success`. * - * The output of the resulting schedule is a `Result` where outputs of the - * left schedule are emitted as `Result.Err` and outputs of the right - * schedule are emitted as `Result.Ok`. + * **Example** (Tracking sequential schedule phases) * - * @example * ```ts * import { Console, Effect, Result, Schedule } from "effect" * @@ -921,20 +885,22 @@ export declare const andThenResult: { * }) * ``` * - * @since 2.0.0 * @category sequencing + * @since 4.0.0 */ (other: Schedule): (self: Schedule) => Schedule, Input & Input2, Error | Error2, Env | Env2>; /** - * Returns a new `Schedule` that will first execute the left (i.e. `self`) - * schedule to completion. Once the left schedule is complete, the right (i.e. - * `other`) schedule will be executed to completion. + * Returns a schedule that runs `self` to completion, then runs `other`, and + * preserves which schedule produced each output. * - * The output of the resulting schedule is a `Result` where outputs of the - * left schedule are emitted as `Result.Err` and outputs of the right - * schedule are emitted as `Result.Ok`. + * **Details** + * + * The resulting schedule emits a `Result` to indicate which phase produced + * each output: outputs from `self` are emitted as `Failure`, and outputs from + * `other` are emitted as `Success`. + * + * **Example** (Tracking sequential schedule phases) * - * @example * ```ts * import { Console, Effect, Result, Schedule } from "effect" * @@ -962,8 +928,8 @@ export declare const andThenResult: { * }) * ``` * - * @since 2.0.0 * @category sequencing + * @since 4.0.0 */ (self: Schedule, other: Schedule): Schedule, Input & Input2, Error | Error2, Env | Env2>; }; @@ -972,7 +938,12 @@ export declare const andThenResult: { * to recur, using the maximum of the two durations between recurrences and * outputting a tuple of the outputs of both schedules. * - * @example + * **When to use** + * + * Use when the combined schedule should continue only while both schedules still recur. + * + * **Example** (Combining time and attempt limits) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -989,7 +960,7 @@ export declare const andThenResult: { * const program = Effect.gen(function*() { * const results = yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Task executed at ${new Date().toISOString()}`) + * yield* Console.log("Task executed") * return "task completed" * }), * bothSchedule.pipe( @@ -1033,8 +1004,10 @@ export declare const andThenResult: { * // Compare with either which provides union semantics (OR logic) * ``` * + * @see {@link either} for continuing while either schedule still recurs + * + * @category combining * @since 2.0.0 - * @category utilities */ export declare const both: { /** @@ -1042,7 +1015,12 @@ export declare const both: { * to recur, using the maximum of the two durations between recurrences and * outputting a tuple of the outputs of both schedules. * - * @example + * **When to use** + * + * Use when the combined schedule should continue only while both schedules still recur. + * + * **Example** (Combining time and attempt limits) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -1059,7 +1037,7 @@ export declare const both: { * const program = Effect.gen(function*() { * const results = yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Task executed at ${new Date().toISOString()}`) + * yield* Console.log("Task executed") * return "task completed" * }), * bothSchedule.pipe( @@ -1103,8 +1081,10 @@ export declare const both: { * // Compare with either which provides union semantics (OR logic) * ``` * + * @see {@link either} for continuing while either schedule still recurs + * + * @category combining * @since 2.0.0 - * @category utilities */ (other: Schedule): (self: Schedule) => Schedule<[Output, Output2], Input & Input2, Error | Error2, Env | Env2>; /** @@ -1112,7 +1092,12 @@ export declare const both: { * to recur, using the maximum of the two durations between recurrences and * outputting a tuple of the outputs of both schedules. * - * @example + * **When to use** + * + * Use when the combined schedule should continue only while both schedules still recur. + * + * **Example** (Combining time and attempt limits) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -1129,7 +1114,7 @@ export declare const both: { * const program = Effect.gen(function*() { * const results = yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Task executed at ${new Date().toISOString()}`) + * yield* Console.log("Task executed") * return "task completed" * }), * bothSchedule.pipe( @@ -1173,8 +1158,10 @@ export declare const both: { * // Compare with either which provides union semantics (OR logic) * ``` * + * @see {@link either} for continuing while either schedule still recurs + * + * @category combining * @since 2.0.0 - * @category utilities */ (self: Schedule, other: Schedule): Schedule<[Output, Output2], Input & Input2, Error | Error2, Env | Env2>; }; @@ -1183,7 +1170,13 @@ export declare const both: { * to recur, using the maximum of the two durations between recurrences and * outputting the result of the left schedule (i.e. `self`). * - * @example + * **When to use** + * + * Use when two schedules must both allow recurrence and only the left schedule's + * output is needed. + * + * **Example** (Combining schedules and keeping the left output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1206,8 +1199,8 @@ export declare const both: { * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ export declare const bothLeft: { /** @@ -1215,7 +1208,13 @@ export declare const bothLeft: { * to recur, using the maximum of the two durations between recurrences and * outputting the result of the left schedule (i.e. `self`). * - * @example + * **When to use** + * + * Use when two schedules must both allow recurrence and only the left schedule's + * output is needed. + * + * **Example** (Combining schedules and keeping the left output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1238,8 +1237,8 @@ export declare const bothLeft: { * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ (other: Schedule): (self: Schedule) => Schedule; /** @@ -1247,7 +1246,13 @@ export declare const bothLeft: { * to recur, using the maximum of the two durations between recurrences and * outputting the result of the left schedule (i.e. `self`). * - * @example + * **When to use** + * + * Use when two schedules must both allow recurrence and only the left schedule's + * output is needed. + * + * **Example** (Combining schedules and keeping the left output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1270,8 +1275,8 @@ export declare const bothLeft: { * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ (self: Schedule, other: Schedule): Schedule; }; @@ -1280,7 +1285,13 @@ export declare const bothLeft: { * to recur, using the maximum of the two durations between recurrences and * outputting the result of the right schedule (i.e. `other`). * - * @example + * **When to use** + * + * Use when two schedules must both allow recurrence and only the right + * schedule's output is needed. + * + * **Example** (Combining schedules and keeping the right output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1305,8 +1316,8 @@ export declare const bothLeft: { * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ export declare const bothRight: { /** @@ -1314,7 +1325,13 @@ export declare const bothRight: { * to recur, using the maximum of the two durations between recurrences and * outputting the result of the right schedule (i.e. `other`). * - * @example + * **When to use** + * + * Use when two schedules must both allow recurrence and only the right + * schedule's output is needed. + * + * **Example** (Combining schedules and keeping the right output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1339,8 +1356,8 @@ export declare const bothRight: { * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ (other: Schedule): (self: Schedule) => Schedule; /** @@ -1348,7 +1365,13 @@ export declare const bothRight: { * to recur, using the maximum of the two durations between recurrences and * outputting the result of the right schedule (i.e. `other`). * - * @example + * **When to use** + * + * Use when two schedules must both allow recurrence and only the right + * schedule's output is needed. + * + * **Example** (Combining schedules and keeping the right output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1373,8 +1396,8 @@ export declare const bothRight: { * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ (self: Schedule, other: Schedule): Schedule; }; @@ -1384,7 +1407,13 @@ export declare const bothRight: { * outputting the result of the combination of both schedule outputs using the * specified `combine` function. * - * @example + * **When to use** + * + * Use when two schedules must both allow recurrence and their outputs should be + * combined into a custom value. + * + * **Example** (Combining schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1413,8 +1442,8 @@ export declare const bothRight: { * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ export declare const bothWith: { /** @@ -1423,7 +1452,13 @@ export declare const bothWith: { * outputting the result of the combination of both schedule outputs using the * specified `combine` function. * - * @example + * **When to use** + * + * Use when two schedules must both allow recurrence and their outputs should be + * combined into a custom value. + * + * **Example** (Combining schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1452,8 +1487,8 @@ export declare const bothWith: { * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ (other: Schedule, combine: (selfOutput: Output, otherOutput: Output2) => Output3): (self: Schedule) => Schedule; /** @@ -1462,7 +1497,13 @@ export declare const bothWith: { * outputting the result of the combination of both schedule outputs using the * specified `combine` function. * - * @example + * **When to use** + * + * Use when two schedules must both allow recurrence and their outputs should be + * combined into a custom value. + * + * **Example** (Combining schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1491,16 +1532,22 @@ export declare const bothWith: { * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ (self: Schedule, other: Schedule, combine: (selfOutput: Output, otherOutput: Output2) => Output3): Schedule; }; /** - * Returns a new `Schedule` that always recurs, collecting all inputs of the - * schedule into an array. + * Returns a new `Schedule` that follows `self` and outputs the inputs seen so + * far as an array. + * + * **Details** + * + * This does not make the schedule run forever. The collected schedule stops + * when `self` stops and fails when `self` fails. + * + * **Example** (Collecting schedule inputs) * - * @example * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1522,15 +1569,21 @@ export declare const bothWith: { * }) * ``` * - * @since 2.0.0 - * @category utilities + * @category collecting + * @since 4.0.0 */ export declare const collectInputs: (self: Schedule) => Schedule, Input, Error, Env>; /** - * Returns a new `Schedule` that always recurs, collecting all outputs of the - * schedule into an array. + * Returns a new `Schedule` that follows `self` and outputs the schedule outputs + * seen so far as an array. + * + * **Details** + * + * This does not make the schedule run forever. The collected schedule stops + * when `self` stops and fails when `self` fails. + * + * **Example** (Collecting schedule outputs) * - * @example * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1550,39 +1603,19 @@ export declare const collectInputs: (self: Schedule(self: Schedule) => Schedule, Input, Error, Env>; /** * Returns a new `Schedule` that recurs as long as the specified `predicate` * returns `true`, collecting all outputs of the schedule into an array. * - * @example + * **Example** (Collecting outputs while a condition holds) + * * ```ts * import { Console, Effect, Schedule } from "effect" * - * // Collect outputs while under time limit - * const collectForTime = Schedule.collectWhile( - * Schedule.spaced("500 millis"), - * (metadata) => Effect.succeed(metadata.elapsed < 3000) // Stop after 3 seconds - * ) - * - * const timeBasedProgram = Effect.gen(function*() { - * const results = yield* Effect.repeat( - * Effect.gen(function*() { - * const value = Math.floor(Math.random() * 100) - * yield* Console.log(`Generated value: ${value}`) - * return value - * }), - * collectForTime - * ) - * - * yield* Console.log( - * `Collected ${results.length} values: [${results.join(", ")}]` - * ) - * }) - * * // Collect outputs while condition is met * const collectWhileSmall = Schedule.collectWhile( * Schedule.exponential("100 millis"), @@ -1593,16 +1626,16 @@ export declare const collectOutputs: (self: Schedule< * const conditionalProgram = Effect.gen(function*() { * let attempt = 0 * - * const delays = yield* Effect.repeat( + * const attempts = yield* Effect.repeat( * Effect.gen(function*() { * attempt++ * yield* Console.log(`Retry attempt ${attempt}`) - * return `${Date.now()}` + * return `attempt-${attempt}` * }), * collectWhileSmall * ) * - * yield* Console.log(`Collected attempts: [${delays.join(", ")}]`) + * yield* Console.log(`Collected attempts: [${attempts.join(", ")}]`) * }) * * // Collect with effectful predicate @@ -1619,19 +1652,17 @@ export declare const collectOutputs: (self: Schedule< * ) * * const effectfulProgram = Effect.gen(function*() { - * const timestamps = yield* Effect.repeat( - * Effect.gen(function*() { - * const now = new Date().toISOString() - * yield* Console.log(`Task at ${now}`) - * return now - * }), + * const results = yield* Effect.repeat( + * Effect.succeed("checked"), * collectWithCheck * ) * - * yield* Console.log(`Final collection: ${timestamps.length} items`) + * yield* Console.log(`Final collection: ${results.length} items`) * }) * * // Collect samples with condition + * const samples = [12, 18, 24, 30, 36] + * * const collectSamples = Schedule.collectWhile( * Schedule.spaced("200 millis"), * (metadata) => @@ -1639,55 +1670,36 @@ export declare const collectOutputs: (self: Schedule< * ) * * const samplingProgram = Effect.gen(function*() { - * const samples = yield* Effect.repeat( + * let index = 0 + * const collected = yield* Effect.repeat( * Effect.gen(function*() { - * const sample = Math.random() * 100 - * yield* Console.log(`Sample: ${sample.toFixed(1)}`) + * const sample = samples[index++] + * yield* Console.log(`Sample: ${sample}`) * return sample * }), * collectSamples * ) * - * const average = samples.reduce((sum, s) => sum + s, 0) / samples.length + * const average = collected.reduce((sum, s) => sum + s, 0) / collected.length * yield* Console.log( - * `Collected ${samples.length} samples, average: ${average.toFixed(1)}` + * `Collected ${collected.length} samples, average: ${average.toFixed(1)}` * ) * }) * ``` * + * @category collecting * @since 2.0.0 - * @category utilities */ export declare const collectWhile: { /** * Returns a new `Schedule` that recurs as long as the specified `predicate` * returns `true`, collecting all outputs of the schedule into an array. * - * @example + * **Example** (Collecting outputs while a condition holds) + * * ```ts * import { Console, Effect, Schedule } from "effect" * - * // Collect outputs while under time limit - * const collectForTime = Schedule.collectWhile( - * Schedule.spaced("500 millis"), - * (metadata) => Effect.succeed(metadata.elapsed < 3000) // Stop after 3 seconds - * ) - * - * const timeBasedProgram = Effect.gen(function*() { - * const results = yield* Effect.repeat( - * Effect.gen(function*() { - * const value = Math.floor(Math.random() * 100) - * yield* Console.log(`Generated value: ${value}`) - * return value - * }), - * collectForTime - * ) - * - * yield* Console.log( - * `Collected ${results.length} values: [${results.join(", ")}]` - * ) - * }) - * * // Collect outputs while condition is met * const collectWhileSmall = Schedule.collectWhile( * Schedule.exponential("100 millis"), @@ -1698,16 +1710,16 @@ export declare const collectWhile: { * const conditionalProgram = Effect.gen(function*() { * let attempt = 0 * - * const delays = yield* Effect.repeat( + * const attempts = yield* Effect.repeat( * Effect.gen(function*() { * attempt++ * yield* Console.log(`Retry attempt ${attempt}`) - * return `${Date.now()}` + * return `attempt-${attempt}` * }), * collectWhileSmall * ) * - * yield* Console.log(`Collected attempts: [${delays.join(", ")}]`) + * yield* Console.log(`Collected attempts: [${attempts.join(", ")}]`) * }) * * // Collect with effectful predicate @@ -1724,19 +1736,17 @@ export declare const collectWhile: { * ) * * const effectfulProgram = Effect.gen(function*() { - * const timestamps = yield* Effect.repeat( - * Effect.gen(function*() { - * const now = new Date().toISOString() - * yield* Console.log(`Task at ${now}`) - * return now - * }), + * const results = yield* Effect.repeat( + * Effect.succeed("checked"), * collectWithCheck * ) * - * yield* Console.log(`Final collection: ${timestamps.length} items`) + * yield* Console.log(`Final collection: ${results.length} items`) * }) * * // Collect samples with condition + * const samples = [12, 18, 24, 30, 36] + * * const collectSamples = Schedule.collectWhile( * Schedule.spaced("200 millis"), * (metadata) => @@ -1744,55 +1754,36 @@ export declare const collectWhile: { * ) * * const samplingProgram = Effect.gen(function*() { - * const samples = yield* Effect.repeat( + * let index = 0 + * const collected = yield* Effect.repeat( * Effect.gen(function*() { - * const sample = Math.random() * 100 - * yield* Console.log(`Sample: ${sample.toFixed(1)}`) + * const sample = samples[index++] + * yield* Console.log(`Sample: ${sample}`) * return sample * }), * collectSamples * ) * - * const average = samples.reduce((sum, s) => sum + s, 0) / samples.length + * const average = collected.reduce((sum, s) => sum + s, 0) / collected.length * yield* Console.log( - * `Collected ${samples.length} samples, average: ${average.toFixed(1)}` + * `Collected ${collected.length} samples, average: ${average.toFixed(1)}` * ) * }) * ``` * + * @category collecting * @since 2.0.0 - * @category utilities */ (predicate: (metadata: Metadata) => boolean | Effect): (self: Schedule) => Schedule, Input, Error | Error2, Env | Env2>; /** * Returns a new `Schedule` that recurs as long as the specified `predicate` * returns `true`, collecting all outputs of the schedule into an array. * - * @example + * **Example** (Collecting outputs while a condition holds) + * * ```ts * import { Console, Effect, Schedule } from "effect" * - * // Collect outputs while under time limit - * const collectForTime = Schedule.collectWhile( - * Schedule.spaced("500 millis"), - * (metadata) => Effect.succeed(metadata.elapsed < 3000) // Stop after 3 seconds - * ) - * - * const timeBasedProgram = Effect.gen(function*() { - * const results = yield* Effect.repeat( - * Effect.gen(function*() { - * const value = Math.floor(Math.random() * 100) - * yield* Console.log(`Generated value: ${value}`) - * return value - * }), - * collectForTime - * ) - * - * yield* Console.log( - * `Collected ${results.length} values: [${results.join(", ")}]` - * ) - * }) - * * // Collect outputs while condition is met * const collectWhileSmall = Schedule.collectWhile( * Schedule.exponential("100 millis"), @@ -1803,16 +1794,16 @@ export declare const collectWhile: { * const conditionalProgram = Effect.gen(function*() { * let attempt = 0 * - * const delays = yield* Effect.repeat( + * const attempts = yield* Effect.repeat( * Effect.gen(function*() { * attempt++ * yield* Console.log(`Retry attempt ${attempt}`) - * return `${Date.now()}` + * return `attempt-${attempt}` * }), * collectWhileSmall * ) * - * yield* Console.log(`Collected attempts: [${delays.join(", ")}]`) + * yield* Console.log(`Collected attempts: [${attempts.join(", ")}]`) * }) * * // Collect with effectful predicate @@ -1829,19 +1820,17 @@ export declare const collectWhile: { * ) * * const effectfulProgram = Effect.gen(function*() { - * const timestamps = yield* Effect.repeat( - * Effect.gen(function*() { - * const now = new Date().toISOString() - * yield* Console.log(`Task at ${now}`) - * return now - * }), + * const results = yield* Effect.repeat( + * Effect.succeed("checked"), * collectWithCheck * ) * - * yield* Console.log(`Final collection: ${timestamps.length} items`) + * yield* Console.log(`Final collection: ${results.length} items`) * }) * * // Collect samples with condition + * const samples = [12, 18, 24, 30, 36] + * * const collectSamples = Schedule.collectWhile( * Schedule.spaced("200 millis"), * (metadata) => @@ -1849,24 +1838,25 @@ export declare const collectWhile: { * ) * * const samplingProgram = Effect.gen(function*() { - * const samples = yield* Effect.repeat( + * let index = 0 + * const collected = yield* Effect.repeat( * Effect.gen(function*() { - * const sample = Math.random() * 100 - * yield* Console.log(`Sample: ${sample.toFixed(1)}`) + * const sample = samples[index++] + * yield* Console.log(`Sample: ${sample}`) * return sample * }), * collectSamples * ) * - * const average = samples.reduce((sum, s) => sum + s, 0) / samples.length + * const average = collected.reduce((sum, s) => sum + s, 0) / collected.length * yield* Console.log( - * `Collected ${samples.length} samples, average: ${average.toFixed(1)}` + * `Collected ${collected.length} samples, average: ${average.toFixed(1)}` * ) * }) * ``` * + * @category collecting * @since 2.0.0 - * @category utilities */ (self: Schedule, predicate: (metadata: Metadata) => boolean | Effect): Schedule, Input, Error | Error2, Env | Env2>; }; @@ -1874,7 +1864,8 @@ export declare const collectWhile: { * Returns a new `Schedule` that recurs on the specified `Cron` schedule and * outputs the duration between recurrences. * - * @example + * **Example** (Scheduling work with cron expressions) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -1886,7 +1877,7 @@ export declare const collectWhile: { * const minutelyProgram = Effect.gen(function*() { * yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Minutely task at ${new Date().toISOString()}`) + * yield* Console.log("Running minutely task") * return "minute" * }), * everyMinute.pipe( @@ -1924,8 +1915,8 @@ export declare const collectWhile: { * Effect.gen(function*() { * yield* Console.log("Generating weekly report...") * const report = { - * week: Math.floor(Date.now() / (7 * 24 * 60 * 60 * 1000)), - * timestamp: new Date().toISOString() + * week: 42, + * status: "ready" as const * } * yield* Console.log(`Report generated: ${JSON.stringify(report)}`) * return report @@ -1938,10 +1929,13 @@ export declare const collectWhile: { * const businessHoursCheck = Schedule.cron("0,15,30,45 9-17 * * 1-5") * * const businessProgram = Effect.gen(function*() { + * const statuses = ["healthy", "healthy", "degraded", "healthy"] as const + * let index = 0 + * * yield* Effect.repeat( * Effect.gen(function*() { * yield* Console.log("Business hours health check...") - * const status = Math.random() > 0.1 ? "healthy" : "degraded" + * const status = statuses[index++] * yield* Console.log(`System status: ${status}`) * return status * }), @@ -1958,9 +1952,9 @@ export declare const collectWhile: { * yield* Effect.repeat( * Effect.gen(function*() { * yield* Console.log("Processing monthly invoices...") - * const invoiceCount = Math.floor(Math.random() * 100) + 50 + * const invoiceCount = 72 * yield* Console.log(`Processed ${invoiceCount} invoices`) - * return { count: invoiceCount, date: new Date().toISOString() } + * return { count: invoiceCount, batch: "2024-01-a" } * }), * monthlyInvoice.pipe(Schedule.take(1)) * ) @@ -1974,11 +1968,13 @@ export declare const collectWhile: { * ) * * const robustProgram = Effect.gen(function*() { + * let attempt = 0 + * * yield* Effect.repeat( * Effect.gen(function*() { + * attempt++ * yield* Console.log("Complex scheduled task...") - * // Simulate occasional failures - * if (Math.random() < 0.3) { + * if (attempt === 1) { * return yield* Effect.fail(new ScheduledTaskError({ message: "Scheduled task failed" })) * } * return "success" @@ -1992,15 +1988,16 @@ export declare const collectWhile: { * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 2.0.0 */ export declare const cron: { /** * Returns a new `Schedule` that recurs on the specified `Cron` schedule and * outputs the duration between recurrences. * - * @example + * **Example** (Scheduling work with cron expressions) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -2012,7 +2009,7 @@ export declare const cron: { * const minutelyProgram = Effect.gen(function*() { * yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Minutely task at ${new Date().toISOString()}`) + * yield* Console.log("Running minutely task") * return "minute" * }), * everyMinute.pipe( @@ -2050,8 +2047,8 @@ export declare const cron: { * Effect.gen(function*() { * yield* Console.log("Generating weekly report...") * const report = { - * week: Math.floor(Date.now() / (7 * 24 * 60 * 60 * 1000)), - * timestamp: new Date().toISOString() + * week: 42, + * status: "ready" as const * } * yield* Console.log(`Report generated: ${JSON.stringify(report)}`) * return report @@ -2064,10 +2061,13 @@ export declare const cron: { * const businessHoursCheck = Schedule.cron("0,15,30,45 9-17 * * 1-5") * * const businessProgram = Effect.gen(function*() { + * const statuses = ["healthy", "healthy", "degraded", "healthy"] as const + * let index = 0 + * * yield* Effect.repeat( * Effect.gen(function*() { * yield* Console.log("Business hours health check...") - * const status = Math.random() > 0.1 ? "healthy" : "degraded" + * const status = statuses[index++] * yield* Console.log(`System status: ${status}`) * return status * }), @@ -2084,9 +2084,9 @@ export declare const cron: { * yield* Effect.repeat( * Effect.gen(function*() { * yield* Console.log("Processing monthly invoices...") - * const invoiceCount = Math.floor(Math.random() * 100) + 50 + * const invoiceCount = 72 * yield* Console.log(`Processed ${invoiceCount} invoices`) - * return { count: invoiceCount, date: new Date().toISOString() } + * return { count: invoiceCount, batch: "2024-01-a" } * }), * monthlyInvoice.pipe(Schedule.take(1)) * ) @@ -2100,11 +2100,13 @@ export declare const cron: { * ) * * const robustProgram = Effect.gen(function*() { + * let attempt = 0 + * * yield* Effect.repeat( * Effect.gen(function*() { + * attempt++ * yield* Console.log("Complex scheduled task...") - * // Simulate occasional failures - * if (Math.random() < 0.3) { + * if (attempt === 1) { * return yield* Effect.fail(new ScheduledTaskError({ message: "Scheduled task failed" })) * } * return "success" @@ -2118,15 +2120,16 @@ export declare const cron: { * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 2.0.0 */ (expression: Cron.Cron): Schedule; /** * Returns a new `Schedule` that recurs on the specified `Cron` schedule and * outputs the duration between recurrences. * - * @example + * **Example** (Scheduling work with cron expressions) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -2138,7 +2141,7 @@ export declare const cron: { * const minutelyProgram = Effect.gen(function*() { * yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Minutely task at ${new Date().toISOString()}`) + * yield* Console.log("Running minutely task") * return "minute" * }), * everyMinute.pipe( @@ -2176,8 +2179,8 @@ export declare const cron: { * Effect.gen(function*() { * yield* Console.log("Generating weekly report...") * const report = { - * week: Math.floor(Date.now() / (7 * 24 * 60 * 60 * 1000)), - * timestamp: new Date().toISOString() + * week: 42, + * status: "ready" as const * } * yield* Console.log(`Report generated: ${JSON.stringify(report)}`) * return report @@ -2190,10 +2193,13 @@ export declare const cron: { * const businessHoursCheck = Schedule.cron("0,15,30,45 9-17 * * 1-5") * * const businessProgram = Effect.gen(function*() { + * const statuses = ["healthy", "healthy", "degraded", "healthy"] as const + * let index = 0 + * * yield* Effect.repeat( * Effect.gen(function*() { * yield* Console.log("Business hours health check...") - * const status = Math.random() > 0.1 ? "healthy" : "degraded" + * const status = statuses[index++] * yield* Console.log(`System status: ${status}`) * return status * }), @@ -2210,9 +2216,9 @@ export declare const cron: { * yield* Effect.repeat( * Effect.gen(function*() { * yield* Console.log("Processing monthly invoices...") - * const invoiceCount = Math.floor(Math.random() * 100) + 50 + * const invoiceCount = 72 * yield* Console.log(`Processed ${invoiceCount} invoices`) - * return { count: invoiceCount, date: new Date().toISOString() } + * return { count: invoiceCount, batch: "2024-01-a" } * }), * monthlyInvoice.pipe(Schedule.take(1)) * ) @@ -2226,11 +2232,13 @@ export declare const cron: { * ) * * const robustProgram = Effect.gen(function*() { + * let attempt = 0 + * * yield* Effect.repeat( * Effect.gen(function*() { + * attempt++ * yield* Console.log("Complex scheduled task...") - * // Simulate occasional failures - * if (Math.random() < 0.3) { + * if (attempt === 1) { * return yield* Effect.fail(new ScheduledTaskError({ message: "Scheduled task failed" })) * } * return "success" @@ -2244,15 +2252,16 @@ export declare const cron: { * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 2.0.0 */ (expression: string, tz?: string | DateTime.TimeZone): Schedule; }; /** - * Returns a new schedule that outputs the delay between each occurence. + * Returns a new schedule that outputs the delay between each occurrence. + * + * **Example** (Extracting schedule delays) * - * @example * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -2275,7 +2284,7 @@ export declare const cron: { * ) * }) * - * // Monitor delays from a fibonacci schedule + * // Monitor delays from a Fibonacci schedule * const fibonacciDelays = Schedule.delays( * Schedule.fibonacci("200 millis").pipe(Schedule.take(8)) * ) @@ -2312,7 +2321,7 @@ export declare const cron: { * yield* Effect.repeat( * Effect.gen(function*() { * yield* Console.log("Adaptive task execution") - * return Date.now() + * return "completed" * }), * adaptiveDelays.pipe( * Schedule.tapOutput((delay) => Console.log(`Adaptive delay: ${delay}`)) @@ -2329,25 +2338,49 @@ export declare const cron: { * ) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const delays: (self: Schedule) => Schedule; /** * Returns a schedule that recurs once after the specified duration. * + * **When to use** + * + * Use when you need a schedule that recurs once after a fixed delay. + * + * **Details** + * * The schedule outputs the configured duration for its first recurrence and * then completes. * - * @since 2.0.0 + * **Example** (Recurring once after a duration) + * + * ```ts + * import { Console, Effect, Schedule } from "effect" + * + * const program = Effect.repeat( + * Console.log("runs again after one second"), + * Schedule.duration("1 second") + * ) + * ``` + * + * @see {@link during} for recurring until a duration has elapsed + * * @category constructors + * @since 2.0.0 */ export declare const duration: (durationInput: Duration.Input) => Schedule; /** * Returns a new `Schedule` that will always recur, but only during the * specified `duration` of time. * - * @example + * **When to use** + * + * Use to bound a repeating or retrying schedule by elapsed time. + * + * **Example** (Repeating work during a duration) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -2357,12 +2390,9 @@ export declare const duration: (durationInput: Duration.Input) => Schedule Schedule Schedule Schedule Schedule; /** @@ -2436,7 +2468,12 @@ export declare const during: (duration: Duration.Input) => Schedule Schedule Schedule(other: Schedule): (self: Schedule) => Schedule<[Output, Output2], Input & Input2, Error | Error2, Env | Env2>; /** @@ -2580,7 +2626,12 @@ export declare const either: { * to recur, using the minimum of the two durations between recurrences and * outputting a tuple of the outputs of both schedules. * - * @example + * **When to use** + * + * Use when the combined schedule should continue while at least one schedule still recurs. + * + * **Example** (Combining schedules with either semantics) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -2597,7 +2648,7 @@ export declare const either: { * const program = Effect.gen(function*() { * const results = yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Task executed at ${new Date().toISOString()}`) + * yield* Console.log("Task executed") * return "task completed" * }), * eitherSchedule.pipe( @@ -2640,11 +2691,13 @@ export declare const either: { * }) * * // Either provides union semantics (OR logic) - * // Compare with intersect which provides intersection semantics (AND logic) + * // Compare with both, which provides intersection semantics (AND logic) * ``` * + * @see {@link both} for continuing only while both schedules still recur + * + * @category combining * @since 2.0.0 - * @category utilities */ (self: Schedule, other: Schedule): Schedule<[Output, Output2], Input & Input2, Error | Error2, Env | Env2>; }; @@ -2653,7 +2706,13 @@ export declare const either: { * to recur, using the minimum of the two durations between recurrences and * outputting the result of the left schedule (i.e. `self`). * - * @example + * **When to use** + * + * Use when either schedule may keep recurrence going and only the left + * schedule's output is needed. + * + * **Example** (Combining either schedules and keeping the left output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -2679,8 +2738,8 @@ export declare const either: { * }) * ``` * - * @since 2.0.0 - * @category utilities + * @category combining + * @since 4.0.0 */ export declare const eitherLeft: { /** @@ -2688,7 +2747,13 @@ export declare const eitherLeft: { * to recur, using the minimum of the two durations between recurrences and * outputting the result of the left schedule (i.e. `self`). * - * @example + * **When to use** + * + * Use when either schedule may keep recurrence going and only the left + * schedule's output is needed. + * + * **Example** (Combining either schedules and keeping the left output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -2714,8 +2779,8 @@ export declare const eitherLeft: { * }) * ``` * - * @since 2.0.0 - * @category utilities + * @category combining + * @since 4.0.0 */ (other: Schedule): (self: Schedule) => Schedule; /** @@ -2723,7 +2788,13 @@ export declare const eitherLeft: { * to recur, using the minimum of the two durations between recurrences and * outputting the result of the left schedule (i.e. `self`). * - * @example + * **When to use** + * + * Use when either schedule may keep recurrence going and only the left + * schedule's output is needed. + * + * **Example** (Combining either schedules and keeping the left output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -2749,8 +2820,8 @@ export declare const eitherLeft: { * }) * ``` * - * @since 2.0.0 - * @category utilities + * @category combining + * @since 4.0.0 */ (self: Schedule, other: Schedule): Schedule; }; @@ -2759,7 +2830,13 @@ export declare const eitherLeft: { * to recur, using the minimum of the two durations between recurrences and * outputting the result of the right schedule (i.e. `other`). * - * @example + * **When to use** + * + * Use when either schedule may keep recurrence going and only the right + * schedule's output is needed. + * + * **Example** (Combining either schedules and keeping the right output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -2785,8 +2862,8 @@ export declare const eitherLeft: { * }) * ``` * - * @since 2.0.0 - * @category utilities + * @category combining + * @since 4.0.0 */ export declare const eitherRight: { /** @@ -2794,7 +2871,13 @@ export declare const eitherRight: { * to recur, using the minimum of the two durations between recurrences and * outputting the result of the right schedule (i.e. `other`). * - * @example + * **When to use** + * + * Use when either schedule may keep recurrence going and only the right + * schedule's output is needed. + * + * **Example** (Combining either schedules and keeping the right output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -2820,8 +2903,8 @@ export declare const eitherRight: { * }) * ``` * - * @since 2.0.0 - * @category utilities + * @category combining + * @since 4.0.0 */ (other: Schedule): (self: Schedule) => Schedule; /** @@ -2829,7 +2912,13 @@ export declare const eitherRight: { * to recur, using the minimum of the two durations between recurrences and * outputting the result of the right schedule (i.e. `other`). * - * @example + * **When to use** + * + * Use when either schedule may keep recurrence going and only the right + * schedule's output is needed. + * + * **Example** (Combining either schedules and keeping the right output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -2855,8 +2944,8 @@ export declare const eitherRight: { * }) * ``` * - * @since 2.0.0 - * @category utilities + * @category combining + * @since 4.0.0 */ (self: Schedule, other: Schedule): Schedule; }; @@ -2866,7 +2955,13 @@ export declare const eitherRight: { * outputting the result of the combination of both schedule outputs using the * specified `combine` function. * - * @example + * **When to use** + * + * Use when either schedule may keep recurrence going and their outputs should be + * combined into a custom value. + * + * **Example** (Combining either schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -2896,8 +2991,8 @@ export declare const eitherRight: { * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ export declare const eitherWith: { /** @@ -2906,7 +3001,13 @@ export declare const eitherWith: { * outputting the result of the combination of both schedule outputs using the * specified `combine` function. * - * @example + * **When to use** + * + * Use when either schedule may keep recurrence going and their outputs should be + * combined into a custom value. + * + * **Example** (Combining either schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -2936,8 +3037,8 @@ export declare const eitherWith: { * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ (other: Schedule, combine: (selfOutput: Output, otherOutput: Output2) => Output3): (self: Schedule) => Schedule; /** @@ -2946,7 +3047,13 @@ export declare const eitherWith: { * outputting the result of the combination of both schedule outputs using the * specified `combine` function. * - * @example + * **When to use** + * + * Use when either schedule may keep recurrence going and their outputs should be + * combined into a custom value. + * + * **Example** (Combining either schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -2976,20 +3083,22 @@ export declare const eitherWith: { * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ (self: Schedule, other: Schedule, combine: (selfOutput: Output, otherOutput: Output2) => Output3): Schedule; }; /** - * A schedule that always recurs and returns the total elapsed duration since the first recurrence. + * Schedule that always recurs and returns the total elapsed duration since the + * first recurrence. + * + * **Details** * * This schedule never stops and outputs the cumulative time that has passed since the schedule * started executing. Useful for tracking execution time or implementing time-based logic. * - * @returns A schedule that outputs the elapsed duration and never stops + * **Example** (Measuring elapsed schedule time) * - * @example * ```ts * import { Console, Duration, Effect, Schedule } from "effect" * @@ -3007,16 +3116,17 @@ export declare const eitherWith: { * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const elapsed: Schedule; /** - * A schedule that always recurs, but will wait a certain amount between + * Schedule that always recurs, but will wait a certain amount between * repetitions, given by `base * factor.pow(n)`, where `n` is the number of * repetitions so far. Returns the current duration between recurrences. * - * @example + * **Example** (Retrying with exponential backoff) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -3056,26 +3166,27 @@ export declare const elapsed: Schedule; * // Will retry with delays: 50ms, 100ms, 200ms before success * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const exponential: (base: Duration.Input, factor?: number) => Schedule; /** - * A schedule that always recurs, increasing delays by summing the preceding - * two delays (similar to the fibonacci sequence). Returns the current + * Schedule that always recurs, increasing delays by summing the preceding + * two delays (similar to the Fibonacci sequence). Returns the current * duration between recurrences. * - * @example + * **Example** (Retrying with Fibonacci backoff) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * * class RetryAttemptError extends Data.TaggedError("RetryAttemptError")<{ readonly message: string }> {} * - * // Basic fibonacci schedule starting with 100ms + * // Basic Fibonacci schedule starting with 100ms * const fibSchedule = Schedule.fibonacci("100 millis") * // Delays: 100ms, 100ms, 200ms, 300ms, 500ms, 800ms, 1300ms, ... * - * // Retry with fibonacci backoff for gradual increase + * // Retry with Fibonacci backoff for gradual increase * const retryWithFib = Effect.gen(function*() { * let attempt = 0 * @@ -3099,9 +3210,9 @@ export declare const exponential: (base: Duration.Input, factor?: number) => Sch * yield* Console.log(`Final result: ${result}`) * }) * - * // Heartbeat with fibonacci intervals (starts fast, gets slower) + * // Heartbeat with Fibonacci intervals (starts fast, gets slower) * const adaptiveHeartbeat = Effect.gen(function*() { - * yield* Console.log(`Heartbeat at ${new Date().toISOString()}`) + * yield* Console.log("Heartbeat") * return "pulse" * }).pipe( * Effect.repeat( @@ -3123,32 +3234,39 @@ export declare const exponential: (base: Duration.Input, factor?: number) => Sch * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const fibonacci: (one: Duration.Input) => Schedule; /** * Returns a `Schedule` that recurs on the specified fixed `interval` and * outputs the number of repetitions of the schedule so far. * - * If the action run between updates takes longer than the interval, then the - * action will be run immediately, but re-runs will not "pile up". + * **When to use** * - * ``` + * Use when recurrences should stay aligned to a regular cadence. + * + * **Gotchas** + * + * If the action run between recurrences takes longer than the interval, the + * next recurrence happens immediately, but missed intervals are not replayed. + * + * ```text * |-----interval-----|-----interval-----|-----interval-----| * |---------action--------||action|-----|action|-----------| * ``` * - * @example + * **Example** (Repeating on fixed intervals) + * * ```ts * import { Console, Effect, Schedule } from "effect" * - * // Fixed interval schedule - runs exactly every 1 second + * // Fixed interval schedule - recurs on a one-second cadence * const everySecond = Schedule.fixed("1 second") * * // Health check that runs at fixed intervals * const healthCheck = Effect.gen(function*() { - * yield* Console.log(`Health check at ${new Date().toISOString()}`) + * yield* Console.log("Health check") * yield* Effect.sleep("200 millis") // simulate health check work * return "healthy" * }).pipe( @@ -3186,15 +3304,18 @@ export declare const fibonacci: (one: Duration.Input) => Schedule Schedule; /** * Returns a new `Schedule` that maps the output of this schedule using the * specified function. * - * @example + * **Example** (Mapping schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -3212,7 +3333,6 @@ export declare const fixed: (interval: Duration.Input) => Schedule; * const structuredSchedule = Schedule.spaced("1 second").pipe( * Schedule.map((recurrence) => Effect.succeed({ * iteration: recurrence + 1, - * timestamp: new Date().toISOString(), * phase: recurrence < 5 ? "warmup" as const : "steady" as const * })) * ) @@ -3224,7 +3344,7 @@ export declare const fixed: (interval: Duration.Input) => Schedule; * Schedule.take(8), * Schedule.tapOutput((info) => * Console.log( - * `${info.phase} phase - iteration ${info.iteration} at ${info.timestamp}` + * `${info.phase} phase - iteration ${info.iteration}` * ) * ) * ) @@ -3249,15 +3369,16 @@ export declare const fixed: (interval: Duration.Input) => Schedule; * ) * ``` * - * @since 2.0.0 * @category mapping + * @since 2.0.0 */ export declare const map: { /** * Returns a new `Schedule` that maps the output of this schedule using the * specified function. * - * @example + * **Example** (Mapping schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -3275,7 +3396,6 @@ export declare const map: { * const structuredSchedule = Schedule.spaced("1 second").pipe( * Schedule.map((recurrence) => Effect.succeed({ * iteration: recurrence + 1, - * timestamp: new Date().toISOString(), * phase: recurrence < 5 ? "warmup" as const : "steady" as const * })) * ) @@ -3287,7 +3407,7 @@ export declare const map: { * Schedule.take(8), * Schedule.tapOutput((info) => * Console.log( - * `${info.phase} phase - iteration ${info.iteration} at ${info.timestamp}` + * `${info.phase} phase - iteration ${info.iteration}` * ) * ) * ) @@ -3312,15 +3432,16 @@ export declare const map: { * ) * ``` * - * @since 2.0.0 * @category mapping + * @since 2.0.0 */ (f: (output: Output) => Output2 | Effect): (self: Schedule) => Schedule; /** * Returns a new `Schedule` that maps the output of this schedule using the * specified function. * - * @example + * **Example** (Mapping schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -3338,7 +3459,6 @@ export declare const map: { * const structuredSchedule = Schedule.spaced("1 second").pipe( * Schedule.map((recurrence) => Effect.succeed({ * iteration: recurrence + 1, - * timestamp: new Date().toISOString(), * phase: recurrence < 5 ? "warmup" as const : "steady" as const * })) * ) @@ -3350,7 +3470,7 @@ export declare const map: { * Schedule.take(8), * Schedule.tapOutput((info) => * Console.log( - * `${info.phase} phase - iteration ${info.iteration} at ${info.timestamp}` + * `${info.phase} phase - iteration ${info.iteration}` * ) * ) * ) @@ -3375,16 +3495,17 @@ export declare const map: { * ) * ``` * - * @since 2.0.0 * @category mapping + * @since 2.0.0 */ (self: Schedule, f: (output: Output) => Output2 | Effect): Schedule; }; /** * Returns a new `Schedule` that modifies the delay of the next recurrence - * of the schedule using the specified effectual function. + * of the schedule using the specified effectful function. + * + * **Example** (Modifying delays from schedule output) * - * @example * ```ts * import { Console, Duration, Effect, Schedule } from "effect" * @@ -3409,15 +3530,16 @@ export declare const map: { * }) * ``` * + * @category delays & timeouts * @since 2.0.0 - * @category utilities */ export declare const modifyDelay: { /** * Returns a new `Schedule` that modifies the delay of the next recurrence - * of the schedule using the specified effectual function. + * of the schedule using the specified effectful function. + * + * **Example** (Modifying delays from schedule output) * - * @example * ```ts * import { Console, Duration, Effect, Schedule } from "effect" * @@ -3442,15 +3564,16 @@ export declare const modifyDelay: { * }) * ``` * + * @category delays & timeouts * @since 2.0.0 - * @category utilities */ (f: (output: Output, delay: Duration.Duration) => Effect): (self: Schedule) => Schedule; /** * Returns a new `Schedule` that modifies the delay of the next recurrence - * of the schedule using the specified effectual function. + * of the schedule using the specified effectful function. + * + * **Example** (Modifying delays from schedule output) * - * @example * ```ts * import { Console, Duration, Effect, Schedule } from "effect" * @@ -3475,24 +3598,34 @@ export declare const modifyDelay: { * }) * ``` * + * @category delays & timeouts * @since 2.0.0 - * @category utilities */ (self: Schedule, f: (output: Output, delay: Duration.Input) => Effect): Schedule; }; /** * Returns a new `Schedule` that randomly adjusts each recurrence delay. * - * Delays are jittered between `80%` and `120%` of the original delay. + * **When to use** + * + * Use to add random variation to an existing schedule's recurrence delays while + * preserving its output and completion behavior. + * + * **Details** + * + * Each recurrence delay is scaled by a random factor between `0.8` and `1.2`. * + * @see {@link modifyDelay} for replacing recurrence delays with a custom effectful transformation + * + * @category delays & timeouts * @since 2.0.0 - * @category utilities */ export declare const jittered: (self: Schedule) => Schedule; /** * Returns a new `Schedule` that outputs the inputs of the specified schedule. * - * @example + * **Example** (Passing inputs through as outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -3514,15 +3647,26 @@ export declare const jittered: (self: Schedule(self: Schedule) => Schedule; /** * Returns a `Schedule` which can only be stepped the specified number of * `times` before it terminates. * - * @example + * **When to use** + * + * Use when you need a counter schedule with no additional delay. + * + * **Gotchas** + * + * `recurs(n)` counts schedule recurrences, not the first evaluation of the + * effect being repeated or retried. For retrying, this means one initial + * attempt plus at most `n` retries. + * + * **Example** (Limiting recurrences) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -3554,13 +3698,13 @@ export declare const passthrough: (self: Schedule(self: Schedule Schedule; * using the specified effectful `combine` function and starting from the * specified `initial` state. * - * @example + * **Example** (Reducing schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -3605,24 +3752,24 @@ export declare const recurs: (times: number) => Schedule; * yield* Console.log(`Final sum: ${finalSum}`) * }) * - * // Build a history of execution times + * // Build a history of execution counts * const historySchedule = Schedule.reduce( * Schedule.spaced("1 second").pipe(Schedule.take(4)), * () => [] as Array, // Initial empty array - * (history, executionNumber) => Effect.succeed([...history, Date.now()]) + * (history, executionNumber) => Effect.succeed([...history, executionNumber]) * ) * * const historyProgram = Effect.gen(function*() { * const timeline = yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log("Recording timestamp...") + * yield* Console.log("Recording execution...") * return "recorded" * }), * historySchedule * ) * * yield* Console.log( - * `Execution timeline: ${timeline.length} timestamps recorded` + * `Execution timeline: ${timeline.join(", ")}` * ) * }) * @@ -3683,8 +3830,8 @@ export declare const recurs: (times: number) => Schedule; * }) * ``` * + * @category folding * @since 2.0.0 - * @category utilities */ export declare const reduce: { /** @@ -3692,7 +3839,8 @@ export declare const reduce: { * using the specified effectful `combine` function and starting from the * specified `initial` state. * - * @example + * **Example** (Reducing schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -3717,24 +3865,24 @@ export declare const reduce: { * yield* Console.log(`Final sum: ${finalSum}`) * }) * - * // Build a history of execution times + * // Build a history of execution counts * const historySchedule = Schedule.reduce( * Schedule.spaced("1 second").pipe(Schedule.take(4)), * () => [] as Array, // Initial empty array - * (history, executionNumber) => Effect.succeed([...history, Date.now()]) + * (history, executionNumber) => Effect.succeed([...history, executionNumber]) * ) * * const historyProgram = Effect.gen(function*() { * const timeline = yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log("Recording timestamp...") + * yield* Console.log("Recording execution...") * return "recorded" * }), * historySchedule * ) * * yield* Console.log( - * `Execution timeline: ${timeline.length} timestamps recorded` + * `Execution timeline: ${timeline.join(", ")}` * ) * }) * @@ -3795,8 +3943,8 @@ export declare const reduce: { * }) * ``` * + * @category folding * @since 2.0.0 - * @category utilities */ (initial: LazyArg, combine: (state: State, output: Output) => State | Effect): (self: Schedule) => Schedule; /** @@ -3804,7 +3952,8 @@ export declare const reduce: { * using the specified effectful `combine` function and starting from the * specified `initial` state. * - * @example + * **Example** (Reducing schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -3829,24 +3978,24 @@ export declare const reduce: { * yield* Console.log(`Final sum: ${finalSum}`) * }) * - * // Build a history of execution times + * // Build a history of execution counts * const historySchedule = Schedule.reduce( * Schedule.spaced("1 second").pipe(Schedule.take(4)), * () => [] as Array, // Initial empty array - * (history, executionNumber) => Effect.succeed([...history, Date.now()]) + * (history, executionNumber) => Effect.succeed([...history, executionNumber]) * ) * * const historyProgram = Effect.gen(function*() { * const timeline = yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log("Recording timestamp...") + * yield* Console.log("Recording execution...") * return "recorded" * }), * historySchedule * ) * * yield* Console.log( - * `Execution timeline: ${timeline.length} timestamps recorded` + * `Execution timeline: ${timeline.join(", ")}` * ) * }) * @@ -3907,8 +4056,8 @@ export declare const reduce: { * }) * ``` * + * @category folding * @since 2.0.0 - * @category utilities */ (self: Schedule, initial: LazyArg, combine: (state: State, output: Output) => State | Effect): Schedule; }; @@ -3916,7 +4065,12 @@ export declare const reduce: { * Returns a schedule that recurs continuously, each repetition spaced the * specified duration from the last run. * - * @example + * **When to use** + * + * Use when each delay should start after the previous action completes. + * + * **Example** (Repeating with fixed spacing) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -3925,7 +4079,7 @@ export declare const reduce: { * * // Heartbeat that runs indefinitely with fixed spacing * const heartbeat = Effect.gen(function*() { - * yield* Console.log(`Heartbeat at ${new Date().toISOString()}`) + * yield* Console.log("Heartbeat") * }).pipe( * Effect.repeat(everyTwoSeconds) * ) @@ -3958,16 +4112,125 @@ export declare const reduce: { * }) * ``` * - * @since 2.0.0 + * @see {@link fixed} for recurrence aligned to a regular cadence + * * @category constructors + * @since 2.0.0 */ export declare const spaced: (duration: Duration.Input) => Schedule; +/** + * Returns a new `Schedule` that allows execution of an effectful function for + * every decision of the schedule, but does not alter the inputs and outputs of + * the schedule. + * + * **Details** + * + * The callback receives the full schedule metadata, including the input, output, + * computed delay duration, current attempt, and elapsed timing information. + * + * **Example** (Tapping schedule metadata) + * + * ```ts + * import { Console, Effect, Schedule } from "effect" + * + * const monitoredSchedule = Schedule.exponential("100 millis").pipe( + * Schedule.take(5), + * Schedule.tap((metadata) => + * Console.log( + * `Attempt ${metadata.attempt} produced ${metadata.output} ` + + * `after ${metadata.elapsed}ms; next delay is ${metadata.duration}` + * ) + * ) + * ) + * + * const program = Effect.retry( + * Effect.fail("transient error"), + * monitoredSchedule + * ) + * ``` + * + * @category sequencing + * @since 4.0.0 + */ +export declare const tap: { + /** + * Returns a new `Schedule` that allows execution of an effectful function for + * every decision of the schedule, but does not alter the inputs and outputs of + * the schedule. + * + * **Details** + * + * The callback receives the full schedule metadata, including the input, output, + * computed delay duration, current attempt, and elapsed timing information. + * + * **Example** (Tapping schedule metadata) + * + * ```ts + * import { Console, Effect, Schedule } from "effect" + * + * const monitoredSchedule = Schedule.exponential("100 millis").pipe( + * Schedule.take(5), + * Schedule.tap((metadata) => + * Console.log( + * `Attempt ${metadata.attempt} produced ${metadata.output} ` + + * `after ${metadata.elapsed}ms; next delay is ${metadata.duration}` + * ) + * ) + * ) + * + * const program = Effect.retry( + * Effect.fail("transient error"), + * monitoredSchedule + * ) + * ``` + * + * @category sequencing + * @since 4.0.0 + */ + (f: (metadata: Metadata) => Effect): (self: Schedule) => Schedule; + /** + * Returns a new `Schedule` that allows execution of an effectful function for + * every decision of the schedule, but does not alter the inputs and outputs of + * the schedule. + * + * **Details** + * + * The callback receives the full schedule metadata, including the input, output, + * computed delay duration, current attempt, and elapsed timing information. + * + * **Example** (Tapping schedule metadata) + * + * ```ts + * import { Console, Effect, Schedule } from "effect" + * + * const monitoredSchedule = Schedule.exponential("100 millis").pipe( + * Schedule.take(5), + * Schedule.tap((metadata) => + * Console.log( + * `Attempt ${metadata.attempt} produced ${metadata.output} ` + + * `after ${metadata.elapsed}ms; next delay is ${metadata.duration}` + * ) + * ) + * ) + * + * const program = Effect.retry( + * Effect.fail("transient error"), + * monitoredSchedule + * ) + * ``` + * + * @category sequencing + * @since 4.0.0 + */ + (self: Schedule, f: (metadata: Metadata) => Effect): Schedule; +}; /** * Returns a new `Schedule` that allows execution of an effectful function for * every input to the schedule, but does not alter the inputs and outputs of * the schedule. * - * @example + * **Example** (Tapping retry inputs) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -4003,7 +4266,6 @@ export declare const spaced: (duration: Duration.Input) => Schedule; * Schedule.take(5), * Schedule.tapInput((input: unknown) => * Effect.gen(function*() { - * yield* Console.log(`Processing input at ${new Date().toISOString()}`) * yield* Console.log(`Input type: ${typeof input}`) * // In real applications, might send metrics to monitoring system * }) @@ -4025,10 +4287,13 @@ export declare const spaced: (duration: Duration.Input) => Schedule; * ) * * const validationProgram = Effect.gen(function*() { + * let count = 0 + * * yield* Effect.repeat( * Effect.gen(function*() { + * count++ * yield* Console.log("Task with validation") - * return { data: Math.random(), timestamp: Date.now() } + * return { data: `sample-${count}` } * }), * validatingSchedule * ) @@ -4040,10 +4305,10 @@ export declare const spaced: (duration: Duration.Input) => Schedule; * Schedule.tapInput((error: RetryError) => * Effect.gen(function*() { * if (String(error).includes("critical")) { - * yield* Console.log(`🚨 CRITICAL ERROR: ${String(error)}`) + * yield* Console.log(`Critical error: ${String(error)}`) * // In real applications, might trigger alerts or notifications * } else { - * yield* Console.log(`ℹ️ Regular error: ${String(error)}`) + * yield* Console.log(`Regular error: ${String(error)}`) * } * }) * ) @@ -4077,14 +4342,14 @@ export declare const spaced: (duration: Duration.Input) => Schedule; * ), * Schedule.tapInput((error: RetryError) => * String(error).length > 20 - * ? Console.log("📝 Long error message detected") + * ? Console.log("Long error message detected") * : Effect.void * ) * ) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ export declare const tapInput: { /** @@ -4092,7 +4357,8 @@ export declare const tapInput: { * every input to the schedule, but does not alter the inputs and outputs of * the schedule. * - * @example + * **Example** (Tapping retry inputs) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -4128,7 +4394,6 @@ export declare const tapInput: { * Schedule.take(5), * Schedule.tapInput((input: unknown) => * Effect.gen(function*() { - * yield* Console.log(`Processing input at ${new Date().toISOString()}`) * yield* Console.log(`Input type: ${typeof input}`) * // In real applications, might send metrics to monitoring system * }) @@ -4150,10 +4415,13 @@ export declare const tapInput: { * ) * * const validationProgram = Effect.gen(function*() { + * let count = 0 + * * yield* Effect.repeat( * Effect.gen(function*() { + * count++ * yield* Console.log("Task with validation") - * return { data: Math.random(), timestamp: Date.now() } + * return { data: `sample-${count}` } * }), * validatingSchedule * ) @@ -4165,10 +4433,10 @@ export declare const tapInput: { * Schedule.tapInput((error: RetryError) => * Effect.gen(function*() { * if (String(error).includes("critical")) { - * yield* Console.log(`🚨 CRITICAL ERROR: ${String(error)}`) + * yield* Console.log(`Critical error: ${String(error)}`) * // In real applications, might trigger alerts or notifications * } else { - * yield* Console.log(`ℹ️ Regular error: ${String(error)}`) + * yield* Console.log(`Regular error: ${String(error)}`) * } * }) * ) @@ -4202,14 +4470,14 @@ export declare const tapInput: { * ), * Schedule.tapInput((error: RetryError) => * String(error).length > 20 - * ? Console.log("📝 Long error message detected") + * ? Console.log("Long error message detected") * : Effect.void * ) * ) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ (f: (input: Input) => Effect): (self: Schedule) => Schedule; /** @@ -4217,7 +4485,8 @@ export declare const tapInput: { * every input to the schedule, but does not alter the inputs and outputs of * the schedule. * - * @example + * **Example** (Tapping retry inputs) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -4253,7 +4522,6 @@ export declare const tapInput: { * Schedule.take(5), * Schedule.tapInput((input: unknown) => * Effect.gen(function*() { - * yield* Console.log(`Processing input at ${new Date().toISOString()}`) * yield* Console.log(`Input type: ${typeof input}`) * // In real applications, might send metrics to monitoring system * }) @@ -4275,10 +4543,13 @@ export declare const tapInput: { * ) * * const validationProgram = Effect.gen(function*() { + * let count = 0 + * * yield* Effect.repeat( * Effect.gen(function*() { + * count++ * yield* Console.log("Task with validation") - * return { data: Math.random(), timestamp: Date.now() } + * return { data: `sample-${count}` } * }), * validatingSchedule * ) @@ -4290,10 +4561,10 @@ export declare const tapInput: { * Schedule.tapInput((error: RetryError) => * Effect.gen(function*() { * if (String(error).includes("critical")) { - * yield* Console.log(`🚨 CRITICAL ERROR: ${String(error)}`) + * yield* Console.log(`Critical error: ${String(error)}`) * // In real applications, might trigger alerts or notifications * } else { - * yield* Console.log(`ℹ️ Regular error: ${String(error)}`) + * yield* Console.log(`Regular error: ${String(error)}`) * } * }) * ) @@ -4327,14 +4598,14 @@ export declare const tapInput: { * ), * Schedule.tapInput((error: RetryError) => * String(error).length > 20 - * ? Console.log("📝 Long error message detected") + * ? Console.log("Long error message detected") * : Effect.void * ) * ) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ (self: Schedule, f: (input: Input) => Effect): Schedule; }; @@ -4343,7 +4614,8 @@ export declare const tapInput: { * every output of the schedule, but does not alter the inputs and outputs of * the schedule. * - * @example + * **Example** (Tapping schedule outputs) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -4391,7 +4663,7 @@ export declare const tapInput: { * Effect.gen(function*() { * const delayMs = delay.toString() * if (delayMs.includes("1000")) { // Alert on delays >= 1 second - * yield* Console.log(`🚨 High delay detected: ${delay}`) + * yield* Console.log(`High delay detected: ${delay}`) * } * }) * ) @@ -4401,8 +4673,7 @@ export declare const tapInput: { * yield* Effect.repeat( * Effect.gen(function*() { * yield* Console.log("Performing health check...") - * // Simulate health check - * return Math.random() > 0.7 ? "healthy" : "degraded" + * return "healthy" * }), * alertingSchedule * ) @@ -4414,14 +4685,14 @@ export declare const tapInput: { * Schedule.tapOutput((count) => Console.log(`Execution ${count + 1}`)), * Schedule.tapOutput((count) => * count % 3 === 0 - * ? Console.log("🎯 Checkpoint reached!") + * ? Console.log("Checkpoint reached") * : Effect.void * ) * ) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ export declare const tapOutput: { /** @@ -4429,7 +4700,8 @@ export declare const tapOutput: { * every output of the schedule, but does not alter the inputs and outputs of * the schedule. * - * @example + * **Example** (Tapping schedule outputs) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -4477,7 +4749,7 @@ export declare const tapOutput: { * Effect.gen(function*() { * const delayMs = delay.toString() * if (delayMs.includes("1000")) { // Alert on delays >= 1 second - * yield* Console.log(`🚨 High delay detected: ${delay}`) + * yield* Console.log(`High delay detected: ${delay}`) * } * }) * ) @@ -4487,8 +4759,7 @@ export declare const tapOutput: { * yield* Effect.repeat( * Effect.gen(function*() { * yield* Console.log("Performing health check...") - * // Simulate health check - * return Math.random() > 0.7 ? "healthy" : "degraded" + * return "healthy" * }), * alertingSchedule * ) @@ -4500,14 +4771,14 @@ export declare const tapOutput: { * Schedule.tapOutput((count) => Console.log(`Execution ${count + 1}`)), * Schedule.tapOutput((count) => * count % 3 === 0 - * ? Console.log("🎯 Checkpoint reached!") + * ? Console.log("Checkpoint reached") * : Effect.void * ) * ) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ (f: (output: Output) => Effect): (self: Schedule) => Schedule; /** @@ -4515,7 +4786,8 @@ export declare const tapOutput: { * every output of the schedule, but does not alter the inputs and outputs of * the schedule. * - * @example + * **Example** (Tapping schedule outputs) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -4563,7 +4835,7 @@ export declare const tapOutput: { * Effect.gen(function*() { * const delayMs = delay.toString() * if (delayMs.includes("1000")) { // Alert on delays >= 1 second - * yield* Console.log(`🚨 High delay detected: ${delay}`) + * yield* Console.log(`High delay detected: ${delay}`) * } * }) * ) @@ -4573,8 +4845,7 @@ export declare const tapOutput: { * yield* Effect.repeat( * Effect.gen(function*() { * yield* Console.log("Performing health check...") - * // Simulate health check - * return Math.random() > 0.7 ? "healthy" : "degraded" + * return "healthy" * }), * alertingSchedule * ) @@ -4586,14 +4857,14 @@ export declare const tapOutput: { * Schedule.tapOutput((count) => Console.log(`Execution ${count + 1}`)), * Schedule.tapOutput((count) => * count % 3 === 0 - * ? Console.log("🎯 Checkpoint reached!") + * ? Console.log("Checkpoint reached") * : Effect.void * ) * ) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ (self: Schedule, f: (output: Output) => Effect): Schedule; }; @@ -4602,21 +4873,32 @@ export declare const tapOutput: { * from the schedule. Once the specified number of outputs is reached, the * schedule will stop. * - * @example + * **When to use** + * + * Use to limit an existing schedule while preserving its output and delay behavior. + * + * **Gotchas** + * + * `take(n)` limits schedule outputs. When used with repeat or retry, the + * effect is evaluated once before the schedule is stepped, so the total number + * of evaluations can be one greater than the number of outputs taken. + * + * **Example** (Taking a limited number of recurrences) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * * class RetryAttemptError extends Data.TaggedError("RetryAttemptError")<{ readonly message: string }> {} * - * // Limit an infinite schedule to run only 5 times + * // Limit an infinite schedule to five recurrences * const limitedHeartbeat = Schedule.spaced("1 second").pipe( - * Schedule.take(5) // Will stop after 5 executions + * Schedule.take(5) // Will stop after 5 schedule outputs * ) * * const heartbeatProgram = Effect.gen(function*() { * yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Heartbeat at ${new Date().toISOString()}`) + * yield* Console.log("Heartbeat") * return "pulse" * }), * limitedHeartbeat @@ -4656,15 +4938,15 @@ export declare const tapOutput: { * * // Combine take with other schedule operations * const samplingSchedule = Schedule.fixed("500 millis").pipe( - * Schedule.take(10), // Sample exactly 10 times + * Schedule.take(10), // Take at most 10 schedule outputs * Schedule.map((count) => Effect.succeed(`Sample #${count + 1}`)) * ) * * const samplingProgram = Effect.gen(function*() { * yield* Effect.repeat( * Effect.gen(function*() { - * const value = Math.random() - * yield* Console.log(`Sampled value: ${value.toFixed(3)}`) + * const value = "sample" + * yield* Console.log(`Sampled value: ${value}`) * return value * }), * samplingSchedule.pipe( @@ -4674,8 +4956,10 @@ export declare const tapOutput: { * }) * ``` * - * @since 2.0.0 - * @category utilities + * @see {@link recurs} for creating a count-limited schedule + * + * @category taking + * @since 4.0.0 */ export declare const take: { /** @@ -4683,21 +4967,32 @@ export declare const take: { * from the schedule. Once the specified number of outputs is reached, the * schedule will stop. * - * @example + * **When to use** + * + * Use to limit an existing schedule while preserving its output and delay behavior. + * + * **Gotchas** + * + * `take(n)` limits schedule outputs. When used with repeat or retry, the + * effect is evaluated once before the schedule is stepped, so the total number + * of evaluations can be one greater than the number of outputs taken. + * + * **Example** (Taking a limited number of recurrences) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * * class RetryAttemptError extends Data.TaggedError("RetryAttemptError")<{ readonly message: string }> {} * - * // Limit an infinite schedule to run only 5 times + * // Limit an infinite schedule to five recurrences * const limitedHeartbeat = Schedule.spaced("1 second").pipe( - * Schedule.take(5) // Will stop after 5 executions + * Schedule.take(5) // Will stop after 5 schedule outputs * ) * * const heartbeatProgram = Effect.gen(function*() { * yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Heartbeat at ${new Date().toISOString()}`) + * yield* Console.log("Heartbeat") * return "pulse" * }), * limitedHeartbeat @@ -4737,15 +5032,15 @@ export declare const take: { * * // Combine take with other schedule operations * const samplingSchedule = Schedule.fixed("500 millis").pipe( - * Schedule.take(10), // Sample exactly 10 times + * Schedule.take(10), // Take at most 10 schedule outputs * Schedule.map((count) => Effect.succeed(`Sample #${count + 1}`)) * ) * * const samplingProgram = Effect.gen(function*() { * yield* Effect.repeat( * Effect.gen(function*() { - * const value = Math.random() - * yield* Console.log(`Sampled value: ${value.toFixed(3)}`) + * const value = "sample" + * yield* Console.log(`Sampled value: ${value}`) * return value * }), * samplingSchedule.pipe( @@ -4755,8 +5050,10 @@ export declare const take: { * }) * ``` * - * @since 2.0.0 - * @category utilities + * @see {@link recurs} for creating a count-limited schedule + * + * @category taking + * @since 4.0.0 */ (n: number): (self: Schedule) => Schedule; /** @@ -4764,21 +5061,32 @@ export declare const take: { * from the schedule. Once the specified number of outputs is reached, the * schedule will stop. * - * @example + * **When to use** + * + * Use to limit an existing schedule while preserving its output and delay behavior. + * + * **Gotchas** + * + * `take(n)` limits schedule outputs. When used with repeat or retry, the + * effect is evaluated once before the schedule is stepped, so the total number + * of evaluations can be one greater than the number of outputs taken. + * + * **Example** (Taking a limited number of recurrences) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * * class RetryAttemptError extends Data.TaggedError("RetryAttemptError")<{ readonly message: string }> {} * - * // Limit an infinite schedule to run only 5 times + * // Limit an infinite schedule to five recurrences * const limitedHeartbeat = Schedule.spaced("1 second").pipe( - * Schedule.take(5) // Will stop after 5 executions + * Schedule.take(5) // Will stop after 5 schedule outputs * ) * * const heartbeatProgram = Effect.gen(function*() { * yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Heartbeat at ${new Date().toISOString()}`) + * yield* Console.log("Heartbeat") * return "pulse" * }), * limitedHeartbeat @@ -4818,15 +5126,15 @@ export declare const take: { * * // Combine take with other schedule operations * const samplingSchedule = Schedule.fixed("500 millis").pipe( - * Schedule.take(10), // Sample exactly 10 times + * Schedule.take(10), // Take at most 10 schedule outputs * Schedule.map((count) => Effect.succeed(`Sample #${count + 1}`)) * ) * * const samplingProgram = Effect.gen(function*() { * yield* Effect.repeat( * Effect.gen(function*() { - * const value = Math.random() - * yield* Console.log(`Sampled value: ${value.toFixed(3)}`) + * const value = "sample" + * yield* Console.log(`Sampled value: ${value}`) * return value * }), * samplingSchedule.pipe( @@ -4836,8 +5144,10 @@ export declare const take: { * }) * ``` * - * @since 2.0.0 - * @category utilities + * @see {@link recurs} for creating a count-limited schedule + * + * @category taking + * @since 4.0.0 */ (self: Schedule, n: number): Schedule; }; @@ -4845,7 +5155,8 @@ export declare const take: { * Creates a schedule that unfolds a state by repeatedly applying a function, * outputting the current state and computing the next state. * - * @example + * **Example** (Unfolding schedule state) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -4893,15 +5204,14 @@ export declare const take: { * }) * ) * - * // Random jitter schedule - * const jitteredSchedule = Schedule.unfold( - * 1000, - * (baseDelay) => + * // Deterministic delay adjustment schedule + * const adjustedDelaySchedule = Schedule.unfold( + * { delay: 1000, adjustment: 100 }, + * ({ delay, adjustment }) => * Effect.gen(function*() { - * const jitter = Math.random() * 200 - 100 // ±100ms jitter - * const nextDelay = Math.max(100, baseDelay + jitter) - * yield* Console.log(`Jittered delay: ${nextDelay.toFixed(0)}ms`) - * return nextDelay + * const nextDelay = Math.max(100, delay + adjustment) + * yield* Console.log(`Adjusted delay: ${nextDelay}ms`) + * return { delay: nextDelay, adjustment: adjustment * -1 } * }) * ) * @@ -4934,8 +5244,8 @@ export declare const take: { * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const unfold: (initial: State, next: (state: State) => Effect) => Schedule; declare const while_: { @@ -4944,30 +5254,43 @@ declare const while_: { }; export { /** - * Returns a new schedule that passes each input and output of the specified - * schedule to the provided `predicate`. + * Returns a new schedule that continues while the predicate returns `true`. * - * If the `predicate` returns `true`, the schedule will continue, otherwise - * the schedule will stop. + * **When to use** * - * @since 2.0.0 - * @category utilities + * Use to stop an existing schedule based on its full metadata, such as the + * current input, output, attempt, delay, or elapsed time. + * + * **Details** + * + * The predicate receives `Metadata`, may return `boolean` or an + * `Effect`, preserves the output and delay when it returns + * `true`, and stops the schedule when it returns `false`. + * + * @see {@link collectWhile} for collecting outputs while using the same predicate + * @see {@link take} for stopping after a fixed number of schedule outputs + * + * @category filtering + * @since 4.0.0 */ while_ as while }; /** - * A schedule that divides the timeline to `interval`-long windows, and sleeps + * Schedule that divides the timeline to `interval`-long windows, and sleeps * until the nearest window boundary every time it recurs. * + * **Details** + * * For example, `Schedule.windowed("10 seconds")` would produce a schedule as * follows: * - * ``` + * ```text * 10s 10s 10s 10s * |----------|----------|----------|----------| * |action------|sleep---|act|-sleep|action----| * ``` * - * @example + * **Example** (Repeating on aligned windows) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -4977,8 +5300,7 @@ while_ as while }; * const program = Effect.gen(function*() { * yield* Effect.repeat( * Effect.gen(function*() { - * const now = new Date().toISOString() - * yield* Console.log(`Window task executed at: ${now}`) + * yield* Console.log("Window task executed") * return "window-task" * }), * windowSchedule.pipe(Schedule.take(4)) @@ -4986,17 +5308,20 @@ while_ as while }; * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const windowed: (interval: Duration.Input) => Schedule; /** * Returns a new `Schedule` that will recur forever. * + * **Details** + * * The output of the schedule is the current count of its repetitions thus far * (i.e. `0, 1, 2, ...`). * - * @example + * **Example** (Repeating forever) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -5014,8 +5339,8 @@ export declare const windowed: (interval: Duration.Input) => Schedule; * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const forever: Schedule; declare const identity_: () => Schedule; @@ -5023,75 +5348,120 @@ export { /** * Creates a schedule that always recurs, passing inputs directly as outputs. * + * **When to use** + * + * Use when you need an infinite schedule that preserves input values as + * outputs. + * * **Details** * * This schedule runs indefinitely, returning each input value as its output * without modification. It effectively acts as a pass-through that simply * echoes its input values at each step. * + * @see {@link forever} for an infinite schedule that returns incrementing step counts + * @category constructors * @since 2.0.0 - * @category Constructors */ identity_ as identity }; /** - * Ensures that the provided schedule respects a specified input type. + * Ensures that a schedule's input type extends a given type `T`. + * + * **When to use** + * + * Use when you need a generic helper to prove that an existing schedule can + * consume a required input type without changing runtime behavior. + * + * **Example** (Constraining schedule input types) * - * @example * ```ts * import { Schedule } from "effect" * - * // Ensure schedule accepts string inputs - * const stringSchedule = Schedule.exponential("100 millis").pipe( - * Schedule.satisfiesInputType() - * ) + * declare const StringInputSchedule: Schedule.Schedule + * declare const NumberInputSchedule: Schedule.Schedule * - * // Ensure schedule accepts number inputs - * const numberSchedule = Schedule.spaced("1 second").pipe( - * Schedule.satisfiesInputType() - * ) + * const satisfiesStringInput = Schedule.satisfiesInputType() * - * // Type-level constraint - this would be a compile error: - * // Schedule.recurs(3).pipe(Schedule.satisfiesInputType()) - * // where CustomType doesn't match the schedule's input type + * // This works because the schedule input type is string. + * const validSchedule = satisfiesStringInput(StringInputSchedule) + * + * // This would cause a TypeScript compilation error: + * // const invalidSchedule = satisfiesStringInput(NumberInputSchedule) * ``` * - * @since 2.0.0 - * @category ensuring types + * @see {@link setInputType} for adapting an input-agnostic schedule + * + * @category utility types + * @since 4.0.0 */ export declare const satisfiesInputType: () => (self: Schedule) => Schedule; /** - * Sets the input type of the provided schedule to a specified type, without - * altering the schedule's behavior. + * Sets the input type of the provided schedule without altering its behavior. * - * @since 2.0.0 - * @category ensuring types + * **When to use** + * + * Use to adapt a schedule that does not depend on its input values. + * + * **Details** + * + * This helper is checked at compile time and does not change the schedule's + * runtime behavior. + * + * **Example** (Setting a schedule input type) + * + * ```ts + * import { Schedule } from "effect" + * + * const schedule = Schedule.recurs(3).pipe( + * Schedule.setInputType() + * ) + * ``` + * + * @see {@link satisfiesInputType} for checking an existing input type + * + * @category utility types + * @since 4.0.0 */ export declare const setInputType: () => (self: Schedule) => Schedule; /** - * Ensures that the provided schedule respects a specified output type. + * Ensures that a schedule's output type extends a given type `T`. + * + * **Details** + * + * This helper is checked at compile time and does not change the schedule's + * runtime behavior. + * + * **Example** (Constraining schedule output types) * - * @example * ```ts - * import { Effect, Schedule } from "effect" + * import { Schedule } from "effect" * - * // satisfiesOutputType is a type-level function for compile-time constraints - * // It ensures that a schedule's output type matches the specified type + * declare const StringOutputSchedule: Schedule.Schedule + * declare const NumberOutputSchedule: Schedule.Schedule * - * // Example with string output - * const stringSchedule = Schedule.exponential("100 millis").pipe( - * Schedule.map(() => Effect.succeed("hello")), - * Schedule.satisfiesOutputType() - * ) + * const satisfiesStringOutput = Schedule.satisfiesOutputType() + * + * // This works because the schedule output type is string. + * const validSchedule = satisfiesStringOutput(StringOutputSchedule) + * + * // This would cause a TypeScript compilation error: + * // const invalidSchedule = satisfiesStringOutput(NumberOutputSchedule) * ``` * - * @since 2.0.0 - * @category ensuring types + * @category utility types + * @since 4.0.0 */ export declare const satisfiesOutputType: () => (self: Schedule) => Schedule; /** - * Ensures that the provided schedule respects a specified error type. + * Ensures that a schedule's error type extends a given type `T`. + * + * **Details** + * + * This helper is checked at compile time and does not change the schedule's + * runtime behavior. + * + * **Example** (Constraining schedule error types) * - * @example * ```ts * import { Data, Schedule } from "effect" * @@ -5100,50 +5470,53 @@ export declare const satisfiesOutputType: () => {} * - * // Ensure schedule handles CustomError types - * const errorSchedule = Schedule.exponential("100 millis").pipe( - * Schedule.satisfiesErrorType() - * ) + * declare const CustomErrorSchedule: Schedule.Schedule + * declare const StringErrorSchedule: Schedule.Schedule * - * // Ensure schedule handles never errors (no errors) - * const safeSchedule = Schedule.spaced("1 second").pipe( - * Schedule.satisfiesErrorType() - * ) + * const satisfiesCustomError = Schedule.satisfiesErrorType() + * + * // This works because the schedule error type is CustomError. + * const validSchedule = satisfiesCustomError(CustomErrorSchedule) + * + * // This would cause a TypeScript compilation error: + * // const invalidSchedule = satisfiesCustomError(StringErrorSchedule) * ``` * - * @since 2.0.0 - * @category ensuring types + * @category utility types + * @since 4.0.0 */ export declare const satisfiesErrorType: () => (self: Schedule) => Schedule; /** - * Ensures that the provided schedule respects a specified context type. + * Ensures that a schedule's context type extends a given type `T`. + * + * **Details** + * + * This helper is checked at compile time and does not change the schedule's + * runtime behavior. + * + * **Example** (Constraining schedule service types) * - * @example * ```ts * import { Schedule } from "effect" * - * // Define service interfaces (type-level only) * interface Logger { * readonly log: (message: string) => void * } * - * interface Database { - * readonly query: (sql: string) => Promise - * } + * declare const LoggerSchedule: Schedule.Schedule + * declare const NumberSchedule: Schedule.Schedule * - * // Ensure schedule requires Logger service - * const loggerSchedule = Schedule.spaced("1 second").pipe( - * Schedule.satisfiesServicesType() - * ) + * const satisfiesLogger = Schedule.satisfiesServicesType() * - * // Ensure schedule requires both Logger and Database services - * const multiServiceSchedule = Schedule.exponential("100 millis").pipe( - * Schedule.satisfiesServicesType() - * ) + * // This works because the schedule context type is Logger. + * const validSchedule = satisfiesLogger(LoggerSchedule) + * + * // This would cause a TypeScript compilation error: + * // const invalidSchedule = satisfiesLogger(NumberSchedule) * ``` * - * @since 2.0.0 - * @category ensuring types + * @category utility types + * @since 4.0.0 */ export declare const satisfiesServicesType: () => (self: Schedule) => Schedule; //# sourceMappingURL=Schedule.d.ts.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Schedule.d.ts.map b/.opencode/node_modules/effect/dist/Schedule.d.ts.map index c9ba34b556060b7d300725066b89b19be027ae8d..6d6605e4f8d80876cd4c13fa5e52a2052af59c17 100644 --- a/.opencode/node_modules/effect/dist/Schedule.d.ts.map +++ b/.opencode/node_modules/effect/dist/Schedule.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Schedule.d.ts","sourceRoot":"","sources":["../src/Schedule.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAK5C,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,eAAe,CAAA;AAE5D,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAW,MAAM,YAAY,CAAA;AAEnE,QAAA,MAAM,MAAM,qBAAqB,CAAA;AAIjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,WAAW,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,GAAG,OAAO,EAAE,GAAG,CAAC,KAAK,GAAG,KAAK,EAAE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,GAAG,KAAK,EAC5D,MAAM,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,KACxC,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAS,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Schedule.js b/.opencode/node_modules/effect/dist/Schedule.js index 3ba8535856bccf777f3a42122b9725d9b919449f..a27049726f12182e0eb564b08aa62a98ecc74752 100644 --- a/.opencode/node_modules/effect/dist/Schedule.js +++ b/.opencode/node_modules/effect/dist/Schedule.js @@ -1,31 +1,10 @@ /** - * This module provides utilities for creating and composing schedules for retrying operations, - * repeating effects, and implementing various timing strategies. + * Describes policies for retrying, repeating, and pacing Effect programs. * - * A Schedule is a function that takes an input and returns a decision whether to continue or halt, - * along with a delay duration. Schedules can be combined, transformed, and used to implement - * sophisticated retry and repetition logic. - * - * @example - * ```ts - * import { Effect, Schedule } from "effect" - * - * // Retry with exponential backoff - * const retryPolicy = Schedule.exponential("100 millis", 2.0) - * .pipe(Schedule.both(Schedule.recurs(3))) - * - * const program = Effect.gen(function*() { - * // This will retry up to 3 times with exponential backoff - * const result = yield* Effect.retry( - * Effect.fail("Network error"), - * retryPolicy - * ) - * }) - * - * // Repeat on a fixed schedule - * const heartbeat = Effect.log("heartbeat") - * .pipe(Effect.repeat(Schedule.spaced("30 seconds"))) - * ``` + * A `Schedule` is stepped with an input value. Each + * step either stops or produces an output together with the delay before the + * next step. Schedules are used by retry, repeat, stream, and channel APIs to + * decide when work should continue, how long to wait, and when to stop. * * @since 2.0.0 */ @@ -44,8 +23,17 @@ import * as Result from "./Result.js"; const TypeId = "~effect/Schedule"; const randomNext = /*#__PURE__*/random.Random.useSync(random => random.nextDoubleUnsafe()); /** + * Context reference containing metadata for the currently running schedule step. + * + * **Details** + * + * Repeat, retry, stream, and channel scheduling operations provide this service + * to effects run between schedule steps. The default value contains undefined + * input and output values, zero duration, and zeroed timing fields before any + * schedule step has produced metadata. + * + * @category metadata * @since 4.0.0 - * @category Metadata */ export const CurrentMetadata = /*#__PURE__*/Context.Reference("effect/Schedule/CurrentMetadata", { defaultValue: /*#__PURE__*/constant({ @@ -72,7 +60,8 @@ const ScheduleProto = { /** * Type guard that checks if a value is a Schedule. * - * @example + * **Example** (Checking for schedules) + * * ```ts * import { Schedule } from "effect" * @@ -85,33 +74,32 @@ const ScheduleProto = { * console.log(Schedule.isSchedule(undefined)) // false * ``` * - * @since 2.0.0 * @category guards + * @since 2.0.0 */ export const isSchedule = u => hasProperty(u, TypeId); /** * Creates a Schedule from a step function that returns a Pull. * - * @example - * ```ts - * import { Schedule } from "effect" + * **Example** (Creating a custom schedule from a step function) * - * // fromStep is an advanced function for creating custom schedules - * // It requires a step function that returns a Pull value + * ```ts + * import { Cause, Duration, Effect, Schedule } from "effect" * - * // Most users should use simpler schedule constructors like: - * const simpleSchedule = Schedule.exponential("100 millis") - * const spacedSchedule = Schedule.spaced("1 second") - * const recurringSchedule = Schedule.recurs(5) + * const schedule = Schedule.fromStep(Effect.sync(() => { + * let count = 0 * - * // These can be combined and transformed as needed - * const complexSchedule = simpleSchedule.pipe( - * Schedule.both(Schedule.recurs(3)) - * ) + * return (_now: number, _input: string) => { + * if (count >= 3) { + * return Cause.done(count) + * } + * return Effect.succeed([count++, Duration.millis(100)] as [number, Duration.Duration]) + * } + * })) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export const fromStep = step => { const self = Object.create(ScheduleProto); @@ -140,26 +128,25 @@ const metadataFn = () => { /** * Creates a Schedule from a step function that receives metadata about the schedule's execution. * - * @example - * ```ts - * import { Effect, Schedule } from "effect" + * **Example** (Creating a metadata-aware schedule) * - * // fromStepWithMetadata is an advanced function for creating schedules - * // that need access to execution metadata like timing and recurrence count + * ```ts + * import { Cause, Duration, Effect, Schedule } from "effect" * - * // Most users should use simpler metadata-aware functions like: - * const metadataSchedule = Schedule.spaced("1 second").pipe( - * Schedule.collectWhile((metadata) => Effect.succeed(metadata.attempt <= 5)) - * ) + * const firstThreeInputs = Schedule.fromStepWithMetadata(Effect.succeed((metadata: Schedule.InputMetadata) => { + * if (metadata.attempt > 3) { + * return Cause.done("finished") + * } * - * // Or use existing schedules with metadata transformations: - * const conditionalSchedule = Schedule.exponential("100 millis").pipe( - * Schedule.tapOutput((output) => Effect.log(`Output: ${output}`)) - * ) + * return Effect.succeed([ + * `attempt ${metadata.attempt}: ${metadata.input}`, + * Duration.millis(250) + * ] as [string, Duration.Duration]) + * })) * ``` * - * @since 4.0.0 * @category constructors + * @since 4.0.0 */ export const fromStepWithMetadata = step => fromStep(effect.map(step, f => { const meta = metadataFn(); @@ -168,7 +155,8 @@ export const fromStepWithMetadata = step => fromStep(effect.map(step, f => { /** * Extracts the step function from a Schedule. * - * @example + * **Example** (Extracting a schedule step function) + * * ```ts * import { Effect, Schedule } from "effect" * @@ -178,24 +166,39 @@ export const fromStepWithMetadata = step => fromStep(effect.map(step, f => { * const program = Effect.gen(function*() { * const stepFn = yield* Schedule.toStep(schedule) * - * // Use the step function directly for custom logic - * const now = Date.now() + * // Use the step function directly for custom logic. The timestamp is + * // supplied by the caller, so tests can pass a deterministic value. + * const now = 0 * const result = yield* stepFn(now, "input") * * console.log(`Step result: ${result}`) * }) * ``` * - * @since 4.0.0 * @category destructors + * @since 4.0.0 */ export const toStep = schedule => effect.catchCause(schedule.step, cause => effect.succeed(() => effect.failCause(cause))); /** - * Extracts a step function from a Schedule that provides metadata about each - * execution. It will also handle sleeping for the computed delay. + * Extracts a step function from a `Schedule` that sleeps for each computed + * delay and returns metadata for the completed step. + * + * **When to use** + * + * Use to drive a schedule manually while preserving the computed output, + * delay, input, attempt, and elapsed timing metadata for each step. + * + * **Details** + * + * The returned step reads the current time from `Clock` when invoked, calls the + * schedule step with that timestamp and input, sleeps for the returned + * duration, and then yields `Metadata`. + * + * @see {@link toStep} for manually supplying the timestamp and handling the returned delay yourself + * @see {@link toStepWithSleep} for the same automatic sleeping behavior when only the schedule output is needed * - * @since 4.0.0 * @category destructors + * @since 4.0.0 */ export const toStepWithMetadata = schedule => effect.clockWith(clock => effect.map(toStep(schedule), step => { const metaFn = metadataFn(); @@ -212,7 +215,8 @@ export const toStepWithMetadata = schedule => effect.clockWith(clock => effect.m /** * Extracts a step function from a Schedule that automatically handles sleep delays. * - * @example + * **Example** (Extracting a sleeping step function) + * * ```ts * import { Effect, Schedule } from "effect" * @@ -235,37 +239,34 @@ export const toStepWithMetadata = schedule => effect.clockWith(clock => effect.m * }) * ``` * - * @since 4.0.0 * @category destructors + * @since 4.0.0 */ export const toStepWithSleep = schedule => effect.map(toStepWithMetadata(schedule), step => input => effect.map(step(input), meta => meta.output)); /** * Returns a new `Schedule` that adds the delay computed by the specified - * effectful function to the the next recurrence of the schedule. + * effectful function to the next recurrence of the schedule. + * + * **Example** (Adding extra delay to a schedule) * - * @example * ```ts * import { Console, Data, Duration, Effect, Schedule } from "effect" * * class RetryAttemptError extends Data.TaggedError("RetryAttemptError")<{ readonly message: string }> {} * - * // Add random jitter to schedule delays - * const jitteredSchedule = Schedule.addDelay( + * // Add a deterministic extra delay based on the schedule output + * const delayedSchedule = Schedule.addDelay( * Schedule.exponential("100 millis").pipe(Schedule.take(5)), * (output) => - * // Add random jitter between 0-50ms - * Effect.succeed(Duration.millis(Math.random() * 50)) + * Effect.succeed(Duration.millis(Duration.toMillis(output) * 0.25)) * ) * - * const jitterProgram = Effect.gen(function*() { + * const repeatProgram = Effect.gen(function*() { * yield* Effect.repeat( - * Effect.gen(function*() { - * yield* Console.log(`Task executed at ${new Date().toISOString()}`) - * return "jittered task" - * }), - * jitteredSchedule.pipe( + * Effect.succeed("delayed task"), + * delayedSchedule.pipe( * Schedule.tapOutput((delay) => - * Console.log(`Base delay with jitter applied`) + * Console.log(`Base delay: ${delay}`) * ) * ) * ) @@ -293,12 +294,15 @@ export const toStepWithSleep = schedule => effect.map(toStepWithMetadata(schedul * ) * }) * - * // Add effectful delay computation + * // Add effectful delay computation from deterministic service data + * const loadByExecution = [1, 3, 2, 4] as const + * * const dynamicSchedule = Schedule.addDelay( * Schedule.spaced("1 second").pipe(Schedule.take(4)), - * (executionNumber) => - * // Simulate checking system load and return additional delay - * Effect.succeed(Duration.millis(Math.random() > 0.7 ? 2000 : 500)) + * (executionNumber) => { + * const load = loadByExecution[executionNumber] ?? 1 + * return Effect.succeed(Duration.millis(load * 100)) + * } * ) * * const dynamicProgram = Effect.gen(function*() { @@ -311,25 +315,6 @@ export const toStepWithSleep = schedule => effect.map(toStepWithMetadata(schedul * ) * }) * - * // Add delay based on previous execution results (30% extra) - * const resultBasedSchedule = Schedule.addDelay( - * Schedule.fibonacci("200 millis").pipe(Schedule.take(5)), - * (fibonacciDelay) => - * Effect.succeed(Duration.millis(Duration.toMillis(fibonacciDelay) * 0.3)) - * ) - * - * const resultProgram = Effect.gen(function*() { - * yield* Effect.repeat( - * Effect.gen(function*() { - * yield* Console.log("Result-based delay task") - * return Math.random() - * }), - * resultBasedSchedule.pipe( - * Schedule.tapOutput((delay) => Console.log(`Fibonacci delay: ${delay}`)) - * ) - * ) - * }) - * * // Combine with retry for progressive backoff * const progressiveRetrySchedule = Schedule.addDelay( * Schedule.exponential("50 millis").pipe(Schedule.take(4)), @@ -354,16 +339,16 @@ export const toStepWithSleep = schedule => effect.map(toStepWithMetadata(schedul * }) * ``` * + * @category delays & timeouts * @since 2.0.0 - * @category utils */ export const addDelay = /*#__PURE__*/dual(2, (self, f) => modifyDelay(self, (output, delay) => effect.map(f(output), d => Duration.sum(Duration.fromInputUnsafe(d), Duration.fromInputUnsafe(delay))))); /** - * Returns a new `Schedule` that will first execute the left (i.e. `self`) - * schedule to completion. Once the left schedule is complete, the right (i.e. - * `other`) schedule will be executed to completion. + * Returns a schedule that runs `self` to completion, then runs `other`, and + * merges their outputs. + * + * **Example** (Sequencing quick and slow retries) * - * @example * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -395,20 +380,22 @@ export const addDelay = /*#__PURE__*/dual(2, (self, f) => modifyDelay(self, (out * }) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ export const andThen = /*#__PURE__*/dual(2, (self, other) => map(andThenResult(self, other), result => effect.succeed(Result.merge(result)))); /** - * Returns a new `Schedule` that will first execute the left (i.e. `self`) - * schedule to completion. Once the left schedule is complete, the right (i.e. - * `other`) schedule will be executed to completion. + * Returns a schedule that runs `self` to completion, then runs `other`, and + * preserves which schedule produced each output. + * + * **Details** + * + * The resulting schedule emits a `Result` to indicate which phase produced + * each output: outputs from `self` are emitted as `Failure`, and outputs from + * `other` are emitted as `Success`. * - * The output of the resulting schedule is a `Result` where outputs of the - * left schedule are emitted as `Result.Err` and outputs of the right - * schedule are emitted as `Result.Ok`. + * **Example** (Tracking sequential schedule phases) * - * @example * ```ts * import { Console, Effect, Result, Schedule } from "effect" * @@ -436,8 +423,8 @@ export const andThen = /*#__PURE__*/dual(2, (self, other) => map(andThenResult(s * }) * ``` * - * @since 2.0.0 * @category sequencing + * @since 4.0.0 */ export const andThenResult = /*#__PURE__*/dual(2, (self, other) => fromStep(effect.sync(() => { let currentSide = 0; @@ -465,7 +452,12 @@ export const andThenResult = /*#__PURE__*/dual(2, (self, other) => fromStep(effe * to recur, using the maximum of the two durations between recurrences and * outputting a tuple of the outputs of both schedules. * - * @example + * **When to use** + * + * Use when the combined schedule should continue only while both schedules still recur. + * + * **Example** (Combining time and attempt limits) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -482,7 +474,7 @@ export const andThenResult = /*#__PURE__*/dual(2, (self, other) => fromStep(effe * const program = Effect.gen(function*() { * const results = yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Task executed at ${new Date().toISOString()}`) + * yield* Console.log("Task executed") * return "task completed" * }), * bothSchedule.pipe( @@ -526,8 +518,10 @@ export const andThenResult = /*#__PURE__*/dual(2, (self, other) => fromStep(effe * // Compare with either which provides union semantics (OR logic) * ``` * + * @see {@link either} for continuing while either schedule still recurs + * + * @category combining * @since 2.0.0 - * @category utilities */ export const both = /*#__PURE__*/dual(2, (self, other) => bothWith(self, other, (left, right) => [left, right])); /** @@ -535,7 +529,13 @@ export const both = /*#__PURE__*/dual(2, (self, other) => bothWith(self, other, * to recur, using the maximum of the two durations between recurrences and * outputting the result of the left schedule (i.e. `self`). * - * @example + * **When to use** + * + * Use when two schedules must both allow recurrence and only the left schedule's + * output is needed. + * + * **Example** (Combining schedules and keeping the left output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -558,8 +558,8 @@ export const both = /*#__PURE__*/dual(2, (self, other) => bothWith(self, other, * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ export const bothLeft = /*#__PURE__*/dual(2, (self, other) => bothWith(self, other, output => output)); /** @@ -567,7 +567,13 @@ export const bothLeft = /*#__PURE__*/dual(2, (self, other) => bothWith(self, oth * to recur, using the maximum of the two durations between recurrences and * outputting the result of the right schedule (i.e. `other`). * - * @example + * **When to use** + * + * Use when two schedules must both allow recurrence and only the right + * schedule's output is needed. + * + * **Example** (Combining schedules and keeping the right output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -592,8 +598,8 @@ export const bothLeft = /*#__PURE__*/dual(2, (self, other) => bothWith(self, oth * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ export const bothRight = /*#__PURE__*/dual(2, (self, other) => bothWith(self, other, (_, output) => output)); /** @@ -602,7 +608,13 @@ export const bothRight = /*#__PURE__*/dual(2, (self, other) => bothWith(self, ot * outputting the result of the combination of both schedule outputs using the * specified `combine` function. * - * @example + * **When to use** + * + * Use when two schedules must both allow recurrence and their outputs should be + * combined into a custom value. + * + * **Example** (Combining schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -631,8 +643,8 @@ export const bothRight = /*#__PURE__*/dual(2, (self, other) => bothWith(self, ot * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ export const bothWith = /*#__PURE__*/dual(3, (self, other, combine) => fromStep(effect.map(effect.zip(toStep(self), toStep(other)), ([stepLeft, stepRight]) => (now, input) => Pull.matchEffect(stepLeft(now, input), { onSuccess: leftResult => stepRight(now, input).pipe(effect.map(rightResult => [combine(leftResult[0], rightResult[0]), Duration.max(leftResult[1], rightResult[1])]), Pull.catchDone(rightDone => Cause.done(combine(leftResult[0], rightDone)))), @@ -640,10 +652,16 @@ export const bothWith = /*#__PURE__*/dual(3, (self, other, combine) => fromStep( onFailure: effect.failCause })))); /** - * Returns a new `Schedule` that always recurs, collecting all inputs of the - * schedule into an array. + * Returns a new `Schedule` that follows `self` and outputs the inputs seen so + * far as an array. + * + * **Details** + * + * This does not make the schedule run forever. The collected schedule stops + * when `self` stops and fails when `self` fails. + * + * **Example** (Collecting schedule inputs) * - * @example * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -665,15 +683,21 @@ export const bothWith = /*#__PURE__*/dual(3, (self, other, combine) => fromStep( * }) * ``` * - * @since 2.0.0 - * @category utilities + * @category collecting + * @since 4.0.0 */ export const collectInputs = self => collectWhile(passthrough(self), () => effect.succeed(true)); /** - * Returns a new `Schedule` that always recurs, collecting all outputs of the - * schedule into an array. + * Returns a new `Schedule` that follows `self` and outputs the schedule outputs + * seen so far as an array. + * + * **Details** + * + * This does not make the schedule run forever. The collected schedule stops + * when `self` stops and fails when `self` fails. + * + * **Example** (Collecting schedule outputs) * - * @example * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -693,39 +717,19 @@ export const collectInputs = self => collectWhile(passthrough(self), () => effec * }) * ``` * - * @since 2.0.0 - * @category utilities + * @category collecting + * @since 4.0.0 */ export const collectOutputs = self => collectWhile(self, () => effect.succeed(true)); /** * Returns a new `Schedule` that recurs as long as the specified `predicate` * returns `true`, collecting all outputs of the schedule into an array. * - * @example + * **Example** (Collecting outputs while a condition holds) + * * ```ts * import { Console, Effect, Schedule } from "effect" * - * // Collect outputs while under time limit - * const collectForTime = Schedule.collectWhile( - * Schedule.spaced("500 millis"), - * (metadata) => Effect.succeed(metadata.elapsed < 3000) // Stop after 3 seconds - * ) - * - * const timeBasedProgram = Effect.gen(function*() { - * const results = yield* Effect.repeat( - * Effect.gen(function*() { - * const value = Math.floor(Math.random() * 100) - * yield* Console.log(`Generated value: ${value}`) - * return value - * }), - * collectForTime - * ) - * - * yield* Console.log( - * `Collected ${results.length} values: [${results.join(", ")}]` - * ) - * }) - * * // Collect outputs while condition is met * const collectWhileSmall = Schedule.collectWhile( * Schedule.exponential("100 millis"), @@ -736,16 +740,16 @@ export const collectOutputs = self => collectWhile(self, () => effect.succeed(tr * const conditionalProgram = Effect.gen(function*() { * let attempt = 0 * - * const delays = yield* Effect.repeat( + * const attempts = yield* Effect.repeat( * Effect.gen(function*() { * attempt++ * yield* Console.log(`Retry attempt ${attempt}`) - * return `${Date.now()}` + * return `attempt-${attempt}` * }), * collectWhileSmall * ) * - * yield* Console.log(`Collected attempts: [${delays.join(", ")}]`) + * yield* Console.log(`Collected attempts: [${attempts.join(", ")}]`) * }) * * // Collect with effectful predicate @@ -762,19 +766,17 @@ export const collectOutputs = self => collectWhile(self, () => effect.succeed(tr * ) * * const effectfulProgram = Effect.gen(function*() { - * const timestamps = yield* Effect.repeat( - * Effect.gen(function*() { - * const now = new Date().toISOString() - * yield* Console.log(`Task at ${now}`) - * return now - * }), + * const results = yield* Effect.repeat( + * Effect.succeed("checked"), * collectWithCheck * ) * - * yield* Console.log(`Final collection: ${timestamps.length} items`) + * yield* Console.log(`Final collection: ${results.length} items`) * }) * * // Collect samples with condition + * const samples = [12, 18, 24, 30, 36] + * * const collectSamples = Schedule.collectWhile( * Schedule.spaced("200 millis"), * (metadata) => @@ -782,24 +784,25 @@ export const collectOutputs = self => collectWhile(self, () => effect.succeed(tr * ) * * const samplingProgram = Effect.gen(function*() { - * const samples = yield* Effect.repeat( + * let index = 0 + * const collected = yield* Effect.repeat( * Effect.gen(function*() { - * const sample = Math.random() * 100 - * yield* Console.log(`Sample: ${sample.toFixed(1)}`) + * const sample = samples[index++] + * yield* Console.log(`Sample: ${sample}`) * return sample * }), * collectSamples * ) * - * const average = samples.reduce((sum, s) => sum + s, 0) / samples.length + * const average = collected.reduce((sum, s) => sum + s, 0) / collected.length * yield* Console.log( - * `Collected ${samples.length} samples, average: ${average.toFixed(1)}` + * `Collected ${collected.length} samples, average: ${average.toFixed(1)}` * ) * }) * ``` * + * @category collecting * @since 2.0.0 - * @category utilities */ export const collectWhile = /*#__PURE__*/dual(2, (self, predicate) => reduce(while_(self, predicate), () => [], (outputs, output) => { outputs.push(output); @@ -809,7 +812,8 @@ export const collectWhile = /*#__PURE__*/dual(2, (self, predicate) => reduce(whi * Returns a new `Schedule` that recurs on the specified `Cron` schedule and * outputs the duration between recurrences. * - * @example + * **Example** (Scheduling work with cron expressions) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -821,7 +825,7 @@ export const collectWhile = /*#__PURE__*/dual(2, (self, predicate) => reduce(whi * const minutelyProgram = Effect.gen(function*() { * yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Minutely task at ${new Date().toISOString()}`) + * yield* Console.log("Running minutely task") * return "minute" * }), * everyMinute.pipe( @@ -859,8 +863,8 @@ export const collectWhile = /*#__PURE__*/dual(2, (self, predicate) => reduce(whi * Effect.gen(function*() { * yield* Console.log("Generating weekly report...") * const report = { - * week: Math.floor(Date.now() / (7 * 24 * 60 * 60 * 1000)), - * timestamp: new Date().toISOString() + * week: 42, + * status: "ready" as const * } * yield* Console.log(`Report generated: ${JSON.stringify(report)}`) * return report @@ -873,10 +877,13 @@ export const collectWhile = /*#__PURE__*/dual(2, (self, predicate) => reduce(whi * const businessHoursCheck = Schedule.cron("0,15,30,45 9-17 * * 1-5") * * const businessProgram = Effect.gen(function*() { + * const statuses = ["healthy", "healthy", "degraded", "healthy"] as const + * let index = 0 + * * yield* Effect.repeat( * Effect.gen(function*() { * yield* Console.log("Business hours health check...") - * const status = Math.random() > 0.1 ? "healthy" : "degraded" + * const status = statuses[index++] * yield* Console.log(`System status: ${status}`) * return status * }), @@ -893,9 +900,9 @@ export const collectWhile = /*#__PURE__*/dual(2, (self, predicate) => reduce(whi * yield* Effect.repeat( * Effect.gen(function*() { * yield* Console.log("Processing monthly invoices...") - * const invoiceCount = Math.floor(Math.random() * 100) + 50 + * const invoiceCount = 72 * yield* Console.log(`Processed ${invoiceCount} invoices`) - * return { count: invoiceCount, date: new Date().toISOString() } + * return { count: invoiceCount, batch: "2024-01-a" } * }), * monthlyInvoice.pipe(Schedule.take(1)) * ) @@ -909,11 +916,13 @@ export const collectWhile = /*#__PURE__*/dual(2, (self, predicate) => reduce(whi * ) * * const robustProgram = Effect.gen(function*() { + * let attempt = 0 + * * yield* Effect.repeat( * Effect.gen(function*() { + * attempt++ * yield* Console.log("Complex scheduled task...") - * // Simulate occasional failures - * if (Math.random() < 0.3) { + * if (attempt === 1) { * return yield* Effect.fail(new ScheduledTaskError({ message: "Scheduled task failed" })) * } * return "success" @@ -927,21 +936,22 @@ export const collectWhile = /*#__PURE__*/dual(2, (self, predicate) => reduce(whi * }) * ``` * - * @since 4.0.0 * @category constructors + * @since 2.0.0 */ export const cron = (expression, tz) => { const parsed = Cron.isCron(expression) ? Result.succeed(expression) : Cron.parse(expression, tz); - return fromStep(effect.map(parsed.asEffect(), cron => (now, _) => effect.sync(() => { + return fromStep(effect.map(effect.fromResult(parsed), cron => (now, _) => effect.sync(() => { const next = Cron.next(cron, now).getTime(); const duration = Duration.millis(next - now); return [duration, duration]; }))); }; /** - * Returns a new schedule that outputs the delay between each occurence. + * Returns a new schedule that outputs the delay between each occurrence. + * + * **Example** (Extracting schedule delays) * - * @example * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -964,7 +974,7 @@ export const cron = (expression, tz) => { * ) * }) * - * // Monitor delays from a fibonacci schedule + * // Monitor delays from a Fibonacci schedule * const fibonacciDelays = Schedule.delays( * Schedule.fibonacci("200 millis").pipe(Schedule.take(8)) * ) @@ -1001,7 +1011,7 @@ export const cron = (expression, tz) => { * yield* Effect.repeat( * Effect.gen(function*() { * yield* Console.log("Adaptive task execution") - * return Date.now() + * return "completed" * }), * adaptiveDelays.pipe( * Schedule.tapOutput((delay) => Console.log(`Adaptive delay: ${delay}`)) @@ -1018,18 +1028,37 @@ export const cron = (expression, tz) => { * ) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const delays = self => fromStep(effect.map(toStep(self), step => (now, input) => Pull.catchDone(effect.map(step(now, input), ([_, duration]) => [duration, duration]), _ => Cause.done(Duration.zero)))); /** * Returns a schedule that recurs once after the specified duration. * + * **When to use** + * + * Use when you need a schedule that recurs once after a fixed delay. + * + * **Details** + * * The schedule outputs the configured duration for its first recurrence and * then completes. * - * @since 2.0.0 + * **Example** (Recurring once after a duration) + * + * ```ts + * import { Console, Effect, Schedule } from "effect" + * + * const program = Effect.repeat( + * Console.log("runs again after one second"), + * Schedule.duration("1 second") + * ) + * ``` + * + * @see {@link during} for recurring until a duration has elapsed + * * @category constructors + * @since 2.0.0 */ export const duration = durationInput => { const duration = Duration.fromInputUnsafe(durationInput); @@ -1039,7 +1068,12 @@ export const duration = durationInput => { * Returns a new `Schedule` that will always recur, but only during the * specified `duration` of time. * - * @example + * **When to use** + * + * Use to bound a repeating or retrying schedule by elapsed time. + * + * **Example** (Repeating work during a duration) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -1049,12 +1083,9 @@ export const duration = durationInput => { * const fiveSecondSchedule = Schedule.during("5 seconds") * * const timedProgram = Effect.gen(function*() { - * const startTime = Date.now() - * * yield* Effect.repeat( * Effect.gen(function*() { - * const elapsed = Date.now() - startTime - * yield* Console.log(`Task executed after ${elapsed}ms`) + * yield* Console.log("Task executed inside the time window") * yield* Effect.sleep("500 millis") // Each task takes 500ms * return "task done" * }), @@ -1082,8 +1113,8 @@ export const duration = durationInput => { * * yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Burst task at ${new Date().toISOString()}`) - * return Math.random() + * yield* Console.log("Burst task") + * return "burst" * }), * burstWindow * ) @@ -1104,7 +1135,7 @@ export const duration = durationInput => { * attempt++ * yield* Console.log(`Retry attempt ${attempt}`) * - * if (Math.random() < 0.8) { // 80% failure rate + * if (attempt < 4) { * return yield* Effect.fail(new RetryAttemptError({ message: `Attempt ${attempt} failed` })) * } * @@ -1119,8 +1150,10 @@ export const duration = durationInput => { * ) * ``` * - * @since 4.0.0 + * @see {@link duration} for one delayed recurrence + * * @category constructors + * @since 4.0.0 */ export const during = duration => while_(elapsed, ({ output @@ -1130,7 +1163,12 @@ export const during = duration => while_(elapsed, ({ * to recur, using the minimum of the two durations between recurrences and * outputting a tuple of the outputs of both schedules. * - * @example + * **When to use** + * + * Use when the combined schedule should continue while at least one schedule still recurs. + * + * **Example** (Combining schedules with either semantics) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -1147,7 +1185,7 @@ export const during = duration => while_(elapsed, ({ * const program = Effect.gen(function*() { * const results = yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Task executed at ${new Date().toISOString()}`) + * yield* Console.log("Task executed") * return "task completed" * }), * eitherSchedule.pipe( @@ -1190,11 +1228,13 @@ export const during = duration => while_(elapsed, ({ * }) * * // Either provides union semantics (OR logic) - * // Compare with intersect which provides intersection semantics (AND logic) + * // Compare with both, which provides intersection semantics (AND logic) * ``` * + * @see {@link both} for continuing only while both schedules still recur + * + * @category combining * @since 2.0.0 - * @category utilities */ export const either = /*#__PURE__*/dual(2, (self, other) => eitherWith(self, other, (left, right) => [left, right])); /** @@ -1202,7 +1242,13 @@ export const either = /*#__PURE__*/dual(2, (self, other) => eitherWith(self, oth * to recur, using the minimum of the two durations between recurrences and * outputting the result of the left schedule (i.e. `self`). * - * @example + * **When to use** + * + * Use when either schedule may keep recurrence going and only the left + * schedule's output is needed. + * + * **Example** (Combining either schedules and keeping the left output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1228,8 +1274,8 @@ export const either = /*#__PURE__*/dual(2, (self, other) => eitherWith(self, oth * }) * ``` * - * @since 2.0.0 - * @category utilities + * @category combining + * @since 4.0.0 */ export const eitherLeft = /*#__PURE__*/dual(2, (self, other) => eitherWith(self, other, output => output)); /** @@ -1237,7 +1283,13 @@ export const eitherLeft = /*#__PURE__*/dual(2, (self, other) => eitherWith(self, * to recur, using the minimum of the two durations between recurrences and * outputting the result of the right schedule (i.e. `other`). * - * @example + * **When to use** + * + * Use when either schedule may keep recurrence going and only the right + * schedule's output is needed. + * + * **Example** (Combining either schedules and keeping the right output) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1263,8 +1315,8 @@ export const eitherLeft = /*#__PURE__*/dual(2, (self, other) => eitherWith(self, * }) * ``` * - * @since 2.0.0 - * @category utilities + * @category combining + * @since 4.0.0 */ export const eitherRight = /*#__PURE__*/dual(2, (self, other) => eitherWith(self, other, (_, output) => output)); /** @@ -1273,7 +1325,13 @@ export const eitherRight = /*#__PURE__*/dual(2, (self, other) => eitherWith(self * outputting the result of the combination of both schedule outputs using the * specified `combine` function. * - * @example + * **When to use** + * + * Use when either schedule may keep recurrence going and their outputs should be + * combined into a custom value. + * + * **Example** (Combining either schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1303,8 +1361,8 @@ export const eitherRight = /*#__PURE__*/dual(2, (self, other) => eitherWith(self * }) * ``` * + * @category combining * @since 2.0.0 - * @category utilities */ export const eitherWith = /*#__PURE__*/dual(3, (self, other, combine) => fromStep(effect.map(effect.zip(toStep(self), toStep(other)), ([stepLeft, stepRight]) => (now, input) => Pull.matchEffect(stepLeft(now, input), { onSuccess: leftResult => stepRight(now, input).pipe(effect.map(rightResult => [combine(leftResult[0], rightResult[0]), Duration.min(leftResult[1], rightResult[1])]), Pull.catchDone(rightDone => effect.succeed([combine(leftResult[0], rightDone), leftResult[1]]))), @@ -1312,14 +1370,16 @@ export const eitherWith = /*#__PURE__*/dual(3, (self, other, combine) => fromSte onDone: leftDone => stepRight(now, input).pipe(effect.map(rightResult => [combine(leftDone, rightResult[0]), rightResult[1]]), Pull.catchDone(rightDone => Cause.done(combine(leftDone, rightDone)))) })))); /** - * A schedule that always recurs and returns the total elapsed duration since the first recurrence. + * Schedule that always recurs and returns the total elapsed duration since the + * first recurrence. + * + * **Details** * * This schedule never stops and outputs the cumulative time that has passed since the schedule * started executing. Useful for tracking execution time or implementing time-based logic. * - * @returns A schedule that outputs the elapsed duration and never stops + * **Example** (Measuring elapsed schedule time) * - * @example * ```ts * import { Console, Duration, Effect, Schedule } from "effect" * @@ -1337,16 +1397,17 @@ export const eitherWith = /*#__PURE__*/dual(3, (self, other, combine) => fromSte * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const elapsed = /*#__PURE__*/fromStepWithMetadata(/*#__PURE__*/effect.succeed(meta => effect.succeed([Duration.millis(meta.elapsed), Duration.zero]))); /** - * A schedule that always recurs, but will wait a certain amount between + * Schedule that always recurs, but will wait a certain amount between * repetitions, given by `base * factor.pow(n)`, where `n` is the number of * repetitions so far. Returns the current duration between recurrences. * - * @example + * **Example** (Retrying with exponential backoff) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -1386,8 +1447,8 @@ export const elapsed = /*#__PURE__*/fromStepWithMetadata(/*#__PURE__*/effect.suc * // Will retry with delays: 50ms, 100ms, 200ms before success * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const exponential = (base, factor = 2) => { const baseMillis = Duration.toMillis(Duration.fromInputUnsafe(base)); @@ -1397,21 +1458,22 @@ export const exponential = (base, factor = 2) => { })); }; /** - * A schedule that always recurs, increasing delays by summing the preceding - * two delays (similar to the fibonacci sequence). Returns the current + * Schedule that always recurs, increasing delays by summing the preceding + * two delays (similar to the Fibonacci sequence). Returns the current * duration between recurrences. * - * @example + * **Example** (Retrying with Fibonacci backoff) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * * class RetryAttemptError extends Data.TaggedError("RetryAttemptError")<{ readonly message: string }> {} * - * // Basic fibonacci schedule starting with 100ms + * // Basic Fibonacci schedule starting with 100ms * const fibSchedule = Schedule.fibonacci("100 millis") * // Delays: 100ms, 100ms, 200ms, 300ms, 500ms, 800ms, 1300ms, ... * - * // Retry with fibonacci backoff for gradual increase + * // Retry with Fibonacci backoff for gradual increase * const retryWithFib = Effect.gen(function*() { * let attempt = 0 * @@ -1435,9 +1497,9 @@ export const exponential = (base, factor = 2) => { * yield* Console.log(`Final result: ${result}`) * }) * - * // Heartbeat with fibonacci intervals (starts fast, gets slower) + * // Heartbeat with Fibonacci intervals (starts fast, gets slower) * const adaptiveHeartbeat = Effect.gen(function*() { - * yield* Console.log(`Heartbeat at ${new Date().toISOString()}`) + * yield* Console.log("Heartbeat") * return "pulse" * }).pipe( * Effect.repeat( @@ -1459,8 +1521,8 @@ export const exponential = (base, factor = 2) => { * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const fibonacci = one => { const oneMillis = Duration.toMillis(Duration.fromInputUnsafe(one)); @@ -1480,24 +1542,31 @@ export const fibonacci = one => { * Returns a `Schedule` that recurs on the specified fixed `interval` and * outputs the number of repetitions of the schedule so far. * - * If the action run between updates takes longer than the interval, then the - * action will be run immediately, but re-runs will not "pile up". + * **When to use** * - * ``` + * Use when recurrences should stay aligned to a regular cadence. + * + * **Gotchas** + * + * If the action run between recurrences takes longer than the interval, the + * next recurrence happens immediately, but missed intervals are not replayed. + * + * ```text * |-----interval-----|-----interval-----|-----interval-----| * |---------action--------||action|-----|action|-----------| * ``` * - * @example + * **Example** (Repeating on fixed intervals) + * * ```ts * import { Console, Effect, Schedule } from "effect" * - * // Fixed interval schedule - runs exactly every 1 second + * // Fixed interval schedule - recurs on a one-second cadence * const everySecond = Schedule.fixed("1 second") * * // Health check that runs at fixed intervals * const healthCheck = Effect.gen(function*() { - * yield* Console.log(`Health check at ${new Date().toISOString()}`) + * yield* Console.log("Health check") * yield* Effect.sleep("200 millis") // simulate health check work * return "healthy" * }).pipe( @@ -1535,8 +1604,10 @@ export const fibonacci = one => { * }) * ``` * - * @since 2.0.0 + * @see {@link spaced} for delaying after each action completes + * * @category constructors + * @since 2.0.0 */ export const fixed = interval => { const window = Duration.toMillis(Duration.fromInputUnsafe(interval)); @@ -1564,7 +1635,8 @@ export const fixed = interval => { * Returns a new `Schedule` that maps the output of this schedule using the * specified function. * - * @example + * **Example** (Mapping schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1582,7 +1654,6 @@ export const fixed = interval => { * const structuredSchedule = Schedule.spaced("1 second").pipe( * Schedule.map((recurrence) => Effect.succeed({ * iteration: recurrence + 1, - * timestamp: new Date().toISOString(), * phase: recurrence < 5 ? "warmup" as const : "steady" as const * })) * ) @@ -1594,7 +1665,7 @@ export const fixed = interval => { * Schedule.take(8), * Schedule.tapOutput((info) => * Console.log( - * `${info.phase} phase - iteration ${info.iteration} at ${info.timestamp}` + * `${info.phase} phase - iteration ${info.iteration}` * ) * ) * ) @@ -1619,8 +1690,8 @@ export const fixed = interval => { * ) * ``` * - * @since 2.0.0 * @category mapping + * @since 2.0.0 */ export const map = /*#__PURE__*/dual(2, (self, f) => { const handle = Pull.matchEffect({ @@ -1640,9 +1711,10 @@ export const map = /*#__PURE__*/dual(2, (self, f) => { }); /** * Returns a new `Schedule` that modifies the delay of the next recurrence - * of the schedule using the specified effectual function. + * of the schedule using the specified effectful function. + * + * **Example** (Modifying delays from schedule output) * - * @example * ```ts * import { Console, Duration, Effect, Schedule } from "effect" * @@ -1667,17 +1739,26 @@ export const map = /*#__PURE__*/dual(2, (self, f) => { * }) * ``` * + * @category delays & timeouts * @since 2.0.0 - * @category utilities */ export const modifyDelay = /*#__PURE__*/dual(2, (self, f) => fromStep(effect.map(toStep(self), step => (now, input) => effect.flatMap(step(now, input), ([output, delay]) => effect.map(f(output, delay), delay => [output, Duration.fromInputUnsafe(delay)]))))); /** * Returns a new `Schedule` that randomly adjusts each recurrence delay. * - * Delays are jittered between `80%` and `120%` of the original delay. + * **When to use** + * + * Use to add random variation to an existing schedule's recurrence delays while + * preserving its output and completion behavior. + * + * **Details** + * + * Each recurrence delay is scaled by a random factor between `0.8` and `1.2`. + * + * @see {@link modifyDelay} for replacing recurrence delays with a custom effectful transformation * + * @category delays & timeouts * @since 2.0.0 - * @category utilities */ export const jittered = self => modifyDelay(self, (_, delay) => effect.map(randomNext, random => { const millis = Duration.toMillis(Duration.fromInputUnsafe(delay)); @@ -1686,7 +1767,8 @@ export const jittered = self => modifyDelay(self, (_, delay) => effect.map(rando /** * Returns a new `Schedule` that outputs the inputs of the specified schedule. * - * @example + * **Example** (Passing inputs through as outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1708,8 +1790,8 @@ export const jittered = self => modifyDelay(self, (_, delay) => effect.map(rando * }) * ``` * + * @category mapping * @since 2.0.0 - * @category utilities */ export const passthrough = self => fromStep(effect.map(toStep(self), step => (now, input) => Pull.matchEffect(step(now, input), { onSuccess: result => effect.succeed([input, result[1]]), @@ -1720,7 +1802,18 @@ export const passthrough = self => fromStep(effect.map(toStep(self), step => (no * Returns a `Schedule` which can only be stepped the specified number of * `times` before it terminates. * - * @example + * **When to use** + * + * Use when you need a counter schedule with no additional delay. + * + * **Gotchas** + * + * `recurs(n)` counts schedule recurrences, not the first evaluation of the + * effect being repeated or retried. For retrying, this means one initial + * attempt plus at most `n` retries. + * + * **Example** (Limiting recurrences) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -1752,13 +1845,13 @@ export const passthrough = self => fromStep(effect.map(toStep(self), step => (no * * // Combining recurs with other schedules for sophisticated retry logic * const complexRetry = Schedule.exponential("100 millis").pipe( - * Schedule.both(Schedule.recurs(3)) // At most 3 attempts + * Schedule.both(Schedule.recurs(3)) // At most 3 retries * ) * - * // Repeat an effect exactly 10 times - * const exactlyTenTimes = Effect.gen(function*() { + * // Allow ten recurrences after the initial run + * const tenRecurrences = Effect.gen(function*() { * yield* Console.log("Executing task...") - * return Math.random() + * return "completed" * }).pipe( * Effect.repeat(Schedule.recurs(10)) * ) @@ -1769,6 +1862,8 @@ export const passthrough = self => fromStep(effect.map(toStep(self), step => (no * ) * ``` * + * @see {@link take} for limiting an existing schedule + * * @category constructors * @since 2.0.0 */ @@ -1780,7 +1875,8 @@ export const recurs = times => while_(forever, ({ * using the specified effectful `combine` function and starting from the * specified `initial` state. * - * @example + * **Example** (Reducing schedule outputs) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1805,24 +1901,24 @@ export const recurs = times => while_(forever, ({ * yield* Console.log(`Final sum: ${finalSum}`) * }) * - * // Build a history of execution times + * // Build a history of execution counts * const historySchedule = Schedule.reduce( * Schedule.spaced("1 second").pipe(Schedule.take(4)), * () => [] as Array, // Initial empty array - * (history, executionNumber) => Effect.succeed([...history, Date.now()]) + * (history, executionNumber) => Effect.succeed([...history, executionNumber]) * ) * * const historyProgram = Effect.gen(function*() { * const timeline = yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log("Recording timestamp...") + * yield* Console.log("Recording execution...") * return "recorded" * }), * historySchedule * ) * * yield* Console.log( - * `Execution timeline: ${timeline.length} timestamps recorded` + * `Execution timeline: ${timeline.join(", ")}` * ) * }) * @@ -1883,8 +1979,8 @@ export const recurs = times => while_(forever, ({ * }) * ``` * + * @category folding * @since 2.0.0 - * @category utilities */ export const reduce = /*#__PURE__*/dual(3, (self, initial, combine) => fromStep(effect.map(toStep(self), step => { let state = initial(); @@ -1911,7 +2007,12 @@ export const reduce = /*#__PURE__*/dual(3, (self, initial, combine) => fromStep( * Returns a schedule that recurs continuously, each repetition spaced the * specified duration from the last run. * - * @example + * **When to use** + * + * Use when each delay should start after the previous action completes. + * + * **Example** (Repeating with fixed spacing) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -1920,7 +2021,7 @@ export const reduce = /*#__PURE__*/dual(3, (self, initial, combine) => fromStep( * * // Heartbeat that runs indefinitely with fixed spacing * const heartbeat = Effect.gen(function*() { - * yield* Console.log(`Heartbeat at ${new Date().toISOString()}`) + * yield* Console.log("Heartbeat") * }).pipe( * Effect.repeat(everyTwoSeconds) * ) @@ -1953,19 +2054,64 @@ export const reduce = /*#__PURE__*/dual(3, (self, initial, combine) => fromStep( * }) * ``` * - * @since 2.0.0 + * @see {@link fixed} for recurrence aligned to a regular cadence + * * @category constructors + * @since 2.0.0 */ export const spaced = duration => { const decoded = Duration.fromInputUnsafe(duration); return fromStepWithMetadata(effect.succeed(meta => effect.succeed([meta.attempt - 1, decoded]))); }; +/** + * Returns a new `Schedule` that allows execution of an effectful function for + * every decision of the schedule, but does not alter the inputs and outputs of + * the schedule. + * + * **Details** + * + * The callback receives the full schedule metadata, including the input, output, + * computed delay duration, current attempt, and elapsed timing information. + * + * **Example** (Tapping schedule metadata) + * + * ```ts + * import { Console, Effect, Schedule } from "effect" + * + * const monitoredSchedule = Schedule.exponential("100 millis").pipe( + * Schedule.take(5), + * Schedule.tap((metadata) => + * Console.log( + * `Attempt ${metadata.attempt} produced ${metadata.output} ` + + * `after ${metadata.elapsed}ms; next delay is ${metadata.duration}` + * ) + * ) + * ) + * + * const program = Effect.retry( + * Effect.fail("transient error"), + * monitoredSchedule + * ) + * ``` + * + * @category sequencing + * @since 4.0.0 + */ +export const tap = /*#__PURE__*/dual(2, (self, f) => fromStep(effect.map(toStep(self), step => { + const meta = metadataFn(); + return (now, input) => effect.tap(step(now, input), ([output, duration]) => f({ + ...meta(now, input), + output, + duration + })); +}))); /** * Returns a new `Schedule` that allows execution of an effectful function for * every input to the schedule, but does not alter the inputs and outputs of * the schedule. * - * @example + * **Example** (Tapping retry inputs) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -2001,7 +2147,6 @@ export const spaced = duration => { * Schedule.take(5), * Schedule.tapInput((input: unknown) => * Effect.gen(function*() { - * yield* Console.log(`Processing input at ${new Date().toISOString()}`) * yield* Console.log(`Input type: ${typeof input}`) * // In real applications, might send metrics to monitoring system * }) @@ -2023,10 +2168,13 @@ export const spaced = duration => { * ) * * const validationProgram = Effect.gen(function*() { + * let count = 0 + * * yield* Effect.repeat( * Effect.gen(function*() { + * count++ * yield* Console.log("Task with validation") - * return { data: Math.random(), timestamp: Date.now() } + * return { data: `sample-${count}` } * }), * validatingSchedule * ) @@ -2038,10 +2186,10 @@ export const spaced = duration => { * Schedule.tapInput((error: RetryError) => * Effect.gen(function*() { * if (String(error).includes("critical")) { - * yield* Console.log(`🚨 CRITICAL ERROR: ${String(error)}`) + * yield* Console.log(`Critical error: ${String(error)}`) * // In real applications, might trigger alerts or notifications * } else { - * yield* Console.log(`ℹ️ Regular error: ${String(error)}`) + * yield* Console.log(`Regular error: ${String(error)}`) * } * }) * ) @@ -2075,14 +2223,14 @@ export const spaced = duration => { * ), * Schedule.tapInput((error: RetryError) => * String(error).length > 20 - * ? Console.log("📝 Long error message detected") + * ? Console.log("Long error message detected") * : Effect.void * ) * ) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ export const tapInput = /*#__PURE__*/dual(2, (self, f) => fromStep(effect.map(toStep(self), step => (now, input) => effect.andThen(f(input), step(now, input))))); /** @@ -2090,7 +2238,8 @@ export const tapInput = /*#__PURE__*/dual(2, (self, f) => fromStep(effect.map(to * every output of the schedule, but does not alter the inputs and outputs of * the schedule. * - * @example + * **Example** (Tapping schedule outputs) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * @@ -2138,7 +2287,7 @@ export const tapInput = /*#__PURE__*/dual(2, (self, f) => fromStep(effect.map(to * Effect.gen(function*() { * const delayMs = delay.toString() * if (delayMs.includes("1000")) { // Alert on delays >= 1 second - * yield* Console.log(`🚨 High delay detected: ${delay}`) + * yield* Console.log(`High delay detected: ${delay}`) * } * }) * ) @@ -2148,8 +2297,7 @@ export const tapInput = /*#__PURE__*/dual(2, (self, f) => fromStep(effect.map(to * yield* Effect.repeat( * Effect.gen(function*() { * yield* Console.log("Performing health check...") - * // Simulate health check - * return Math.random() > 0.7 ? "healthy" : "degraded" + * return "healthy" * }), * alertingSchedule * ) @@ -2161,14 +2309,14 @@ export const tapInput = /*#__PURE__*/dual(2, (self, f) => fromStep(effect.map(to * Schedule.tapOutput((count) => Console.log(`Execution ${count + 1}`)), * Schedule.tapOutput((count) => * count % 3 === 0 - * ? Console.log("🎯 Checkpoint reached!") + * ? Console.log("Checkpoint reached") * : Effect.void * ) * ) * ``` * - * @since 2.0.0 * @category sequencing + * @since 2.0.0 */ export const tapOutput = /*#__PURE__*/dual(2, (self, f) => fromStep(effect.map(toStep(self), step => (now, input) => effect.tap(step(now, input), ([output]) => f(output))))); /** @@ -2176,21 +2324,32 @@ export const tapOutput = /*#__PURE__*/dual(2, (self, f) => fromStep(effect.map(t * from the schedule. Once the specified number of outputs is reached, the * schedule will stop. * - * @example + * **When to use** + * + * Use to limit an existing schedule while preserving its output and delay behavior. + * + * **Gotchas** + * + * `take(n)` limits schedule outputs. When used with repeat or retry, the + * effect is evaluated once before the schedule is stepped, so the total number + * of evaluations can be one greater than the number of outputs taken. + * + * **Example** (Taking a limited number of recurrences) + * * ```ts * import { Console, Data, Effect, Schedule } from "effect" * * class RetryAttemptError extends Data.TaggedError("RetryAttemptError")<{ readonly message: string }> {} * - * // Limit an infinite schedule to run only 5 times + * // Limit an infinite schedule to five recurrences * const limitedHeartbeat = Schedule.spaced("1 second").pipe( - * Schedule.take(5) // Will stop after 5 executions + * Schedule.take(5) // Will stop after 5 schedule outputs * ) * * const heartbeatProgram = Effect.gen(function*() { * yield* Effect.repeat( * Effect.gen(function*() { - * yield* Console.log(`Heartbeat at ${new Date().toISOString()}`) + * yield* Console.log("Heartbeat") * return "pulse" * }), * limitedHeartbeat @@ -2230,15 +2389,15 @@ export const tapOutput = /*#__PURE__*/dual(2, (self, f) => fromStep(effect.map(t * * // Combine take with other schedule operations * const samplingSchedule = Schedule.fixed("500 millis").pipe( - * Schedule.take(10), // Sample exactly 10 times + * Schedule.take(10), // Take at most 10 schedule outputs * Schedule.map((count) => Effect.succeed(`Sample #${count + 1}`)) * ) * * const samplingProgram = Effect.gen(function*() { * yield* Effect.repeat( * Effect.gen(function*() { - * const value = Math.random() - * yield* Console.log(`Sampled value: ${value.toFixed(3)}`) + * const value = "sample" + * yield* Console.log(`Sampled value: ${value}`) * return value * }), * samplingSchedule.pipe( @@ -2248,8 +2407,10 @@ export const tapOutput = /*#__PURE__*/dual(2, (self, f) => fromStep(effect.map(t * }) * ``` * - * @since 2.0.0 - * @category utilities + * @see {@link recurs} for creating a count-limited schedule + * + * @category taking + * @since 4.0.0 */ export const take = /*#__PURE__*/dual(2, (self, n) => while_(self, ({ attempt @@ -2258,7 +2419,8 @@ export const take = /*#__PURE__*/dual(2, (self, n) => while_(self, ({ * Creates a schedule that unfolds a state by repeatedly applying a function, * outputting the current state and computing the next state. * - * @example + * **Example** (Unfolding schedule state) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -2306,15 +2468,14 @@ export const take = /*#__PURE__*/dual(2, (self, n) => while_(self, ({ * }) * ) * - * // Random jitter schedule - * const jitteredSchedule = Schedule.unfold( - * 1000, - * (baseDelay) => + * // Deterministic delay adjustment schedule + * const adjustedDelaySchedule = Schedule.unfold( + * { delay: 1000, adjustment: 100 }, + * ({ delay, adjustment }) => * Effect.gen(function*() { - * const jitter = Math.random() * 200 - 100 // ±100ms jitter - * const nextDelay = Math.max(100, baseDelay + jitter) - * yield* Console.log(`Jittered delay: ${nextDelay.toFixed(0)}ms`) - * return nextDelay + * const nextDelay = Math.max(100, delay + adjustment) + * yield* Console.log(`Adjusted delay: ${nextDelay}ms`) + * return { delay: nextDelay, adjustment: adjustment * -1 } * }) * ) * @@ -2347,8 +2508,8 @@ export const take = /*#__PURE__*/dual(2, (self, n) => while_(self, ({ * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const unfold = (initial, next) => fromStep(effect.sync(() => { let state = initial; @@ -2372,30 +2533,43 @@ const while_ = /*#__PURE__*/dual(2, (self, predicate) => fromStep(effect.map(toS }))); export { /** - * Returns a new schedule that passes each input and output of the specified - * schedule to the provided `predicate`. + * Returns a new schedule that continues while the predicate returns `true`. * - * If the `predicate` returns `true`, the schedule will continue, otherwise - * the schedule will stop. + * **When to use** * - * @since 2.0.0 - * @category utilities + * Use to stop an existing schedule based on its full metadata, such as the + * current input, output, attempt, delay, or elapsed time. + * + * **Details** + * + * The predicate receives `Metadata`, may return `boolean` or an + * `Effect`, preserves the output and delay when it returns + * `true`, and stops the schedule when it returns `false`. + * + * @see {@link collectWhile} for collecting outputs while using the same predicate + * @see {@link take} for stopping after a fixed number of schedule outputs + * + * @category filtering + * @since 4.0.0 */ while_ as while }; /** - * A schedule that divides the timeline to `interval`-long windows, and sleeps + * Schedule that divides the timeline to `interval`-long windows, and sleeps * until the nearest window boundary every time it recurs. * + * **Details** + * * For example, `Schedule.windowed("10 seconds")` would produce a schedule as * follows: * - * ``` + * ```text * 10s 10s 10s 10s * |----------|----------|----------|----------| * |action------|sleep---|act|-sleep|action----| * ``` * - * @example + * **Example** (Repeating on aligned windows) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -2405,8 +2579,7 @@ while_ as while }; * const program = Effect.gen(function*() { * yield* Effect.repeat( * Effect.gen(function*() { - * const now = new Date().toISOString() - * yield* Console.log(`Window task executed at: ${now}`) + * yield* Console.log("Window task executed") * return "window-task" * }), * windowSchedule.pipe(Schedule.take(4)) @@ -2414,8 +2587,8 @@ while_ as while }; * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const windowed = interval => { const window = Duration.toMillis(Duration.fromInputUnsafe(interval)); @@ -2424,10 +2597,13 @@ export const windowed = interval => { /** * Returns a new `Schedule` that will recur forever. * + * **Details** + * * The output of the schedule is the current count of its repetitions thus far * (i.e. `0, 1, 2, ...`). * - * @example + * **Example** (Repeating forever) + * * ```ts * import { Console, Effect, Schedule } from "effect" * @@ -2445,8 +2621,8 @@ export const windowed = interval => { * }) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const forever = /*#__PURE__*/spaced(Duration.zero); const constIdentity = /*#__PURE__*/fromStep(/*#__PURE__*/effect.succeed((_now, input) => effect.succeed([input, Duration.zero]))); @@ -2455,75 +2631,120 @@ export { /** * Creates a schedule that always recurs, passing inputs directly as outputs. * + * **When to use** + * + * Use when you need an infinite schedule that preserves input values as + * outputs. + * * **Details** * * This schedule runs indefinitely, returning each input value as its output * without modification. It effectively acts as a pass-through that simply * echoes its input values at each step. * + * @see {@link forever} for an infinite schedule that returns incrementing step counts + * @category constructors * @since 2.0.0 - * @category Constructors */ identity_ as identity }; /** - * Ensures that the provided schedule respects a specified input type. + * Ensures that a schedule's input type extends a given type `T`. + * + * **When to use** + * + * Use when you need a generic helper to prove that an existing schedule can + * consume a required input type without changing runtime behavior. + * + * **Example** (Constraining schedule input types) * - * @example * ```ts * import { Schedule } from "effect" * - * // Ensure schedule accepts string inputs - * const stringSchedule = Schedule.exponential("100 millis").pipe( - * Schedule.satisfiesInputType() - * ) + * declare const StringInputSchedule: Schedule.Schedule + * declare const NumberInputSchedule: Schedule.Schedule * - * // Ensure schedule accepts number inputs - * const numberSchedule = Schedule.spaced("1 second").pipe( - * Schedule.satisfiesInputType() - * ) + * const satisfiesStringInput = Schedule.satisfiesInputType() * - * // Type-level constraint - this would be a compile error: - * // Schedule.recurs(3).pipe(Schedule.satisfiesInputType()) - * // where CustomType doesn't match the schedule's input type + * // This works because the schedule input type is string. + * const validSchedule = satisfiesStringInput(StringInputSchedule) + * + * // This would cause a TypeScript compilation error: + * // const invalidSchedule = satisfiesStringInput(NumberInputSchedule) * ``` * - * @since 2.0.0 - * @category ensuring types + * @see {@link setInputType} for adapting an input-agnostic schedule + * + * @category utility types + * @since 4.0.0 */ export const satisfiesInputType = () => self => self; /** - * Sets the input type of the provided schedule to a specified type, without - * altering the schedule's behavior. + * Sets the input type of the provided schedule without altering its behavior. * - * @since 2.0.0 - * @category ensuring types + * **When to use** + * + * Use to adapt a schedule that does not depend on its input values. + * + * **Details** + * + * This helper is checked at compile time and does not change the schedule's + * runtime behavior. + * + * **Example** (Setting a schedule input type) + * + * ```ts + * import { Schedule } from "effect" + * + * const schedule = Schedule.recurs(3).pipe( + * Schedule.setInputType() + * ) + * ``` + * + * @see {@link satisfiesInputType} for checking an existing input type + * + * @category utility types + * @since 4.0.0 */ export const setInputType = () => self => self; /** - * Ensures that the provided schedule respects a specified output type. + * Ensures that a schedule's output type extends a given type `T`. + * + * **Details** + * + * This helper is checked at compile time and does not change the schedule's + * runtime behavior. + * + * **Example** (Constraining schedule output types) * - * @example * ```ts - * import { Effect, Schedule } from "effect" + * import { Schedule } from "effect" * - * // satisfiesOutputType is a type-level function for compile-time constraints - * // It ensures that a schedule's output type matches the specified type + * declare const StringOutputSchedule: Schedule.Schedule + * declare const NumberOutputSchedule: Schedule.Schedule * - * // Example with string output - * const stringSchedule = Schedule.exponential("100 millis").pipe( - * Schedule.map(() => Effect.succeed("hello")), - * Schedule.satisfiesOutputType() - * ) + * const satisfiesStringOutput = Schedule.satisfiesOutputType() + * + * // This works because the schedule output type is string. + * const validSchedule = satisfiesStringOutput(StringOutputSchedule) + * + * // This would cause a TypeScript compilation error: + * // const invalidSchedule = satisfiesStringOutput(NumberOutputSchedule) * ``` * - * @since 2.0.0 - * @category ensuring types + * @category utility types + * @since 4.0.0 */ export const satisfiesOutputType = () => self => self; /** - * Ensures that the provided schedule respects a specified error type. + * Ensures that a schedule's error type extends a given type `T`. + * + * **Details** + * + * This helper is checked at compile time and does not change the schedule's + * runtime behavior. + * + * **Example** (Constraining schedule error types) * - * @example * ```ts * import { Data, Schedule } from "effect" * @@ -2532,50 +2753,53 @@ export const satisfiesOutputType = () => self => self; * message: string * }> {} * - * // Ensure schedule handles CustomError types - * const errorSchedule = Schedule.exponential("100 millis").pipe( - * Schedule.satisfiesErrorType() - * ) + * declare const CustomErrorSchedule: Schedule.Schedule + * declare const StringErrorSchedule: Schedule.Schedule * - * // Ensure schedule handles never errors (no errors) - * const safeSchedule = Schedule.spaced("1 second").pipe( - * Schedule.satisfiesErrorType() - * ) + * const satisfiesCustomError = Schedule.satisfiesErrorType() + * + * // This works because the schedule error type is CustomError. + * const validSchedule = satisfiesCustomError(CustomErrorSchedule) + * + * // This would cause a TypeScript compilation error: + * // const invalidSchedule = satisfiesCustomError(StringErrorSchedule) * ``` * - * @since 2.0.0 - * @category ensuring types + * @category utility types + * @since 4.0.0 */ export const satisfiesErrorType = () => self => self; /** - * Ensures that the provided schedule respects a specified context type. + * Ensures that a schedule's context type extends a given type `T`. + * + * **Details** + * + * This helper is checked at compile time and does not change the schedule's + * runtime behavior. + * + * **Example** (Constraining schedule service types) * - * @example * ```ts * import { Schedule } from "effect" * - * // Define service interfaces (type-level only) * interface Logger { * readonly log: (message: string) => void * } * - * interface Database { - * readonly query: (sql: string) => Promise - * } + * declare const LoggerSchedule: Schedule.Schedule + * declare const NumberSchedule: Schedule.Schedule * - * // Ensure schedule requires Logger service - * const loggerSchedule = Schedule.spaced("1 second").pipe( - * Schedule.satisfiesServicesType() - * ) + * const satisfiesLogger = Schedule.satisfiesServicesType() * - * // Ensure schedule requires both Logger and Database services - * const multiServiceSchedule = Schedule.exponential("100 millis").pipe( - * Schedule.satisfiesServicesType() - * ) + * // This works because the schedule context type is Logger. + * const validSchedule = satisfiesLogger(LoggerSchedule) + * + * // This would cause a TypeScript compilation error: + * // const invalidSchedule = satisfiesLogger(NumberSchedule) * ``` * - * @since 2.0.0 - * @category ensuring types + * @category utility types + * @since 4.0.0 */ export const satisfiesServicesType = () => self => self; //# sourceMappingURL=Schedule.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Schedule.js.map b/.opencode/node_modules/effect/dist/Schedule.js.map index 8d8a4186edff1aa858760e3e331ce4b85f73eccf..21fa530ab2136cfb2e2246cf3c6a1736afd12825 100644 --- a/.opencode/node_modules/effect/dist/Schedule.js.map +++ b/.opencode/node_modules/effect/dist/Schedule.js.map @@ -1 +1 @@ -{"version":3,"file":"Schedule.js","names":["Cause","Context","Cron","Duration","constant","dual","identity","isEffect","effect","random","pipeArguments","hasProperty","Pull","Result","TypeId","randomNext","Random","useSync","nextDoubleUnsafe","CurrentMetadata","Reference","defaultValue","input","undefined","output","duration","zero","attempt","start","now","elapsed","elapsedSincePrevious","ScheduleProto","_Out","_In","_Env","pipe","arguments","isSchedule","u","fromStep","step","self","Object","create","metadataFn","n","previous","fromStepWithMetadata","map","f","meta","toStep","schedule","catchCause","cause","succeed","failCause","toStepWithMetadata","clockWith","clock","metaFn","suspend","currentTimeMillisUnsafe","flatMap","as","sleep","toStepWithSleep","addDelay","modifyDelay","delay","d","sum","fromInputUnsafe","andThen","other","andThenResult","result","merge","sync","currentSide","currentStep","left","right","fail","recur","catchDone","_","both","bothWith","bothLeft","bothRight","combine","zip","stepLeft","stepRight","matchEffect","onSuccess","leftResult","rightResult","max","rightDone","done","onDone","leftDone","onFailure","collectInputs","collectWhile","passthrough","collectOutputs","predicate","reduce","while_","outputs","push","cron","expression","tz","parsed","isCron","parse","asEffect","next","getTime","millis","delays","durationInput","during","isLessThanOrEqualTo","either","eitherWith","eitherLeft","eitherRight","min","exponential","base","factor","baseMillis","toMillis","Math","pow","fibonacci","one","oneMillis","a","b","fixed","interval","window","lastRun","runningBehind","boundary","handle","jittered","recurs","times","forever","initial","state","nextState","spaced","decoded","tapInput","tapOutput","tap","take","unfold","prev","eff","check","while","windowed","constIdentity","_now","identity_","satisfiesInputType","setInputType","satisfiesOutputType","satisfiesErrorType","satisfiesServicesType"],"sources":["../src/Schedule.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAGzC,SAASC,QAAQ,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AACxD,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,OAAO,KAA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CAAC,CACH,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,MAAMQ,OAAO,gBAAqBI,MAAM,CAAC7J,QAAQ,CAACuB,IAAI,CAAC;AAE9D,MAAMkJ,aAAa,gBAAGpI,QAAQ,cAC5BhC,MAAM,CAACgD,OAAO,CAAC,CAACqH,IAAI,EAAEvJ,KAAc,KAAKd,MAAM,CAACgD,OAAO,CAAC,CAAClC,KAAK,EAAEnB,QAAQ,CAACuB,IAAI,CAAiC,CAAC,CAAC,CACjH;AAED,MAAMoJ,SAAS,GAAGA,CAAA,KAAyBF,aAA+B;AAE1E;AACE;;;;;;;;;;;;AAYAE,SAAS,IAAIxK,QAAQ;AAGvB;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMyK,kBAAkB,GAAGA,CAAA,KAEhCrI,IAAyC,IACDA,IAAI;AAE9C;;;;;;;AAOA,OAAO,MAAMsI,YAAY,GACvBA,CAAA,KAA8BtI,IAAqC,IAAsCA,IAAI;AAE/G;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMuI,mBAAmB,GAAGA,CAAA,KAEjCvI,IAAyC,IACDA,IAAI;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAMwI,kBAAkB,GAAGA,CAAA,KAEhCxI,IAAyC,IACDA,IAAI;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,MAAMyI,qBAAqB,GAAGA,CAAA,KAEnCzI,IAAyC,IACDA,IAAI","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Schedule.js","names":["Cause","Context","Cron","Duration","constant","dual","identity","isEffect","effect","random","pipeArguments","hasProperty","Pull","Result","TypeId","randomNext","Random","useSync","nextDoubleUnsafe","CurrentMetadata","Reference","defaultValue","input","undefined","output","duration","zero","attempt","start","now","elapsed","elapsedSincePrevious","ScheduleProto","_Out","_In","_Env","pipe","arguments","isSchedule","u","fromStep","step","self","Object","create","metadataFn","n","previous","fromStepWithMetadata","map","f","meta","toStep","schedule","catchCause","cause","succeed","failCause","toStepWithMetadata","clockWith","clock","metaFn","suspend","currentTimeMillisUnsafe","flatMap","as","sleep","toStepWithSleep","addDelay","modifyDelay","delay","d","sum","fromInputUnsafe","andThen","other","andThenResult","result","merge","sync","currentSide","currentStep","left","right","fail","recur","catchDone","_","both","bothWith","bothLeft","bothRight","combine","zip","stepLeft","stepRight","matchEffect","onSuccess","leftResult","rightResult","max","rightDone","done","onDone","leftDone","onFailure","collectInputs","collectWhile","passthrough","collectOutputs","predicate","reduce","while_","outputs","push","cron","expression","tz","parsed","isCron","parse","fromResult","next","getTime","millis","delays","durationInput","during","isLessThanOrEqualTo","either","eitherWith","eitherLeft","eitherRight","min","exponential","base","factor","baseMillis","toMillis","Math","pow","fibonacci","one","oneMillis","a","b","fixed","interval","window","lastRun","runningBehind","boundary","handle","jittered","recurs","times","forever","initial","state","nextState","spaced","decoded","tap","tapInput","tapOutput","take","unfold","prev","eff","check","while","windowed","constIdentity","_now","identity_","satisfiesInputType","setInputType","satisfiesOutputType","satisfiesErrorType","satisfiesServicesType"],"sources":["../src/Schedule.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;AAUA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAGzC,SAASC,QAAQ,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AACxD,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAC9C,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAC9C,SAAwBC,aAAa,QAAQ,eAAe;AAC5D,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,M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A,KAA8BtI,IAAqC,IAAsCA,IAAI;AAE/G;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAO,MAAMuI,mBAAmB,GAAGA,CAAA,KAEjCvI,IAAyC,IACDA,IAAI;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,OAAO,MAAMwI,kBAAkB,GAAGA,CAAA,KAEhCxI,IAAyC,IACDA,IAAI;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,MAAMyI,qBAAqB,GAAGA,CAAA,KAEnCzI,IAAyC,IACDA,IAAI","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Scheduler.d.ts b/.opencode/node_modules/effect/dist/Scheduler.d.ts index 66627d01695619b76531133e3541d1c75d9b3df4..adadc517f5e803df617f107b2578f94fbfefd525 100644 --- a/.opencode/node_modules/effect/dist/Scheduler.d.ts +++ b/.opencode/node_modules/effect/dist/Scheduler.d.ts @@ -1,20 +1,32 @@ /** + * Controls how runnable Effect fiber tasks are dispatched. + * + * A scheduler decides how tasks are queued, when queued tasks run, and when a + * fiber should pause so other work can continue. This module includes the + * scheduler service reference, the default `MixedScheduler`, dispatcher types + * for queued tasks, and references for tuning or disabling automatic scheduler + * yields. + * * @since 2.0.0 */ import * as Context from "./Context.ts"; import type * as Fiber from "./Fiber.ts"; /** - * A scheduler manages the execution of Effects by controlling when and how tasks - * are scheduled and executed. It determines the execution mode (synchronous or - * asynchronous) and handles task prioritization and yielding behavior. + * A scheduler manages the execution of Effect fibers by controlling when queued + * tasks run. * - * The scheduler is responsible for: - * - Scheduling tasks with different priorities - * - Determining when fibers should yield control - * - Managing the execution flow of Effects + * **When to use** + * + * Use to define or provide custom runtime scheduling behavior for Effect fibers. + * + * **Details** + * + * A scheduler determines the execution mode, schedules tasks with different + * priorities, and decides when fibers should yield control after consuming + * their operation budget. * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface Scheduler { readonly executionMode: "sync" | "async"; @@ -22,42 +34,88 @@ export interface Scheduler { makeDispatcher(): SchedulerDispatcher; } /** - * @since 4.0.0 + * A dispatcher created by a `Scheduler` for enqueuing tasks and forcing queued + * tasks to run. + * + * **When to use** + * + * Use when implementing or testing scheduler-created dispatchers that enqueue + * prioritized runtime tasks and flush queued work deterministically. + * + * **Details** + * + * `scheduleTask` queues a task with a priority. `flush` drains pending work + * synchronously, which is useful when callers need deterministic completion of + * already scheduled tasks. Lower priority numbers run first, and equal + * priorities run in FIFO order. + * * @category models + * @since 4.0.0 */ export interface SchedulerDispatcher { scheduleTask(task: () => void, priority: number): void; flush(): void; } /** - * @since 4.0.0 + * Context reference for the scheduler used by the Effect runtime. + * + * **When to use** + * + * Use when you need to replace scheduling behavior globally in tests or runtime + * setup, such as forcing deterministic task dispatch. + * + * **Details** + * + * The default value creates a `MixedScheduler`. Provide this service to + * customize execution mode, task dispatching, or yield behavior. + * * @category references + * @since 2.0.0 */ export declare const Scheduler: Context.Reference; /** - * A scheduler implementation that provides efficient task scheduling - * with support for both synchronous and asynchronous execution modes. + * Provides a scheduler implementation that batches queued tasks and dispatches them by + * priority. * - * Features: - * - Batches tasks for efficient execution - * - Supports priority-based task scheduling - * - Configurable execution mode (sync/async) - * - Automatic yielding based on operation count - * - Optimized for high-throughput scenarios + * **When to use** + * + * Use when you need the default runtime scheduler directly, including a + * scheduler that batches queued work by priority and preserves FIFO order within + * each priority. + * + * **Details** + * + * `MixedScheduler` supports synchronous and asynchronous execution modes, uses + * operation counts to decide when fibers should yield, and is the default + * scheduler implementation. * - * @since 2.0.0 * @category schedulers + * @since 2.0.0 */ export declare class MixedScheduler implements Scheduler { readonly executionMode: "sync" | "async"; readonly setImmediate: (f: () => void) => () => void; constructor(executionMode?: "sync" | "async", setImmediateFn?: (f: () => void) => () => void); /** + * Returns whether the fiber has reached its operation budget and should yield. + * + * **When to use** + * + * Use to decide whether a fiber should yield after consuming its current + * operation budget. + * * @since 2.0.0 */ shouldYield(fiber: Fiber.Fiber): boolean; /** - * @since 2.0.0 + * Creates a dispatcher that schedules work through this scheduler. + * + * **When to use** + * + * Use when you need a standalone dispatcher from a scheduler instance, for + * example in tests that enqueue tasks and then flush them deterministically. + * + * @since 4.0.0 */ makeDispatcher(): MixedSchedulerDispatcher; } @@ -84,24 +142,46 @@ declare class MixedSchedulerDispatcher implements SchedulerDispatcher { flush(): void; } /** - * A service reference that controls the maximum number of operations a fiber - * can perform before yielding control back to the scheduler. This helps - * prevent long-running fibers from monopolizing the execution thread. + * Context reference that controls the maximum number of operations a fiber + * can perform before yielding control back to the scheduler. * - * The default value is 2048 operations, which provides a good balance between - * performance and fairness in concurrent execution. + * **When to use** + * + * Use to tune scheduler fairness for CPU-bound fibers by changing the scheduler + * operation budget that triggers a yield. + * + * **Details** + * + * The default value is `2048` operations, which balances performance and + * fairness by helping prevent long-running fibers from monopolizing the + * execution thread. + * + * @see {@link PreventSchedulerYield} for bypassing scheduler yield checks entirely rather than tuning the operation budget * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export declare const MaxOpsBeforeYield: Context.Reference; /** - * A service reference that controls whether the runtime should bypass scheduler + * Context reference that controls whether the runtime should bypass scheduler * yield checks. When set to `true`, the fiber run loop won't call * `Scheduler.shouldYield`. * - * @since 4.0.0 + * **When to use** + * + * Use to bypass scheduler yield checks for controlled runtime workloads where + * cooperative yielding should be disabled. + * + * **Gotchas** + * + * Setting this reference to `true` can let long-running fibers monopolize the + * JavaScript thread. + * + * @see {@link MaxOpsBeforeYield} for tuning yield frequency without disabling yield checks + * @see {@link Scheduler} for providing custom scheduler yield behavior + * * @category references + * @since 4.0.0 */ export declare const PreventSchedulerYield: Context.Reference; export {}; diff --git a/.opencode/node_modules/effect/dist/Scheduler.d.ts.map b/.opencode/node_modules/effect/dist/Scheduler.d.ts.map index 16d61e33b18f0c5982cddf036006ba7ba92f03f2..18456a7140b311ad04693850325d2669d82e0465 100644 --- a/.opencode/node_modules/effect/dist/Scheduler.d.ts.map +++ b/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AAQ,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAA;IACxC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAA;gBAGlD,aAAa,GAAE,MAAM,GAAG,OAAiB,EACzC,cAAc,GAAE,CAAC,CAAC,EAAE,MAAM,IAAI,KAAK,MAAM,IAAmB;IAM9D;;;;;;;;;OASG;IACH,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC;IAIhD;;;;;;;;;OASG;IACH,cAAc;CAGf;AAED,cAAM,wBAAyB,YAAW,mBAAmB;IAC3D,OAAO,CAAC,KAAK,CAAwB;IACrC,OAAO,CAAC,OAAO,CAAsC;IACrD,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAA;gBAGlD,cAAc,GAAE,CAAC,CAAC,EAAE,MAAM,IAAI,KAAK,MAAM,IAAmB;IAK9D;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,QAAQ,EAAE,MAAM;IAO/C;;OAEG;IACH,cAAc,aAGb;IAED;;OAEG;IACH,QAAQ;IAUR;;OAEG;IACH,KAAK;CASN;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,iBAAiB,2BAE5B,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,qBAAqB,4BAEhC,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Scheduler.js b/.opencode/node_modules/effect/dist/Scheduler.js index cb4599edcd06bbe68af2f9f22861c99406138f33..cab3d9027ab080e8c1d26ae7dced06d22d71baf7 100644 --- a/.opencode/node_modules/effect/dist/Scheduler.js +++ b/.opencode/node_modules/effect/dist/Scheduler.js @@ -1,10 +1,30 @@ /** + * Controls how runnable Effect fiber tasks are dispatched. + * + * A scheduler decides how tasks are queued, when queued tasks run, and when a + * fiber should pause so other work can continue. This module includes the + * scheduler service reference, the default `MixedScheduler`, dispatcher types + * for queued tasks, and references for tuning or disabling automatic scheduler + * yields. + * * @since 2.0.0 */ import * as Context from "./Context.js"; /** - * @since 4.0.0 + * Context reference for the scheduler used by the Effect runtime. + * + * **When to use** + * + * Use when you need to replace scheduling behavior globally in tests or runtime + * setup, such as forcing deterministic task dispatch. + * + * **Details** + * + * The default value creates a `MixedScheduler`. Provide this service to + * customize execution mode, task dispatching, or yield behavior. + * * @category references + * @since 2.0.0 */ export const Scheduler = /*#__PURE__*/Context.Reference("effect/Scheduler", { defaultValue: () => new MixedScheduler() @@ -44,18 +64,23 @@ class PriorityBuckets { } } /** - * A scheduler implementation that provides efficient task scheduling - * with support for both synchronous and asynchronous execution modes. + * Provides a scheduler implementation that batches queued tasks and dispatches them by + * priority. * - * Features: - * - Batches tasks for efficient execution - * - Supports priority-based task scheduling - * - Configurable execution mode (sync/async) - * - Automatic yielding based on operation count - * - Optimized for high-throughput scenarios + * **When to use** + * + * Use when you need the default runtime scheduler directly, including a + * scheduler that batches queued work by priority and preserves FIFO order within + * each priority. + * + * **Details** + * + * `MixedScheduler` supports synchronous and asynchronous execution modes, uses + * operation counts to decide when fibers should yield, and is the default + * scheduler implementation. * - * @since 2.0.0 * @category schedulers + * @since 2.0.0 */ export class MixedScheduler { executionMode; @@ -65,13 +90,27 @@ export class MixedScheduler { this.setImmediate = setImmediateFn; } /** + * Returns whether the fiber has reached its operation budget and should yield. + * + * **When to use** + * + * Use to decide whether a fiber should yield after consuming its current + * operation budget. + * * @since 2.0.0 */ shouldYield(fiber) { return fiber.currentOpCount >= fiber.maxOpsBeforeYield; } /** - * @since 2.0.0 + * Creates a dispatcher that schedules work through this scheduler. + * + * **When to use** + * + * Use when you need a standalone dispatcher from a scheduler instance, for + * example in tests that enqueue tasks and then flush them deterministically. + * + * @since 4.0.0 */ makeDispatcher() { return new MixedSchedulerDispatcher(this.setImmediate); @@ -126,26 +165,48 @@ class MixedSchedulerDispatcher { } } /** - * A service reference that controls the maximum number of operations a fiber - * can perform before yielding control back to the scheduler. This helps - * prevent long-running fibers from monopolizing the execution thread. + * Context reference that controls the maximum number of operations a fiber + * can perform before yielding control back to the scheduler. * - * The default value is 2048 operations, which provides a good balance between - * performance and fairness in concurrent execution. + * **When to use** + * + * Use to tune scheduler fairness for CPU-bound fibers by changing the scheduler + * operation budget that triggers a yield. + * + * **Details** + * + * The default value is `2048` operations, which balances performance and + * fairness by helping prevent long-running fibers from monopolizing the + * execution thread. + * + * @see {@link PreventSchedulerYield} for bypassing scheduler yield checks entirely rather than tuning the operation budget * - * @since 4.0.0 * @category references + * @since 4.0.0 */ export const MaxOpsBeforeYield = /*#__PURE__*/Context.Reference("effect/Scheduler/MaxOpsBeforeYield", { defaultValue: () => 2048 }); /** - * A service reference that controls whether the runtime should bypass scheduler + * Context reference that controls whether the runtime should bypass scheduler * yield checks. When set to `true`, the fiber run loop won't call * `Scheduler.shouldYield`. * - * @since 4.0.0 + * **When to use** + * + * Use to bypass scheduler yield checks for controlled runtime workloads where + * cooperative yielding should be disabled. + * + * **Gotchas** + * + * Setting this reference to `true` can let long-running fibers monopolize the + * JavaScript thread. + * + * @see {@link MaxOpsBeforeYield} for tuning yield frequency without disabling yield checks + * @see {@link Scheduler} for providing custom scheduler yield behavior + * * @category references + * @since 4.0.0 */ export const PreventSchedulerYield = /*#__PURE__*/Context.Reference("effect/Scheduler/PreventSchedulerYield", { defaultValue: () => false diff --git a/.opencode/node_modules/effect/dist/Scheduler.js.map b/.opencode/node_modules/effect/dist/Scheduler.js.map index 9da66cc92a98f5fa6540c69427462ddd6f489c96..feaacc1cff246bad3e01e0bc54b6f6f613f11756 100644 --- a/.opencode/node_modules/effect/dist/Scheduler.js.map +++ b/.opencode/node_modules/effect/dist/Scheduler.js.map @@ -1 +1 @@ -{"version":3,"file":"Scheduler.js","names":["Context","Scheduler","Reference","defaultValue","MixedScheduler","setImmediate","globalThis","f","timer","clearImmediate","setTimeout","clearTimeout","PriorityBuckets","buckets","scheduleTask","task","priority","len","length","bucket","index","push","splice","drain","executionMode","constructor","setImmediateFn","shouldYield","fiber","currentOpCount","maxOpsBeforeYield","makeDispatcher","MixedSchedulerDispatcher","tasks","running","undefined","afterScheduled","runTasks","i","toRun","j","flush","MaxOpsBeforeYield","PreventSchedulerYield"],"sources":["../src/Scheduler.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,OAAO,MAAM,cAAc;AA+BvC;;;;AAIA,OAAO,MAAMC,SAAS,gBAAiCD,OAAO,CAACE,SAAS,CAAY,kBAAkB,EAAE;EACtGC,YAAY,EAAEA,CAAA,KAAM,IAAIC,cAAc;CACvC,CAAC;AAEF,MAAMC,YAAY,GAAG,cAAc,IAAIC,UAAU,GAC5CC,CAAa,IAAI;EAClB;EACA,MAAMC,KAAK,GAAGF,UAAU,CAACD,YAAY,CAACE,CAAC,CAAC;EACxC;EACA,OAAO,MAAYD,UAAU,CAACG,cAAc,CAACD,KAAK,CAAC;AACrD,CAAC,GACED,CAAa,IAAI;EAClB,MAAMC,KAAK,GAAGE,UAAU,CAACH,CAAC,EAAE,CAAC,CAAC;EAC9B,OAAO,MAAYI,YAAY,CAACH,KAAK,CAAC;AACxC,CAAC;AAEH,MAAMI,eAAe;EACnBC,OAAO,GAAwD,EAAE;EAEjEC,YAAYA,CAACC,IAAgB,EAAEC,QAAgB;IAC7C,MAAMH,OAAO,GAAG,IAAI,CAACA,OAAO;IAC5B,MAAMI,GAAG,GAAGJ,OAAO,CAACK,MAAM;IAC1B,IAAIC,MAA+C;IACnD,IAAIC,KAAK,GAAG,CAAC;IACb,OAAOA,KAAK,GAAGH,GAAG,EAAEG,KAAK,EAAE,EAAE;MAC3B,IAAIP,OAAO,CAACO,KAAK,CAAC,CAAC,CAAC,CAAC,GAAGJ,QAAQ,EAAE;MAClCG,MAAM,GAAGN,OAAO,CAACO,KAAK,CAAC;IACzB;IACA,IAAID,MAA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M;CACrB,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Scheduler.js","names":["Context","Scheduler","Reference","defaultValue","MixedScheduler","setImmediate","globalThis","f","timer","clearImmediate","setTimeout","clearTimeout","PriorityBuckets","buckets","scheduleTask","task","priority","len","length","bucket","index","push","splice","drain","executionMode","constructor","setImmediateFn","shouldYield","fiber","currentOpCount","maxOpsBeforeYield","makeDispatcher","MixedSchedulerDispatcher","tasks","running","undefined","afterScheduled","runTasks","i","toRun","j","flush","MaxOpsBeforeYield","PreventSchedulerYield"],"sources":["../src/Scheduler.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAWA,OAAO,KAAKA,OAAO,MAAM,cAAc;AAkDvC;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,SAAS,gBAAiCD,OAAO,CAACE,SAAS,CAAY,kBAAkB,EAAE;EACtGC,YAAY,EAAEA,CAAA,KAAM,IAAIC,cAAc;CACvC,CAAC;AAEF,MAAMC,YAAY,GAAG,cAAc,IAAIC,UAAU,GAC5CC,CAAa,IAAI;EAClB;EACA,MAAMC,KAAK,GAAGF,UAAU,CAACD,YAAY,CAACE,CAAC,CAAC;EACxC;EACA,OAAO,MAAYD,UAAU,CAACG,cAAc,CAACD,KAAK,CAAC;AACrD,CAAC,GACED,CAAa,IAAI;EAClB,MAAMC,KAAK,GAAGE,UAAU,CAACH,CAAC,EAAE,CAAC,CAAC;EAC9B,OAAO,MAAYI,YAAY,CAACH,KAAK,CAAC;AACxC,CAAC;AAEH,MAAMI,eAAe;EACnBC,OAAO,GAAwD,EAAE;EAEjEC,YAAYA,CAACC,IAAgB,EAAEC,QAAgB;IAC7C,MAAMH,OAAO,GAAG,IAAI,CAACA,OAAO;IAC5B,MAAMI,GAAG,GAAGJ,OAAO,CAACK,MAAM;IAC1B,IAAIC,MAA+C;IACnD,IAAIC,KAAK,GAAG,CAAC;IACb,OAAOA,KAAK,GAAGH,GAAG,EAAEG,KAAK,EAAE,EAAE;MAC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C,EAAE;EAC/FC,YAAY,EAAEA,CAAA,KAAM;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAMwC,qBAAqB,gBAAG3C,OAAO,CAACE,SAAS,CAAU,wCAAwC,EAAE;EACxGC,YAAY,EAAEA,CAAA,KAAM;CACrB,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Schema.d.ts b/.opencode/node_modules/effect/dist/Schema.d.ts index d40746c509b710e4ed88b51755be161341a459a1..0e2aff4bd2328654852cd6e2cf6212b231399514 100644 --- a/.opencode/node_modules/effect/dist/Schema.d.ts +++ b/.opencode/node_modules/effect/dist/Schema.d.ts @@ -1,85 +1,13 @@ /** - * Define data shapes, validate unknown input, and transform values between formats. - * - * ## Mental model - * - * - **Schema** — a description of a data shape. Every schema carries a decoded - * *Type* (the value you work with) and an *Encoded* representation (the - * serialized form, e.g. JSON). - * - **Decoding** — turning unknown external data (API responses, form - * submissions, config files) into typed, validated values. - * - **Encoding** — turning typed values back into a serializable format. - * - **Codec** — a schema that tracks both Type and Encoded, so it can decode - * *and* encode. Most concrete schemas are Codecs. - * - **Check / Filter** — a constraint attached to a schema (e.g. `isMinLength`, - * `isGreaterThan`). Attach them with `.check(...)`. - * - **Transformation** — a pair of functions (decode + encode) that convert - * values between two schemas. Created with {@link decodeTo} / {@link encodeTo}. - * - **Annotation** — metadata attached to a schema (title, description, custom - * keys). Attach with `.annotate(...)`. - * - * ## Common tasks - * - * - Define a struct: {@link Struct} - * - Define a union: {@link Union}, {@link TaggedUnion}, {@link Literals} - * - Define an array: {@link ArraySchema}, {@link NonEmptyArray} - * - Define a record: {@link Record} - * - Define a tuple: {@link Tuple}, {@link TupleWithRest} - * - Validate unknown data synchronously: {@link decodeUnknownSync} - * - Validate unknown data (Effect): {@link decodeUnknownEffect} - * - Encode a value: {@link encodeUnknownSync}, {@link encodeUnknownEffect} - * - Type guard: {@link is} - * - Assertion: {@link asserts} - * - Add constraints: `.check(...)` with filters like {@link isMinLength}, - * {@link isGreaterThan}, {@link isPattern}, {@link isUUID} - * - Transform between schemas: {@link decodeTo}, {@link encodeTo} - * - Add a default for missing keys: {@link withDecodingDefault}, {@link withDecodingDefaultKey} - * - Create branded types: {@link brand} - * - Define classes with validation: {@link Class}, {@link TaggedClass} - * - Define error classes: {@link ErrorClass}, {@link TaggedErrorClass} - * - Generate JSON Schema: {@link toJsonSchemaDocument} - * - Generate test data: {@link toArbitrary} - * - Derive equivalence: {@link toEquivalence} - * - * ## Gotchas - * - * - `Schema.optional` creates `T | undefined` (key can be missing *or* - * `undefined`). Use `Schema.optionalKey` for exact optional properties. - * - `decodeTo` is curried: use `from.pipe(Schema.decodeTo(to, ...))`. - * - `decodeUnknownSync` throws on failure. Use `decodeUnknownExit` or - * `decodeUnknownOption` for non-throwing alternatives. - * - Filters do not change the TypeScript type. Use {@link refine} or - * {@link brand} to narrow the type. - * - Recursive schemas require {@link suspend} to avoid infinite loops. - * - * ## Quickstart - * - * **Example** (Validate a user object) + * Describes data shapes and how unknown input becomes trusted values. * - * ```ts - * import { Schema } from "effect" - * - * const User = Schema.Struct({ - * name: Schema.String.check(Schema.isMinLength(1)), - * age: Schema.Number.check(Schema.isGreaterThanOrEqualTo(0)), - * email: Schema.optionalKey(Schema.String) - * }) - * - * // Decode unknown input — throws on failure - * const user = Schema.decodeUnknownSync(User)({ - * name: "Alice", - * age: 30 - * }) - * - * console.log(user) - * // { name: "Alice", age: 30 } - * ``` - * - * @see {@link Schema} — type-level view tracking only the decoded Type - * @see {@link Codec} — type-level view tracking both Type and Encoded - * @see {@link Struct} — define object shapes - * @see {@link decodeUnknownSync} — synchronous validation - * @see {@link decodeTo} — schema transformations + * A schema can validate input, decode it into an application type, and encode + * that value back to another representation. This module contains the main + * schema, codec, decoder, and encoder APIs, together with schemas for common + * JavaScript values and Effect data types. It also supports refinements, + * transformations, defaults, classes, JSON Schema generation, test data + * generation, formatting, equivalence, optics, and differs derived from schema + * definitions. * * @since 4.0.0 */ @@ -108,10 +36,10 @@ import * as Order from "./Order.ts"; import * as Pipeable from "./Pipeable.ts"; import * as Redacted_ from "./Redacted.ts"; import * as Result_ from "./Result.ts"; -import * as AST from "./SchemaAST.ts"; -import * as Getter from "./SchemaGetter.ts"; -import * as Issue from "./SchemaIssue.ts"; -import * as Parser from "./SchemaParser.ts"; +import * as SchemaAST from "./SchemaAST.ts"; +import * as SchemaGetter from "./SchemaGetter.ts"; +import * as SchemaIssue from "./SchemaIssue.ts"; +import * as SchemaParser from "./SchemaParser.ts"; import type * as SchemaRepresentation from "./SchemaRepresentation.ts"; import type { Assign, Lambda, Mutable, Simplify } from "./Struct.ts"; import * as Struct_ from "./Struct.ts"; @@ -125,6 +53,7 @@ declare const TypeId = "~effect/Schema/Schema"; * @see {@link optionalKey} — mark a struct field as optional * @see {@link optional} — mark a struct field as optional with `| undefined` * + * @category models * @since 4.0.0 */ export type Optionality = "required" | "optional"; @@ -133,6 +62,7 @@ export type Optionality = "required" | "optional"; * * @see {@link mutableKey} — mark a struct field as mutable * + * @category models * @since 4.0.0 */ export type Mutability = "readonly" | "mutable"; @@ -142,26 +72,29 @@ export type Mutability = "readonly" | "mutable"; * @see {@link withConstructorDefault} — add a default to a schema field * @see {@link tag} — creates a literal field with a constructor default * + * @category models * @since 4.0.0 */ export type ConstructorDefault = "no-default" | "with-default"; /** * Options for `makeEffect`, `make`, and Class constructors. * - * When to use: - * - Pass `disableChecks: true` to skip validation when you trust the data. + * **When to use** + * + * Use when passing `disableChecks: true` to skip validation when you trust the data. * - Pass `parseOptions` to control error reporting behavior. * * @see {@link Bottom.makeEffect} * @see {@link Bottom.make} * - * @since 4.0.0 + * @category options + * @since 3.13.4 */ export interface MakeOptions { /** * The parse options to use for the schema. */ - readonly parseOptions?: AST.ParseOptions | undefined; + readonly parseOptions?: SchemaAST.ParseOptions | undefined; /** * Whether to disable validation for the schema. */ @@ -172,8 +105,9 @@ export interface MakeOptions { * parameters controlling type inference, mutability, optionality, services, * and transformation behavior. * - * When to use: - * - You are writing advanced generic schema utilities or performing schema + * **When to use** + * + * Use when you are writing advanced generic schema utilities or performing schema * introspection. * - In user code, prefer {@link Schema}, {@link Codec}, {@link Decoder}, or * {@link Encoder} instead. @@ -182,9 +116,10 @@ export interface MakeOptions { * @see {@link Schema} — tracks only the decoded Type * @see {@link Codec} — tracks Type + Encoded * + * @category models * @since 4.0.0 */ -export interface Bottom = readonly [], out TypeMake = TypeMakeIn, out TypeMutability extends Mutability = "readonly", out TypeOptionality extends Optionality = "required", out TypeConstructorDefault extends ConstructorDefault = "no-default", out EncodedMutability extends Mutability = "readonly", out EncodedOptionality extends Optionality = "required"> extends Pipeable.Pipeable { +export interface Bottom = readonly [], out TypeMake = TypeMakeIn, out TypeMutability extends Mutability = "readonly", out TypeOptionality extends Optionality = "required", out TypeConstructorDefault extends ConstructorDefault = "no-default", out EncodedMutability extends Mutability = "readonly", out EncodedOptionality extends Optionality = "required"> extends Pipeable.Pipeable { readonly [TypeId]: typeof TypeId; readonly "ast": Ast; readonly "Rebuild": Rebuild; @@ -203,30 +138,82 @@ export interface Bottom): this["Rebuild"]; annotateKey(annotations: Annotations.Key): this["Rebuild"]; - check(...checks: readonly [AST.Check, ...Array>]): this["Rebuild"]; + check(...checks: readonly [SchemaAST.Check, ...Array>]): this["Rebuild"]; rebuild(ast: this["ast"]): this["Rebuild"]; /** - * @throws {Error} The issue is contained in the error cause. + * Constructs a value from the make input representation synchronously. + * + * **When to use** + * + * Use when constructor input is trusted or when validation failure + * should abort with a thrown `Error`. + * + * **Details** + * + * Applies constructor defaults and type-side validation according to + * `MakeOptions`. + * + * **Gotchas** + * + * Throws an `Error` with the schema issue in its `cause` when validation + * fails. + * + * @see {@link Bottom.makeOption} — construct synchronously and discard validation details + * @see {@link Bottom.makeEffect} — construct through `Effect` when validation failure should stay in the error channel */ make(input: this["~type.make.in"], options?: MakeOptions): this["Type"]; + /** + * Constructs a value from the make input representation, returning `Option.none` + * when validation fails. + * + * **When to use** + * + * Use when you only need to know whether construction succeeds + * and do not need validation details. + * + * **Details** + * + * Applies constructor defaults and type-side validation according to + * `MakeOptions`. + * + * @see {@link Bottom.make} — construct synchronously when validation failure should throw + * @see {@link Bottom.makeEffect} — construct through `Effect` when validation details should stay in the error channel + */ makeOption(input: this["~type.make.in"], options?: MakeOptions): Option_.Option; + /** + * Constructs a value from the make input representation, returning validation + * failures in the `Effect` error channel. + * + * **When to use** + * + * Use when constructor input may fail validation and you want to + * compose that failure with other `Effect` operations instead of throwing. + * + * @see {@link Bottom.make} — construct synchronously when validation failure should throw + * @see {@link Bottom.makeOption} — construct synchronously and discard validation details + */ makeEffect(input: this["~type.make.in"], options?: MakeOptions): Effect.Effect; } /** - * The schema type returned by {@link declareConstructor}, tracking the decoded - * type `T`, the encoded type `E`, and the list of type-parameter schemas - * `TypeParameters`. + * Type-level representation returned by {@link declareConstructor}. * - * @category Constructors + * @category constructors * @since 4.0.0 */ -export interface declareConstructor, Iso = T> extends Bottom, T, Iso, TypeParameters> { +export interface declareConstructor, Iso = T> extends Bottom, T, Iso, TypeParameters> { } /** * Creates a schema for a **parametric** type (a generic container such as * `Array`, `Option`, etc.) by accepting a list of type-parameter schemas * and a decoder factory. * + * **When to use** + * + * Use when you are defining a schema for a generic container whose validation + * depends on one or more type-parameter schemas. + * + * **Details** + * * The outer call `declareConstructor()` fixes the decoded type `T`, * the encoded type `E`, and the optional iso type. The inner call receives: * - `typeParameters` — the concrete schemas for each type variable @@ -239,10 +226,7 @@ export interface declareConstructor` type) * * ```ts - * import { Effect, Schema } from "effect" - * import * as SchemaParser from "effect/SchemaParser" - * import * as Issue from "effect/SchemaIssue" - * import * as Option from "effect/Option" + * import { Effect, Option, Schema, SchemaIssue as Issue, SchemaParser } from "effect" * * interface Box { * readonly value: A @@ -257,7 +241,7 @@ export interface declareConstructor * (u, ast, options) => { * if (!isBox(u)) { - * return Effect.fail(new Issue.InvalidType(ast, Option.some(u))) + * return Effect.fail(new SchemaIssue.InvalidType(ast, Option.some(u))) * } * return Effect.map( * SchemaParser.decodeUnknownEffect(itemCodec)(u.value, options), @@ -269,16 +253,15 @@ export interface declareConstructor(): >(typeParameters: TypeParameters, run: (typeParameters: { readonly [K in keyof TypeParameters]: Codec; }) => (u: unknown, self: AST.Declaration, options: AST.ParseOptions) => Effect.Effect, annotations?: Annotations.Declaration) => declareConstructor; +export declare function declareConstructor(): >(typeParameters: TypeParameters, run: (typeParameters: { readonly [K in keyof TypeParameters]: Codec; }) => (u: unknown, self: SchemaAST.Declaration, options: SchemaAST.ParseOptions) => Effect.Effect, annotations?: Annotations.Declaration) => declareConstructor; /** - * The schema type returned by {@link declare}, representing a non-parametric - * opaque type `T` with no type parameters. + * Type-level representation returned by {@link declare}. * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 3.13.3 */ export interface declare extends declareConstructor { readonly "Rebuild": declare; @@ -288,8 +271,10 @@ export interface declare extends declareConstructor` or `Array`, use {@link declareConstructor} instead. + * **When to use** + * + * Use when you are defining a schema for an opaque type with no type parameters + * and validation can be expressed as a type guard. * * **Example** (Schema for a custom `UserId` branded type) * @@ -309,14 +294,16 @@ export interface declare extends declareConstructor(is: (u: unknown) => u is T, annotations?: Annotations.Declaration | undefined): declare; /** - * Widens a schema's type to the fully-parameterized {@link Bottom} interface, + * Returns a schema widened to the fully-parameterized {@link Bottom} interface, * making all 14 type parameters visible to TypeScript. * + * **Details** + * * Normally, concrete schema interfaces (e.g. `Schema`) hide most type * parameters. `revealBottom` is useful when writing generic utilities that need * to inspect or propagate the complete set of type parameters. @@ -337,6 +324,7 @@ export declare function declare(is: (u: unknown) => u is T, annotati * type E = typeof bottom["Encoded"] // string * ``` * + * @category utility types * @since 4.0.0 */ export declare function revealBottom(bottom: S): Bottom; @@ -344,6 +332,8 @@ export declare function revealBottom(bottom: S): Bottom(bottom: S): Bottom(annotations: Annotations.Bottom): (self: S) => S["Rebuild"]; @@ -372,6 +362,8 @@ export declare function annotate(annotations: Annotations.Bottom< * changing its runtime behavior. This is the encoded-side counterpart of * `annotate`, which targets the decoded (Type) side. * + * **Details** + * * Internally the schema is flipped so that `Encoded` becomes `Type`, * annotated, and then flipped back. * @@ -392,7 +384,7 @@ export declare function annotate(annotations: Annotations.Bottom< * * @see {@link annotate} to annotate the type side instead. * - * @category Annotations + * @category annotations * @since 4.0.0 */ export declare function annotateEncoded(annotations: Annotations.Bottom): (self: S) => S["Rebuild"]; @@ -400,6 +392,8 @@ export declare function annotateEncoded(annotations: Annotations. * Adds key-level annotations to a schema field. This is the pipeable * (curried) counterpart of the `.annotateKey` method. * + * **Details** + * * Key annotations apply to a field's position inside a `Struct` or `Tuple` * rather than to the field's value type. They can carry a * `messageMissingKey` to customise the error shown when the field is absent, @@ -421,13 +415,15 @@ export declare function annotateEncoded(annotations: Annotations. * }) * ``` * - * @category Annotations + * @category annotations * @since 4.0.0 */ export declare function annotateKey(annotations: Annotations.Key): (self: S) => S["Rebuild"]; /** * The existential "any schema" type — all type parameters are erased to `unknown`. * + * **Details** + * * Use `Top` as a constraint when writing generic utilities that must accept *any* * schema regardless of its `Type`, `Encoded`, or service requirements. It is the * widest possible schema type and therefore gives you the least static information. @@ -438,15 +434,16 @@ export declare function annotateKey(annotations: Annotations.Key< * - {@link Decoder}`` — for decode-only APIs * - {@link Encoder}`` — for encode-only APIs * + * @category models * @since 4.0.0 */ -export interface Top extends Bottom { } /** * Namespace of type-level helpers for {@link Schema}. * - * @since 4.0.0 + * @since 3.10.0 */ export declare namespace Schema { /** @@ -462,13 +459,16 @@ export declare namespace Schema { * // { readonly name: string; readonly age: number } * ``` * - * @since 4.0.0 + * @category utility types + * @since 3.10.0 */ type Type = S extends Top ? S["Type"] : never; } /** * A typed view of a schema that tracks only the decoded (output) type `T`. * + * **Details** + * * Use `Schema` as a constraint when you want to accept "any schema that * decodes to `T`" and do not need to know or constrain the encoded * representation, required services, or any other type parameters. @@ -491,7 +491,8 @@ export declare namespace Schema { * @see {@link Codec} — also tracks Encoded, DecodingServices, EncodingServices * @see {@link Schema.Type} — extract the decoded type at the type level * - * @since 4.0.0 + * @category models + * @since 3.10.0 */ export interface Schema extends Top { readonly "Type": T; @@ -516,7 +517,8 @@ export declare namespace Codec { * // string * ``` * - * @since 4.0.0 + * @category utility types + * @since 3.10.0 */ type Encoded = S extends Top ? S["Encoded"] : never; /** @@ -532,6 +534,7 @@ export declare namespace Codec { * // never * ``` * + * @category utility types * @since 4.0.0 */ type DecodingServices = S extends Top ? S["DecodingServices"] : never; @@ -548,23 +551,16 @@ export declare namespace Codec { * // never * ``` * + * @category utility types * @since 4.0.0 */ type EncodingServices = S extends Top ? S["EncodingServices"] : never; - /** - * Converts a schema type into an assertion function signature. The resulting - * function narrows its argument to `I & S["Type"]`. Only schemas with - * `DecodingServices: never` (i.e. no required services) can be used here. - * - * Produced by {@link asserts}. - * - * @since 4.0.0 - */ - type ToAsserts = (input: I) => asserts input is I & S["Type"]; } /** * A schema that additionally supports optic (lens/prism) operations. * + * **Details** + * * `Optic` extends {@link Schema}`` with an `Iso` type that * describes the isomorphic counterpart used by the optic layer. Crucially, * decoding and encoding require *no* Effect services (`DecodingServices` and @@ -575,6 +571,7 @@ export declare namespace Codec { * `Optic` automatically. You normally interact with this interface through * {@link Optic_} utilities rather than constructing it directly. * + * @category models * @since 4.0.0 */ export interface Optic extends Schema { @@ -587,6 +584,8 @@ export interface Optic extends Schema { * A schema that tracks the decoded type `T`, the encoded type `E`, and the * Effect services required during decoding (`RD`) and encoding (`RE`). * + * **Details** + * * Use `Codec` when you need to preserve full type information * about a schema — both what it decodes to and what it serializes from/to. * Most concrete schemas produced by this module implement `Codec`. @@ -611,6 +610,7 @@ export interface Optic extends Schema { * @see {@link Codec.EncodingServices} — extract required encoding services * @see {@link revealCodec} — helper to make TypeScript infer the full Codec type * + * @category models * @since 4.0.0 */ export interface Codec extends Schema { @@ -622,6 +622,8 @@ export interface Codec extends /** * A {@link Codec} view for APIs that only *decode* (parse/validate) values. * + * **Details** + * * Use `Decoder` to accept "any schema that can decode to `T`" without * constraining or depending on the encoded representation (`Encoded` is * `unknown`) or encoding services. @@ -637,6 +639,7 @@ export interface Codec extends * validate(Schema.NumberFromString) // ok * ``` * + * @category models * @since 4.0.0 */ export interface Decoder extends Codec { @@ -645,6 +648,8 @@ export interface Decoder extends Codec` to accept "any schema that can encode to `E`" without * constraining or depending on the decoded `Type` (`Type` is `unknown`) or * decoding services. @@ -660,14 +665,17 @@ export interface Decoder extends Codec extends Codec { readonly "Rebuild": Encoder; } /** - * Identity function that widens a value to the full {@link Codec} interface, - * prompting TypeScript to infer all four type parameters (`T`, `E`, `RD`, `RE`). + * Returns a codec widened to the full {@link Codec} interface, prompting + * TypeScript to infer all four type parameters (`T`, `E`, `RD`, `RE`). + * + * **Details** * * When a schema is stored in a variable typed as `Schema` or `Top`, the * encoded type and service requirements are erased. Passing the value through @@ -685,6 +693,7 @@ export interface Encoder extends Codec(codec: Codec): Codec; @@ -693,7 +702,9 @@ export { * Error thrown (or returned as the error channel value) when schema decoding * or encoding fails. * - * The `issue` field contains a structured {@link Issue.Issue} tree describing + * **Details** + * + * The `issue` field contains a structured {@link SchemaIssue.Issue} tree describing * every validation failure, including the path to the problematic value, * expected types, and actual values received. `message` renders the issue tree * as a human-readable string. @@ -715,6 +726,7 @@ export { * } * ``` * + * @category errors * @since 4.0.0 */ SchemaError }; @@ -735,6 +747,7 @@ SchemaError }; * } * ``` * + * @category guards * @since 4.0.0 */ export declare function isSchemaError(u: unknown): u is SchemaError; @@ -742,6 +755,8 @@ export declare function isSchemaError(u: unknown): u is SchemaError; * Returns a "Standard Schema" object conforming to the [Standard Schema * v1](https://standardschema.dev/) specification. * + * **Details** + * * This function creates a schema whose `validate` method attempts to decode and * validate the provided input synchronously. If the underlying `Schema` * includes any asynchronous components (e.g., asynchronous message resolutions @@ -800,24 +815,27 @@ export declare function isSchemaError(u: unknown): u is SchemaError; * @since 4.0.0 */ export declare function toStandardSchemaV1>(self: S, options?: { - readonly leafHook?: Issue.LeafHook | undefined; - readonly checkHook?: Issue.CheckHook | undefined; - readonly parseOptions?: AST.ParseOptions | undefined; + readonly leafHook?: SchemaIssue.LeafHook | undefined; + readonly checkHook?: SchemaIssue.CheckHook | undefined; + readonly parseOptions?: SchemaAST.ParseOptions | undefined; }): StandardSchemaV1 & S; /** - * Experimental support for converting a schema to a Standard JSON Schema V1. + * Converts a schema to an experimental Standard JSON Schema V1 representation. + * + * **Details** * * https://github.com/standard-schema/standard-schema/pull/134 * * @category Standard Schema * @since 4.0.0 - * @experimental */ export declare function toStandardJSONSchemaV1(self: S): StandardJSONSchemaV1 & S; /** * Creates a type guard function that checks if a value conforms to a given * schema. * + * **Details** + * * This function returns a predicate that performs a type-safe check, narrowing * the type of the input value if the check passes. It's particularly useful for * runtime type validation and TypeScript type narrowing. @@ -840,145 +858,285 @@ export declare function toStandardJSONSchemaV1(self: S): Standard * } * ``` * - * @category Asserting - * @since 4.0.0 + * @category guards + * @since 3.10.0 */ -export declare const is: typeof Parser.is; +export declare const is: typeof SchemaParser.is; /** * Creates an assertion function that throws an error if the input doesn't match * the schema. * - * This function is useful for runtime type checking with TypeScript's `asserts` - * type guard. It narrows the type of the input if the assertion succeeds, or - * throws an error if it fails. + * **When to use** + * + * Use to validate unknown input at runtime while narrowing the value with a + * TypeScript assertion signature. + * + * **Details** + * + * The input is narrowed if the assertion succeeds. If validation fails, the + * assertion throws. * * **Example** (Basic Usage) * * ```ts * import { Schema } from "effect" * - * const assertString: (u: unknown) => asserts u is string = Schema.asserts( - * Schema.String - * ) + * const input: unknown = "hello" * - * // This will pass silently (no return value) - * try { - * assertString("hello") - * console.log("String assertion passed") - * } catch (error) { - * console.log("String assertion failed") - * } + * // This will pass silently (no return value) and narrow input to string + * Schema.asserts(Schema.String, input) + * console.log(input.toUpperCase()) * * // This will throw an error * try { - * assertString(123) + * const invalid: unknown = 123 + * Schema.asserts(Schema.String, invalid) * } catch (error) { * console.log("Non-string assertion failed as expected") * } * ``` * - * @category Asserting + * @category guards * @since 4.0.0 */ -export declare const asserts: typeof Parser.asserts; +export declare const asserts: (schema: S, input: I) => asserts input is I & S["Type"]; /** * Decodes an `unknown` input against a schema, returning an `Effect` that - * succeeds with the decoded value or fails with a {@link SchemaError}. Use this - * when the input type is not statically known. Prefer {@link decodeEffect} when - * the input is already typed as the schema's `Encoded` type. + * succeeds with the decoded value or fails with a {@link SchemaError}. + * + * **When to use** + * + * Use when you need to decode unknown input in an `Effect` whose failure + * channel is `SchemaError`. * - * @category Decoding + * **Details** + * + * Prefer {@link decodeEffect} when the input is already typed as the schema's + * `Encoded` type. + * Options may be provided either when creating the decoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.decodeUnknownEffect} for the adapter that fails with `SchemaIssue.Issue` directly + * + * @category decoding * @since 4.0.0 */ -export declare function decodeUnknownEffect(schema: S): (input: unknown, options?: AST.ParseOptions) => Effect.Effect; +export declare function decodeUnknownEffect(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Effect.Effect; /** * Decodes a typed input (the schema's `Encoded` type) against a schema, * returning an `Effect` that succeeds with the decoded value or fails with a - * {@link SchemaError}. Use this when the input is already typed; for `unknown` - * input use {@link decodeUnknownEffect}. + * {@link SchemaError}. + * + * **When to use** + * + * Use when you need to decode input already typed as the schema's `Encoded` + * type in an `Effect` whose failure channel is `SchemaError`. * - * @category Decoding + * **Details** + * + * For `unknown` input use {@link decodeUnknownEffect}. + * Options may be provided either when creating the decoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.decodeEffect} for the adapter that fails with `SchemaIssue.Issue` directly + * + * @category decoding * @since 4.0.0 */ -export declare const decodeEffect: (schema: S) => (input: S["Encoded"], options?: AST.ParseOptions) => Effect.Effect; +export declare const decodeEffect: (schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Effect.Effect; /** * Decodes an `unknown` input against a schema synchronously, returning an * `Exit` that is either a `Success` with the decoded value or a `Failure` with - * a {@link SchemaError}. Only usable with schemas that have no - * `DecodingServices` requirement. Prefer {@link decodeExit} when the input is - * already typed as the schema's `Encoded` type. + * a {@link SchemaError}. + * + * **When to use** + * + * Use when you need to decode unknown input into an `Exit` whose failure + * contains `SchemaError`. + * + * **Details** * - * @category Decoding + * Only usable with schemas that have no `DecodingServices` requirement. Prefer + * {@link decodeExit} when the input is already typed as the schema's `Encoded` + * type. + * Options may be provided either when creating the decoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.decodeUnknownExit} for the adapter whose failure contains `SchemaIssue.Issue` directly + * + * @category decoding * @since 4.0.0 */ -export declare function decodeUnknownExit>(schema: S): (input: unknown, options?: AST.ParseOptions) => Exit_.Exit; +export declare function decodeUnknownExit>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Exit_.Exit; /** * Decodes a typed input (the schema's `Encoded` type) against a schema * synchronously, returning an `Exit` that is either a `Success` with the - * decoded value or a `Failure` with a {@link SchemaError}. Only usable with - * schemas that have no `DecodingServices` requirement. For `unknown` input use - * {@link decodeUnknownExit}. + * decoded value or a `Failure` with a {@link SchemaError}. + * + * **When to use** + * + * Use when you need to decode already typed `Encoded` input into an `Exit` + * whose failure contains `SchemaError`. + * + * **Details** * - * @category Decoding + * Only usable with schemas that have no `DecodingServices` requirement. For + * `unknown` input use {@link decodeUnknownExit}. + * Options may be provided either when creating the decoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.decodeExit} for the adapter whose failure contains `SchemaIssue.Issue` directly + * + * @category decoding * @since 4.0.0 */ -export declare const decodeExit: >(schema: S) => (input: S["Encoded"], options?: AST.ParseOptions) => Exit_.Exit; +export declare const decodeExit: >(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Exit_.Exit; /** * Decodes an `unknown` input against a schema, returning an `Option` that is - * `Some` with the decoded value on success or `None` on failure. Prefer this - * over {@link decodeUnknownExit} or {@link decodeUnknownEffect} when you only - * need to know whether decoding succeeded and don't need error details. For - * typed input use {@link decodeOption}. + * `Some` with the decoded value on success or `None` on failure. * - * @category Decoding - * @since 4.0.0 + * **When to use** + * + * Use when you do not know the input type statically and only need to know + * whether decoding succeeded. + * + * **Details** + * + * Prefer this over {@link decodeUnknownExit} or {@link decodeUnknownEffect} + * when you don't need error details. For input already typed as the schema's + * `Encoded` type use {@link decodeOption}. + * Options may be provided either when creating the decoder or when applying it; + * application options override creation options. + * + * @category decoding + * @since 3.10.0 */ -export declare const decodeUnknownOption: typeof Parser.decodeUnknownOption; +export declare const decodeUnknownOption: >(schema: S, options?: SchemaAST.ParseOptions) => (input: unknown, options?: SchemaAST.ParseOptions) => Option_.Option; /** * Decodes a typed input (the schema's `Encoded` type) against a schema, * returning an `Option` that is `Some` with the decoded value on success or - * `None` on failure. For `unknown` input use {@link decodeUnknownOption}. + * `None` on failure. * - * @category Decoding - * @since 4.0.0 + * **When to use** + * + * Use when you already have input typed as the schema's `Encoded` type and + * only need to know whether decoding succeeded. + * + * **Details** + * + * For `unknown` input use {@link decodeUnknownOption}. + * Options may be provided either when creating the decoder or when applying it; + * application options override creation options. + * + * @category decoding + * @since 3.10.0 */ -export declare const decodeOption: >(schema: S) => (input: S["Encoded"], options?: AST.ParseOptions) => Option_.Option; +export declare const decodeOption: >(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Option_.Option; /** - * Decodes an `unknown` input against a schema, returning a `Promise` that - * resolves with the decoded value or rejects with a {@link SchemaError}. Useful - * for integrating with Promise-based APIs. For typed input use - * {@link decodePromise}. + * Decodes an `unknown` input against a schema, returning a `Result` that + * succeeds with the decoded value or fails with a {@link SchemaError}. + * + * **When to use** + * + * Use when you do not know the input type statically and want decoding to + * return a `Result` with `SchemaError` failure data. + * + * **Details** + * + * For input already typed as the schema's `Encoded` type use + * {@link decodeResult}. + * Options may be provided either when creating the decoder or when applying it; + * application options override creation options. * - * @category Decoding + * @see {@link SchemaParser.decodeUnknownResult} for the adapter that fails with `SchemaIssue.Issue` directly + * + * @category decoding * @since 4.0.0 */ -export declare const decodeUnknownResult: typeof Parser.decodeUnknownResult; +export declare function decodeUnknownResult>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Result_.Result; /** - * @category Decoding + * Decodes a typed input (the schema's `Encoded` type) against a schema, + * returning a `Result` that succeeds with the decoded value or fails with a + * {@link SchemaError}. + * + * **When to use** + * + * Use when you already have input typed as the schema's `Encoded` type and + * want decoding to return a `Result` with `SchemaError` failure data. + * + * **Details** + * + * For `unknown` input use {@link decodeUnknownResult}. + * Options may be provided either when creating the decoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.decodeResult} for the adapter that fails with `SchemaIssue.Issue` directly + * + * @category decoding * @since 4.0.0 */ -export declare const decodeResult: >(schema: S) => (input: S["Encoded"], options?: AST.ParseOptions) => Result_.Result; +export declare const decodeResult: >(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Result_.Result; /** - * @category Decoding - * @since 4.0.0 + * Decodes an `unknown` input against a schema, returning a `Promise` that + * resolves with the decoded value or rejects with a {@link SchemaError}. + * + * **When to use** + * + * Use when you need decoding of unknown input to return a JavaScript `Promise` + * that rejects with `SchemaError`. + * + * **Details** + * + * For input already typed as the schema's `Encoded` type use + * {@link decodePromise}. + * Options may be provided either when creating the decoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.decodeUnknownPromise} for the adapter that rejects with `SchemaIssue.Issue` directly + * + * @category decoding + * @since 3.10.0 */ -export declare const decodeUnknownPromise: typeof Parser.decodeUnknownPromise; +export declare function decodeUnknownPromise>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Promise; /** * Decodes a typed input (the schema's `Encoded` type) against a schema, * returning a `Promise` that resolves with the decoded value or rejects with a - * {@link SchemaError}. For `unknown` input use {@link decodeUnknownPromise}. + * {@link SchemaError}. * - * @category Decoding - * @since 4.0.0 + * **When to use** + * + * Use when you already have input typed as the schema's `Encoded` type and + * need decoding to return a JavaScript `Promise` that rejects with + * `SchemaError`. + * + * **Details** + * + * For `unknown` input use `decodeUnknownPromise`. + * Options may be provided either when creating the decoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.decodePromise} for the adapter that rejects with `SchemaIssue.Issue` directly + * + * @category decoding + * @since 3.10.0 */ -export declare const decodePromise: typeof Parser.decodePromise; +export declare const decodePromise: >(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Promise; /** - * Decodes an `unknown` input against a schema synchronously, throwing a - * {@link SchemaError} on failure. Use this when you want to validate data at a - * boundary and treat a schema mismatch as an unrecoverable error. For - * non-throwing alternatives see {@link decodeUnknownOption}, - * {@link decodeUnknownExit}, or {@link decodeUnknownEffect}. For typed input - * use {@link decodeSync}. + * Decodes an `unknown` input against a schema synchronously, returning the + * decoded value or throwing a {@link SchemaError}. + * + * **When to use** + * + * Use when you need to validate unknown data at a synchronous boundary and want + * schema mismatches to throw `SchemaError`. + * + * **Details** + * + * For input already typed as the schema's `Encoded` type use `decodeSync`. + * Only service-free schemas can be decoded synchronously. For non-throwing + * alternatives see `decodeUnknownOption`, `decodeUnknownExit`, or + * `decodeUnknownEffect`. Options may be provided either when creating the + * decoder or when applying it; application options override creation options. * * **Example** (Decoding with a transformation schema) * @@ -997,24 +1155,49 @@ export declare const decodePromise: typeof Parser.decodePromise; * // └─ Expected a numeric string, actual "not a number" * ``` * - * @category Decoding + * @see {@link SchemaParser.decodeUnknownSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue` + * + * @category decoding * @since 4.0.0 */ -export declare const decodeUnknownSync: typeof Parser.decodeUnknownSync; +export declare function decodeUnknownSync>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => S["Type"]; /** * Decodes a typed input (the schema's `Encoded` type) against a schema - * synchronously, throwing a {@link SchemaError} on failure. For `unknown` input - * use {@link decodeUnknownSync}. + * synchronously, returning the decoded value or throwing a {@link SchemaError}. + * + * **When to use** + * + * Use when you already have input typed as the schema's `Encoded` type and + * want schema mismatches to throw `SchemaError` synchronously. + * + * **Details** + * + * For `unknown` input use `decodeUnknownSync`. + * Only service-free schemas can be decoded synchronously. Options may be + * provided either when creating the decoder or when applying it; application + * options override creation options. + * + * @see {@link SchemaParser.decodeSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue` * - * @category Decoding + * @category decoding * @since 4.0.0 */ -export declare const decodeSync: >(schema: S) => (input: S["Encoded"], options?: AST.ParseOptions) => S["Type"]; +export declare const decodeSync: >(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => S["Type"]; /** * Encodes an `unknown` input against a schema, returning an `Effect` that - * succeeds with the encoded value or fails with a {@link SchemaError}. Use this - * when the input type is not statically known. Prefer {@link encodeEffect} when - * the input is already typed as the schema's `Type`. + * succeeds with the encoded value or fails with a {@link SchemaError}. + * + * **When to use** + * + * Use when you need to encode unknown input in an `Effect` whose failure + * channel is `SchemaError`. + * + * **Details** + * + * Prefer {@link encodeEffect} when the value is already typed as the schema's + * `Type`. + * Options may be provided either when creating the encoder or when applying it; + * application options override creation options. * * **Example** (Encoding a value to a string) * @@ -1027,115 +1210,256 @@ export declare const decodeSync: >(schema: S) => (inp * // Output: "42" * ``` * - * @category Encoding + * @see {@link SchemaParser.encodeUnknownEffect} for the adapter that fails with `SchemaIssue.Issue` directly + * + * @category encoding * @since 4.0.0 */ -export declare function encodeUnknownEffect(schema: S): (input: unknown, options?: AST.ParseOptions) => Effect.Effect; +export declare function encodeUnknownEffect(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Effect.Effect; /** * Encodes a typed input (the schema's `Type`) against a schema, returning an * `Effect` that succeeds with the encoded value or fails with a - * {@link SchemaError}. Use this when the input is already typed; for `unknown` - * input use {@link encodeUnknownEffect}. + * {@link SchemaError}. + * + * **When to use** * - * @category Encoding + * Use when you need to encode input already typed as the schema's `Type` in + * an `Effect` whose failure channel is `SchemaError`. + * + * **Details** + * + * For `unknown` input use {@link encodeUnknownEffect}. + * Options may be provided either when creating the encoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.encodeEffect} for the adapter that fails with `SchemaIssue.Issue` directly + * + * @category encoding * @since 4.0.0 */ -export declare const encodeEffect: (schema: S) => (input: S["Type"], options?: AST.ParseOptions) => Effect.Effect; +export declare const encodeEffect: (schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Effect.Effect; /** * Encodes an `unknown` input against a schema synchronously, returning an * `Exit` that is either a `Success` with the encoded value or a `Failure` with - * a {@link SchemaError}. Only usable with schemas that have no - * `EncodingServices` requirement. Prefer {@link encodeExit} when the input is - * already typed as the schema's `Type`. + * a {@link SchemaError}. + * + * **When to use** + * + * Use when you need to encode unknown input into an `Exit` whose failure + * contains `SchemaError`. * - * @category Encoding + * **Details** + * + * Only usable with schemas that have no `EncodingServices` requirement. Prefer + * {@link encodeExit} when the value is already typed as the schema's `Type`. + * Options may be provided either when creating the encoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.encodeUnknownExit} for the adapter whose failure contains `SchemaIssue.Issue` directly + * + * @category encoding * @since 4.0.0 */ -export declare function encodeUnknownExit>(schema: S): (input: unknown, options?: AST.ParseOptions) => Exit_.Exit; +export declare function encodeUnknownExit>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Exit_.Exit; /** * Encodes a typed input (the schema's `Type`) against a schema synchronously, * returning an `Exit` that is either a `Success` with the encoded value or a - * `Failure` with a {@link SchemaError}. Only usable with schemas that have no - * `EncodingServices` requirement. For `unknown` input use - * {@link encodeUnknownExit}. + * `Failure` with a {@link SchemaError}. + * + * **When to use** + * + * Use when you need to encode already typed schema values into an `Exit` whose + * failure contains `SchemaError`. * - * @category Encoding + * **Details** + * + * Only usable with schemas that have no `EncodingServices` requirement. For + * `unknown` input use {@link encodeUnknownExit}. + * Options may be provided either when creating the encoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.encodeExit} for the adapter whose failure contains `SchemaIssue.Issue` directly + * + * @category encoding * @since 4.0.0 */ -export declare const encodeExit: >(schema: S) => (input: S["Type"], options?: AST.ParseOptions) => Exit_.Exit; +export declare const encodeExit: >(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Exit_.Exit; /** * Encodes an `unknown` input against a schema, returning an `Option` that is - * `Some` with the encoded value on success or `None` on failure. Prefer this - * over {@link encodeUnknownExit} or {@link encodeUnknownEffect} when you only - * need to know whether encoding succeeded and don't need error details. For - * typed input use {@link encodeOption}. + * `Some` with the encoded value on success or `None` on failure. * - * @category Encoding - * @since 4.0.0 + * **When to use** + * + * Use when you do not know the input type statically and only need to know + * whether encoding succeeded. + * + * **Details** + * + * Prefer this over {@link encodeUnknownExit} or {@link encodeUnknownEffect} + * when you don't need error details. For values already typed as the schema's + * `Type` use {@link encodeOption}. + * Options may be provided either when creating the encoder or when applying it; + * application options override creation options. + * + * @category encoding + * @since 3.10.0 */ -export declare const encodeUnknownOption: typeof Parser.encodeUnknownOption; +export declare const encodeUnknownOption: >(schema: S, options?: SchemaAST.ParseOptions) => (input: unknown, options?: SchemaAST.ParseOptions) => Option_.Option; /** * Encodes a typed input (the schema's `Type`) against a schema, returning an * `Option` that is `Some` with the encoded value on success or `None` on - * failure. For `unknown` input use {@link encodeUnknownOption}. + * failure. * - * @category Encoding - * @since 4.0.0 + * **When to use** + * + * Use when you already have a value typed as the schema's `Type` and only need + * to know whether encoding succeeded. + * + * **Details** + * + * For `unknown` input use {@link encodeUnknownOption}. + * Options may be provided either when creating the encoder or when applying it; + * application options override creation options. + * + * @category encoding + * @since 3.10.0 */ -export declare const encodeOption: >(schema: S) => (input: S["Type"], options?: AST.ParseOptions) => Option_.Option; +export declare const encodeOption: >(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Option_.Option; /** - * Encodes an `unknown` input against a schema, returning a `Promise` that - * resolves with the encoded value or rejects with a {@link SchemaError}. Useful - * for integrating with Promise-based APIs. For typed input use - * {@link encodePromise}. + * Encodes an `unknown` input against a schema, returning a `Result` that + * succeeds with the encoded value or fails with a {@link SchemaError}. + * + * **When to use** + * + * Use when you do not know the input type statically and want encoding to + * return a `Result` with `SchemaError` failure data. + * + * **Details** * - * @category Encoding + * For values already typed as the schema's `Type` use {@link encodeResult}. + * Options may be provided either when creating the encoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.encodeUnknownResult} for the adapter that fails with `SchemaIssue.Issue` directly + * + * @category encoding * @since 4.0.0 */ -export declare const encodeUnknownResult: typeof Parser.encodeUnknownResult; +export declare function encodeUnknownResult>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Result_.Result; /** - * @category Encoding + * Encodes a typed input (the schema's `Type`) against a schema, returning a + * `Result` that succeeds with the encoded value or fails with a + * {@link SchemaError}. + * + * **When to use** + * + * Use when you already have a value typed as the schema's `Type` and want + * encoding to return a `Result` with `SchemaError` failure data. + * + * **Details** + * + * For `unknown` input use {@link encodeUnknownResult}. + * Options may be provided either when creating the encoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.encodeResult} for the adapter that fails with `SchemaIssue.Issue` directly + * + * @category encoding * @since 4.0.0 */ -export declare const encodeResult: >(schema: S) => (input: S["Type"], options?: AST.ParseOptions) => Result_.Result; +export declare const encodeResult: >(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Result_.Result; /** - * @category Encoding - * @since 4.0.0 + * Encodes an `unknown` input against a schema, returning a `Promise` that + * resolves with the encoded value or rejects with a {@link SchemaError}. + * + * **When to use** + * + * Use when you need encoding of unknown input to return a JavaScript `Promise` + * that rejects with `SchemaError`. + * + * **Details** + * + * For values already typed as the schema's `Type` use {@link encodePromise}. + * Options may be provided either when creating the encoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.encodeUnknownPromise} for the adapter that rejects with `SchemaIssue.Issue` directly + * + * @category encoding + * @since 3.10.0 */ -export declare const encodeUnknownPromise: >(schema: S) => (input: unknown, options?: AST.ParseOptions) => Promise; +export declare function encodeUnknownPromise>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => Promise; /** * Encodes a typed input (the schema's `Type`) against a schema, returning a * `Promise` that resolves with the encoded value or rejects with a - * {@link SchemaError}. For `unknown` input use {@link encodeUnknownPromise}. + * {@link SchemaError}. * - * @category Encoding - * @since 4.0.0 + * **When to use** + * + * Use when you already have a value typed as the schema's `Type` and need + * encoding to return a JavaScript `Promise` that rejects with `SchemaError`. + * + * **Details** + * + * For `unknown` input use {@link encodeUnknownPromise}. + * Options may be provided either when creating the encoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.encodePromise} for the adapter that rejects with `SchemaIssue.Issue` directly + * + * @category encoding + * @since 3.10.0 */ -export declare const encodePromise: >(schema: S) => (input: S["Type"], options?: AST.ParseOptions) => Promise; +export declare const encodePromise: >(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => Promise; /** * Encodes an `unknown` input against a schema synchronously, throwing a - * {@link SchemaError} on failure. Use this when you want to serialize data at a - * boundary and treat a schema mismatch as an unrecoverable error. For - * non-throwing alternatives see {@link encodeUnknownOption}, - * {@link encodeUnknownExit}, or {@link encodeUnknownEffect}. For typed input - * use {@link encodeSync}. + * {@link SchemaError} on failure. + * + * **When to use** + * + * Use when you need to serialize unknown data at a synchronous boundary and + * want schema mismatches to throw `SchemaError`. + * + * **Details** + * + * For non-throwing alternatives see {@link encodeUnknownOption}, + * {@link encodeUnknownExit}, or {@link encodeUnknownEffect}. For values + * already typed as the schema's `Type` use {@link encodeSync}. + * Options may be provided either when creating the encoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.encodeUnknownSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue` * - * @category Encoding + * @category encoding * @since 4.0.0 */ -export declare const encodeUnknownSync: typeof Parser.encodeUnknownSync; +export declare function encodeUnknownSync>(schema: S, options?: SchemaAST.ParseOptions): (input: unknown, options?: SchemaAST.ParseOptions) => S["Encoded"]; /** * Encodes a typed input (the schema's `Type`) against a schema synchronously, - * throwing a {@link SchemaError} on failure. For `unknown` input use - * {@link encodeUnknownSync}. + * throwing a {@link SchemaError} on failure. * - * @category Encoding + * **When to use** + * + * Use when you already have a value typed as the schema's `Type` and want + * schema mismatches to throw `SchemaError` synchronously. + * + * **Details** + * + * For `unknown` input use {@link encodeUnknownSync}. + * Options may be provided either when creating the encoder or when applying it; + * application options override creation options. + * + * @see {@link SchemaParser.encodeSync} for the adapter that throws an `Error` whose cause is `SchemaIssue.Issue` + * + * @category encoding * @since 4.0.0 */ -export declare const encodeSync: >(schema: S) => (input: S["Type"], options?: AST.ParseOptions) => S["Encoded"]; +export declare const encodeSync: >(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Type"], options?: SchemaAST.ParseOptions) => S["Encoded"]; /** * Creates a schema from an AST (Abstract Syntax Tree) node. * + * **Details** + * * This is the fundamental constructor for all schemas in the Effect Schema * library. It takes an AST node and wraps it in a fully-typed schema that * preserves all type information and provides the complete schema API. @@ -1145,8 +1469,8 @@ export declare const encodeSync: >(schema: S) => (inp * the bridge between the untyped AST representation and the strongly-typed * schema. * - * @category Constructors - * @since 4.0.0 + * @category constructors + * @since 3.10.0 */ export declare const make: (ast: S["ast"], options?: object) => S; /** @@ -1167,23 +1491,23 @@ export declare const make: (ast: S["ast"], options?: object) => S * // "a" * ``` * + * @category constructors * @since 4.0.0 */ export declare function asClass(schema: S): S & { new (_: never): {}; }; /** - * Tests if a value is a `Schema`. + * Checks whether a value is a `Schema`. * - * @category Guards - * @since 4.0.0 + * @category guards + * @since 3.10.0 */ export declare function isSchema(u: unknown): u is Top; /** - * Companion type for an exact optional struct key. The key may be absent, but - * when present must match the wrapped schema (no implicit `undefined`). - * Produced by {@link optionalKey}. + * Type-level representation returned by {@link optionalKey}. * + * @category models * @since 4.0.0 */ export interface optionalKey extends Bottom, S["~type.make.in"], S["Iso"], S["~type.parameters"], S["~type.make"], S["~type.mutability"], "optional", S["~type.constructor.default"], S["~encoded.mutability"], "optional"> { @@ -1212,6 +1536,7 @@ interface optionalKeyLambda extends Lambda { * type Person = typeof schema["Type"] * ``` * + * @category combinators * @since 4.0.0 */ export declare const optionalKey: optionalKeyLambda; @@ -1220,17 +1545,22 @@ interface requiredKeyLambda extends Lambda { readonly "~lambda.out": this["~lambda.in"] extends optionalKey ? this["~lambda.in"]["schema"] : "Error: schema not eligible for requiredKey"; } /** - * Reverses {@link optionalKey}, returning the inner required schema. Only - * applicable to schemas already wrapped with `optionalKey`. + * Reverses `optionalKey` and returns the inner required schema. + * + * **When to use** * + * Use to remove optional-key wrapping from a schema field that was previously + * wrapped with {@link optionalKey}. + * + * @category combinators * @since 4.0.0 */ export declare const requiredKey: requiredKeyLambda; /** - * Companion type for an optional struct key that also accepts `undefined`. - * Equivalent to `optionalKey>`. Produced by {@link optional}. + * Type-level representation returned by {@link optional}. * - * @since 4.0.0 + * @category models + * @since 3.10.0 */ export interface optional extends optionalKey> { readonly "Rebuild": optional; @@ -1243,7 +1573,10 @@ interface optionalLambda extends Lambda { * Marks a struct field as optional, allowing the key to be absent or * `undefined`. * - * explicitly set to `undefined`. Equivalent to `optionalKey(UndefinedOr(S))`. + * **Details** + * + * The resulting property may be absent or explicitly set to `undefined`. + * Equivalent to `optionalKey(UndefinedOr(S))`. * * Use {@link optionalKey} instead if you want exact optional semantics (absent * only, not `undefined`). @@ -1262,7 +1595,8 @@ interface optionalLambda extends Lambda { * type Person = typeof schema.Type * ``` * - * @since 4.0.0 + * @category combinators + * @since 3.10.0 */ export declare const optional: optionalLambda; interface requiredLambda extends Lambda { @@ -1270,16 +1604,25 @@ interface requiredLambda extends Lambda { readonly "~lambda.out": this["~lambda.in"] extends optional ? this["~lambda.in"]["schema"]["members"][0] : "Error: schema not eligible for required"; } /** - * Reverses {@link optional}, returning the inner schema (unwrapping `UndefinedOr`). - * Only applicable to schemas already wrapped with `optional`. + * Reverses `optional` and returns the inner schema. * - * @since 4.0.0 + * **When to use** + * + * Use to remove optional wrapping from a schema field that was previously + * wrapped with {@link optional}. + * + * **Details** + * + * This also unwraps the `UndefinedOr` member added by `optional`. + * + * @category combinators + * @since 3.10.0 */ export declare const required: requiredLambda; /** - * Companion type for a mutable struct key. The key's property is writable. - * Produced by {@link mutableKey}. + * Type-level representation returned by {@link mutableKey}. * + * @category models * @since 4.0.0 */ export interface mutableKey extends Bottom, S["~type.make.in"], S["Iso"], S["~type.parameters"], S["~type.make"], "mutable", S["~type.optionality"], S["~type.constructor.default"], "mutable", S["~encoded.optionality"]> { @@ -1293,6 +1636,7 @@ interface mutableKeyLambda extends Lambda { * Makes a struct field mutable (removes the `readonly` modifier on the property). * Use {@link readonlyKey} to reverse. * + * @category combinators * @since 4.0.0 */ export declare const mutableKey: mutableKeyLambda; @@ -1301,16 +1645,21 @@ interface readonlyKeyLambda extends Lambda { readonly "~lambda.out": this["~lambda.in"] extends mutableKey ? this["~lambda.in"]["schema"] : "Error: schema not eligible for readonlyKey"; } /** - * Reverses {@link mutableKey}, returning the inner schema as readonly again. - * Only applicable to schemas already wrapped with `mutableKey`. + * Reverses `mutableKey` and returns the inner readonly schema. * + * **When to use** + * + * Use to remove mutable-key wrapping from a schema field that was previously + * wrapped with {@link mutableKey}. + * + * @category combinators * @since 4.0.0 */ export declare const readonlyKey: readonlyKeyLambda; /** - * Schema type that collapses a transformation schema to its decoded `Type` on - * both sides (Type = Encoded = S["Type"]). Produced by {@link toType}. + * Type-level representation returned by {@link toType}. * + * @category transforming * @since 4.0.0 */ export interface toType extends Bottom, S["~type.make.in"], S["Iso"], S["~type.parameters"], S["~type.make"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> { @@ -1323,16 +1672,17 @@ interface toTypeLambda extends Lambda { * Extracts the type-side schema: sets `Encoded` to equal the decoded `Type`, * discarding the encoding transformation path. * + * @category transforming * @since 4.0.0 */ export declare const toType: toTypeLambda; /** - * Schema type that collapses a transformation schema to its `Encoded` side on - * both sides (Type = Encoded = S["Encoded"]). Produced by {@link toEncoded}. + * Type-level representation returned by {@link toEncoded}. * + * @category transforming * @since 4.0.0 */ -export interface toEncoded extends Bottom, S["Encoded"], S["Encoded"], ReadonlyArray, S["Encoded"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> { +export interface toEncoded extends Bottom, S["Encoded"], S["Encoded"], ReadonlyArray, S["Encoded"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> { } interface toEncodedLambda extends Lambda { (self: S): toEncoded; @@ -1342,23 +1692,31 @@ interface toEncodedLambda extends Lambda { * Extracts the encoded-side schema: sets `Type` to equal the `Encoded`, * discarding the decoding transformation path. * + * @category transforming * @since 4.0.0 */ export declare const toEncoded: toEncodedLambda; declare const FlipTypeId = "~effect/Schema/flip"; /** - * Schema type representing a flipped schema where `Type` and `Encoded` are - * swapped. Produced by {@link flip}. + * Type-level representation returned by {@link flip}. * + * @category transforming * @since 4.0.0 */ -export interface flip extends Bottom, S["Encoded"], S["Encoded"], ReadonlyArray, S["Encoded"], S["~encoded.mutability"], S["~encoded.optionality"], ConstructorDefault, S["~type.mutability"], S["~type.optionality"]> { +export interface flip extends Bottom, S["Encoded"], S["Encoded"], ReadonlyArray, S["Encoded"], S["~encoded.mutability"], S["~encoded.optionality"], ConstructorDefault, S["~type.mutability"], S["~type.optionality"]> { readonly [FlipTypeId]: typeof FlipTypeId; readonly schema: S; } /** - * Swaps the `Type` and `Encoded` of a schema, inverting the transformation - * direction. Calling `flip` twice returns the original schema. + * Swaps the decoded and encoded sides of a schema. + * + * **When to use** + * + * Use to invert a schema transformation direction. + * + * **Details** + * + * Calling `flip` twice returns the original schema. * * **Example** (Flip a number-from-string schema) * @@ -1370,23 +1728,25 @@ export interface flip extends Bottom(schema: S): S extends flip ? F["Rebuild"] : flip; /** - * Represents a schema for a single literal value. + * Type-level representation returned by {@link Literal}. * - * @see {@link Literal} for the constructor function. - * @since 4.0.0 + * @category models + * @since 3.10.0 */ -export interface Literal extends Bottom> { +export interface Literal extends Bottom> { readonly literal: L; - transform(to: L2): decodeTo, Literal>; + transform(to: L2): decodeTo, Literal>; } /** * Creates a schema for a single literal value (string, number, bigint, boolean, or null). * * **Example** (String literal) + * * ```ts * import { Schema } from "effect" * @@ -1397,54 +1757,82 @@ export interface Literal extends Bottom(literal: L): Literal; +export declare function Literal(literal: L): Literal; /** * Namespace for {@link TemplateLiteral} helper types. * - * @since 4.0.0 + * @since 3.10.0 */ export declare namespace TemplateLiteral { /** + * Constraint for schema parts that can appear inside a `TemplateLiteral`. + * + * **Details** + * + * The schema's encoded value must be a `string`, `number`, or `bigint` so it can + * be converted into a template literal string segment. + * + * @category utility types * @since 4.0.0 */ interface SchemaPart extends Top { readonly Encoded: string | number | bigint; } /** + * Literal value that can be used directly as a part of a `TemplateLiteral`. + * + * @category utility types * @since 4.0.0 */ type LiteralPart = string | number | bigint; /** + * A single part of a `TemplateLiteral`, either an interpolated schema part or a + * literal `string`, `number`, or `bigint`. + * + * @category utility types * @since 4.0.0 */ type Part = SchemaPart | LiteralPart; /** + * Ordered list of parts used to construct a `TemplateLiteral` schema. + * + * @category utility types * @since 4.0.0 */ type Parts = ReadonlyArray; type AppendType

() => (self: Matcher) => [Ret] extends [[A] extends [never] ? any : A] ? Matcher : "withReturnType constraint does not extend Result type"; /** * Defines a condition for matching values. * - * **Details** + * **When to use** * - * This function enables pattern matching by checking whether a given value - * satisfies a condition. It supports both direct value comparisons and - * predicate functions. If the condition is met, the associated function is - * executed. + * Use to add one positive pattern case to a `Match.type` or `Match.value` + * pipeline when a direct value, predicate, or structured object pattern should + * run a handler for matching input. * - * This function is useful when defining matchers that need to check for - * specific values or apply logical conditions to determine a match. It works - * well with structured objects and primitive types. + * **Details** + * + * Supports both direct value comparisons and predicate functions. If the + * pattern matches, the associated function is executed and the matched input is + * removed from the remaining cases tracked by the matcher. * - * @example (Matching with Values and Predicates) + * **Example** (Matching with Values and Predicates) * * ```ts * import { Match } from "effect" @@ -602,10 +632,10 @@ export declare const withReturnType: () => (self: Matche * // Output: "4 is too young" * ``` * - * @see {@link whenOr} Use this when multiple patterns should match in a single - * condition. - * @see {@link whenAnd} Use this when a value must match all provided patterns. - * @see {@link orElse} Provides a fallback when no patterns match. + * @see {@link whenOr} for handling any one of several patterns with the same handler + * @see {@link whenAnd} for requiring all provided patterns to match before running a handler + * @see {@link not} for handling inputs that do not match a pattern + * @see {@link orElse} for providing a fallback when no pattern case matches * * @category Defining patterns * @since 4.0.0 @@ -624,7 +654,8 @@ export declare const when: | Types * this function enables combining them into a single statement, making the * matcher more concise. * - * @example + * **Example** (Matching one of several patterns) + * * ```ts * import { Match } from "effect" * @@ -668,7 +699,8 @@ export declare const whenOr: (field: D) => (field: D) => (field: D) => (field: D) => (field: D) => (field: D) => >]: never; }>(fields: P) => (self: Matcher) => Matcher>>, Types.ApplyFilters>>>, A | ReturnType, Pr, Ret>; /** - * Matches values based on a discriminator field and **ensures all cases are - * handled**. + * Matches values by a discriminator field and requires every possible case to + * be handled. * - * **Details*+ + * **When to use** + * + * Use to define an exhaustive discriminator handler map that finalizes the + * matcher. + * + * **Details** * - * This function is similar to {@link discriminators}, but **requires that all - * possible cases** are explicitly handled. It is useful when working with - * discriminated unions, where a specific field (e.g., `"type"`) determines the - * shape of an object. Each possible value of the field must have a - * corresponding handler, ensuring **exhaustiveness checking** at compile time. + * This is the exhaustive variant of {@link discriminators}. Each possible + * discriminator value must have a corresponding handler, so the matcher is + * finalized directly and does not require `Match.exhaustive` at the end of the + * pipeline. * - * This function **does not require** `Match.exhaustive` at the end of the - * pipeline because it enforces exhaustiveness by design. + * **Example** (Handling all discriminator cases) * - * @example * ```ts * import { Match, pipe } from "effect" * @@ -836,6 +889,8 @@ export declare const discriminators: (field: D) => (field: D) => < readonly [Tag in Exclude>]: never; }>(fields: P) => (self: Matcher) => [Pr] extends [never] ? (u: I) => Unify> : Unify>; /** - * The `Match.tag` function allows pattern matching based on the `_tag` field in - * a [Discriminated Union](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes-func.html#discriminated-unions). - * You can specify multiple tags to match within a single pattern. + * Matches discriminated union members by their `_tag` field. + * + * **When to use** * - * **Note** + * Use to handle one or more `_tag` cases with the same matcher branch. + * + * **Details** * - * The `Match.tag` function relies on the convention within the Effect ecosystem - * of naming the tag field as `"_tag"`. Ensure that your discriminated unions - * follow this naming convention for proper functionality. + * This helper follows the Effect convention that discriminated unions use + * `"_tag"` as their discriminator field. Use {@link discriminator} for a + * different discriminator field. * - * @example (Matching a Discriminated Union by Tag) + * **Example** (Matching a Discriminated Union by Tag) * * ```ts * import { Match } from "effect" @@ -897,10 +954,10 @@ export declare const tag: & string, Ret, Fn * useful for handling hierarchical or namespaced tags, where multiple related * cases share a common prefix. * - * @example - ```ts - * import { pipe } from "effect" - * import { Match } from "effect" + * **Example** (Matching tag prefixes) + * + * ```ts + * import { Match, pipe } from "effect" * * const match = pipe( * Match.type<{ _tag: "A" } | { _tag: "B" } | { _tag: "A.A" } | {}>(), @@ -929,7 +986,8 @@ export declare const tagStartsWith: >]: never; }>(fields: P) => (self: Matcher) => [Pr] extends [never] ? (u: I) => Unify> : Unify>; /** - * Excludes a specific value from matching while allowing all others. + * Creates a pattern that excludes a specific value while allowing all others. + * + * **When to use** + * + * Use to add a negative pattern case for inputs that should match when another + * pattern does not. * * **Details** * - * This function is useful when you need to **handle all values except one or - * more specific cases**. Instead of listing all possible matches manually, this - * function simplifies the logic by allowing you to specify values to exclude. - * Any excluded value will bypass the provided function and continue matching - * through other cases. + * Any excluded value bypasses the provided function and continues matching + * through later cases. * - * @example (Ignoring a Specific Value) + * **Example** (Ignoring a Specific Value) * * ```ts * import { Match } from "effect" @@ -1027,6 +1088,8 @@ export declare const tagsExhaustive: | Types. /** * Matches non-empty strings. * + * **When to use** + * + * Use to match strings whose length is greater than zero. + * + * **Details** + * * This predicate matches any string that contains at least one character, * effectively filtering out empty strings (""). * - * @example + * **Example** (Matching non-empty strings) + * * ```ts * import { Match } from "effect" * @@ -1057,17 +1127,26 @@ export declare const not: | Types. * // Output: "Valid input: " (whitespace-only strings are considered non-empty) * ``` * - * @category Predicates + * @see {@link string} for matching any string + * + * @category predicates * @since 4.0.0 */ export declare const nonEmptyString: SafeRefinement; /** * Matches a specific set of literal values (e.g., `Match.is("a", 42, true)`). * + * **When to use** + * + * Use to match one of several literal primitive or null values. + * + * **Details** + * * This function creates a predicate that matches any of the provided literal values. * It's useful for matching against multiple specific values in a single pattern. * - * @example + * **Example** (Matching literal values) + * * ```ts * import { Match } from "effect" * @@ -1095,17 +1174,20 @@ export declare const nonEmptyString: SafeRefinement; * // Output: "Unknown status: pending" * ``` * - * @category Predicates + * @category predicates * @since 4.0.0 */ export declare const is: >(...literals: Literals) => SafeRefinement; /** * Matches values of type `string`. * + * **Details** + * * This predicate refines unknown values to strings, allowing pattern matching * on string types. It's commonly used in type-based matchers to handle string cases. * - * @example + * **Example** (Matching string values) + * * ```ts * import { Match } from "effect" * @@ -1128,11 +1210,18 @@ export declare const string: Predicate.Refinement; /** * Matches values of type `number`. * + * **When to use** + * + * Use to match primitive number values, including `NaN` and infinities. + * + * **Details** + * * This predicate refines unknown values to numbers, allowing pattern matching * on numeric types. It matches all number values including integers, floats, * `Infinity`, `-Infinity`, and `NaN`. * - * @example + * **Example** (Matching number values) + * * ```ts * import { Match } from "effect" * @@ -1152,6 +1241,8 @@ export declare const string: Predicate.Refinement; * console.log(categorizeNumber("hello")) // "Not a number type" * ``` * + * @see {@link bigint} for matching primitive bigint values + * * @category predicates * @since 4.0.0 */ @@ -1159,11 +1250,23 @@ export declare const number: Predicate.Refinement; /** * Matches any value without restrictions. * - * This predicate matches absolutely any value, including `undefined`, `null`, - * objects, primitives, functions, etc. It's useful as a catch-all pattern - * or when you need to match any remaining cases. + * **When to use** + * + * Use to define an explicit catch-all pattern when the handler should receive + * the unmatched value. + * + * **Details** + * + * This predicate matches every input, including `undefined`, `null`, objects, + * primitives, and functions. + * + * **Gotchas** + * + * `Match.any` should usually be last because cases are checked in order and + * the first matching case wins. + * + * **Example** (Matching any remaining value) * - * @example * ```ts * import { Match } from "effect" * @@ -1189,17 +1292,27 @@ export declare const number: Predicate.Refinement; * // Output: "Other: object" * ``` * - * @category Predicates + * @see {@link defined} for matching only non-nullish values + * @see {@link orElse} for providing a fallback after earlier cases + * + * @category predicates * @since 4.0.0 */ export declare const any: SafeRefinement; /** * Matches any defined (non-null and non-undefined) value. * + * **When to use** + * + * Use to exclude only `null` and `undefined` from a match branch. + * + * **Details** + * * This predicate matches values that are neither `null` nor `undefined`, * effectively filtering out nullish values while preserving all other types. * - * @example + * **Example** (Matching defined values) + * * ```ts * import { Match } from "effect" * @@ -1228,17 +1341,26 @@ export declare const any: SafeRefinement; * // Output: "Value is null or undefined" * ``` * - * @category Predicates + * @see {@link any} for matching every value without excluding nullish inputs + * + * @category predicates * @since 4.0.0 */ export declare const defined: (u: A) => u is A & {}; /** * Matches values of type `boolean`. * + * **When to use** + * + * Use to match primitive boolean values. + * + * **Details** + * * This predicate refines unknown values to booleans, allowing pattern matching * on boolean types. It only matches the primitive boolean values `true` and `false`. * - * @example + * **Example** (Matching boolean values) + * * ```ts * import { Match } from "effect" * @@ -1259,6 +1381,8 @@ export declare const defined: (u: A) => u is A & {}; * console.log(describeTruthiness(1)) // "Some other truthy value" * ``` * + * @see {@link is} for matching specific literal boolean values + * * @category predicates * @since 4.0.0 */ @@ -1268,7 +1392,19 @@ export { /** * Matches the value `undefined`. * - * @category Predicates + * **When to use** + * + * Use when a matcher should handle only inputs with no defined value. + * + * **Details** + * + * This refinement is backed by `Predicate.isUndefined`, which checks + * `input === undefined`. + * + * @see {@link defined} for matching non-nullish values + * @see {@link is} for matching literal values + * + * @category predicates * @since 4.0.0 */ _undefined as undefined }; @@ -1277,17 +1413,36 @@ export { /** * Matches the value `null`. * - * @category Predicates + * **When to use** + * + * Use to handle only the `null` literal in a match branch. + * + * **Details** + * + * This refinement is backed by `Predicate.isNull`, which checks + * `input === null`. + * + * @see {@link defined} for matching non-nullish values + * @see {@link is} for matching literal values + * + * @category predicates * @since 4.0.0 */ _null as null }; /** * Matches values of type `bigint`. * + * **When to use** + * + * Use to match primitive bigint values. + * + * **Details** + * * This predicate refines unknown values to bigints, allowing pattern matching * on bigint types. BigInts are used for representing integers with arbitrary precision. * - * @example + * **Example** (Matching bigint values) + * * ```ts * import { Match } from "effect" * @@ -1308,6 +1463,8 @@ _null as null }; * console.log(processLargeNumber("123")) // "Not a numeric type" * ``` * + * @see {@link number} for matching primitive number values + * * @category predicates * @since 4.0.0 */ @@ -1315,11 +1472,14 @@ export declare const bigint: Predicate.Refinement; /** * Matches values of type `symbol`. * + * **Details** + * * This predicate refines unknown values to symbols, allowing pattern matching * on symbol types. Symbols are unique identifiers that are often used as * object keys or for creating private properties. * - * @example + * **Example** (Matching symbol values) + * * ```ts * import { Match } from "effect" * @@ -1349,11 +1509,18 @@ export declare const symbol: Predicate.Refinement; /** * Matches values that are instances of `Date`. * + * **When to use** + * + * Use to match `Date` instances. + * + * **Details** + * * This predicate refines unknown values to Date instances, allowing pattern * matching on Date objects. It only matches actual Date instances, not * date strings or timestamps. * - * @example + * **Example** (Matching Date instances) + * * ```ts * import { Match } from "effect" * @@ -1365,31 +1532,37 @@ export declare const symbol: Predicate.Refinement; * return `Date: ${date.toISOString().split("T")[0]}` * }), * Match.when(Match.string, (str) => `Date string: ${str}`), - * Match.when( - * Match.number, - * (num) => `Timestamp: ${new Date(num).toISOString()}` - * ), * Match.orElse(() => "Not a date-related value") * ) * * console.log(processDateValue(new Date("2024-01-01"))) // "Date: 2024-01-01" * console.log(processDateValue(new Date("invalid"))) // "Invalid date" * console.log(processDateValue("2024-01-01")) // "Date string: 2024-01-01" - * console.log(processDateValue(1704067200000)) // "Timestamp: 2024-01-01T00:00:00.000Z" + * console.log(processDateValue(1704067200000)) // "Not a date-related value" * ``` * + * @see {@link instanceOf} for matching instances of any constructor + * * @category predicates * @since 4.0.0 */ export declare const date: Predicate.Refinement; /** - * Matches objects where keys are `string` or `symbol` and values are `unknown`. + * Matches non-null objects other than arrays. + * + * **When to use** + * + * Use to match broad non-null, non-array object values. * - * This predicate refines unknown values to record objects, allowing pattern - * matching on plain objects. It excludes arrays, functions, dates, and other - * special object types, matching only plain objects and object literals. + * **Details** + * + * This predicate uses `Predicate.isObject`: it returns `true` for values whose + * runtime type is `"object"`, are not `null`, and are not arrays. It can match + * `Date`, `RegExp`, and class instances; use `instanceOf` or a more specific + * pattern when those cases need to be distinguished. + * + * **Example** (Matching record objects) * - * @example * ```ts * import { Match } from "effect" * @@ -1403,20 +1576,17 @@ export declare const date: Predicate.Refinement; * Match.instanceOf(Array), * (arr) => `Array with ${arr.length} items` * ), - * Match.when(Match.date, () => "Date object"), * Match.orElse(() => "Not an object") * ) * - * console.log(analyzeValue({ name: "Alice", age: 30 })) - * // "Object with 2 properties: [name, age]" - * console.log(analyzeValue([1, 2, 3])) - * // "Array with 3 items" - * console.log(analyzeValue(new Date())) - * // "Date object" - * console.log(analyzeValue("hello")) - * // "Not an object" + * console.log(analyzeValue({ name: "Alice", age: 30 })) // "Object with 2 properties: [name, age]" + * console.log(analyzeValue([1, 2, 3])) // "Array with 3 items" + * console.log(analyzeValue(null)) // "Not an object" + * console.log(analyzeValue("hello")) // "Not an object" * ``` * + * @see {@link instanceOf} for matching a specific constructor + * * @category predicates * @since 4.0.0 */ @@ -1426,10 +1596,18 @@ export declare const record: Predicate.Refinement `Standard error: ${err.message}` * ), - * Match.when(Match.instanceOf(Date), (date) => `Date: ${date.toISOString()}`), * Match.when( * Match.instanceOf(Array), * (arr) => `Array with ${arr.length} items` * ), + * Match.when( + * Match.instanceOf(Map), + * (map) => `Map with ${map.size} entries` + * ), * Match.orElse((value) => `Other: ${typeof value}`) * ) * - * console.log(handleValue(new CustomError("Failed", 404))) - * // Output: "Custom error: Failed (code: 404)" - * - * console.log(handleValue(new Error("Generic error"))) - * // Output: "Standard error: Generic error" - * - * console.log(handleValue(new Date())) - * // Output: "Date: 2024-01-01T00:00:00.000Z" - * - * console.log(handleValue([1, 2, 3])) - * // Output: "Array with 3 items" + * console.log(handleValue(new CustomError("Failed", 404))) // "Custom error: Failed (code: 404)" + * console.log(handleValue(new Error("Generic error"))) // "Standard error: Generic error" + * console.log(handleValue([1, 2, 3])) // "Array with 3 items" + * console.log(handleValue(new Map([["count", 1]]))) // "Map with 1 entries" * ``` * - * @category Predicates + * @see {@link instanceOfUnsafe} for constructor matching without the same type-safety guarantee + * @see {@link record} for matching broad non-null, non-array objects + * + * @category predicates * @since 4.0.0 */ export declare const instanceOf: any>(constructor: A) => SafeRefinement, never>; /** - * Unsafe variant of `instanceOf` that allows matching without type narrowing. + * Checks whether a value is an instance of a constructor without type-safe narrowing. + * + * **When to use** + * + * Use when you need constructor matching to use the unsafe refinement type. + * + * **Details** * * This predicate checks if a value is an instance of the specified constructor * but doesn't provide the same type safety guarantees as the regular `instanceOf`. * Use this when you need more flexibility but understand the type safety implications. * - * @example + * **Example** (Matching class instances unsafely) + * * ```ts * import { Match } from "effect" * @@ -1502,6 +1686,8 @@ export declare const instanceOf: any>( * ) * ``` * + * @see {@link instanceOf} for type-safe constructor matching + * * @category predicates * @since 4.0.0 */ @@ -1509,6 +1695,10 @@ export declare const instanceOfUnsafe: /** * Provides a fallback value when no patterns match. * + * **When to use** + * + * Use to finalize a matcher with a fallback for unmatched input. + * * **Details** * * This function ensures that a matcher always returns a valid result, even if @@ -1516,7 +1706,7 @@ export declare const instanceOfUnsafe: * `default` clause in a `switch` statement or the final `else` in an `if-else` * chain. * - * @example (Providing a Default Value When No Patterns Match) + * **Example** (Providing a Default Value When No Patterns Match) * * ```ts * import { Match } from "effect" @@ -1536,12 +1726,21 @@ export declare const instanceOfUnsafe: * // Output: "fallback" * ``` * - * @category Completion + * @see {@link option} for finalizing unmatched input as `Option.none` + * @see {@link result} for returning unmatched input as a `Result` failure + * @see {@link orElseAbsurd} for finalizing when unmatched input should be impossible + * + * @category completion * @since 4.0.0 */ export declare const orElse: Ret>(f: F) => (self: Matcher) => [Pr] extends [never] ? (input: I) => Unify | A> : Unify | A>; /** - * Throws an error if no pattern matches. + * Returns a matcher that throws an error if no pattern matches. + * + * **When to use** + * + * Use to finalize a matcher when every remaining unmatched case should be + * impossible. * * **Details** * @@ -1553,7 +1752,8 @@ export declare const orElse: Ret>(f: F) => Ret>(f: F) => (self: Matcher(self: Matcher(self: Matcher) => [Pr] extends [never] ? (input: I) => Result.Result, R> : Result.Result, R>; /** * Wraps the match result in an `Option`, representing an optional match. * + * **When to use** + * + * Use to finalize a matcher when unmatched input is expected and should become + * `Option.none`. + * * **Details** * * This function ensures that the result of a matcher is wrapped in an `Option`, @@ -1628,7 +1836,7 @@ export declare const result: (self: Matcher(self: Matcher(self: Matcher) => [Pr] extends [never] ? (input: I) => Option.Option> : Option.Option>; /** - * The `Match.exhaustive` method finalizes the pattern matching process by - * ensuring that all possible cases are accounted for. If any case is missing, - * TypeScript will produce a type error. This is particularly useful when - * working with unions, as it helps prevent unintended gaps in pattern matching. + * Completes a matcher that handles every remaining input case. + * + * **When to use** * - * @example (Ensuring All Cases Are Covered) + * Use to require TypeScript to reject incomplete matcher definitions before the + * matcher is turned into a function. + * + * **Details** + * + * If any case is still unmatched, the matcher does not type-check as + * exhaustive. + * + * **Example** (Ensuring All Cases Are Covered) * * ```ts * import { Match } from "effect" @@ -1675,7 +1893,7 @@ export declare const option: (self: Matcher(self: Matcher) => [Pr] extends [never] ? (u: I) => Unify : Unify; @@ -1683,11 +1901,14 @@ declare const SafeRefinementId = "~effect/match/Match/SafeRefinement"; /** * A safe refinement that narrows types without runtime errors. * + * **Details** + * * `SafeRefinement` provides a way to refine types in pattern matching while * maintaining type safety. Unlike regular predicates, safe refinements can * transform the matched value's type without throwing runtime errors. * - * @example + * **Example** (Using safe refinements) + * * ```ts * import { Match } from "effect" * @@ -1716,39 +1937,27 @@ type Fail = typeof Fail; /** * A namespace containing utility types for Match operations. * + * **Details** + * * This namespace provides advanced type-level utilities used internally by the * Match module to perform complex pattern matching, type narrowing, and filter * application. These types enable the sophisticated type inference that makes * pattern matching both type-safe and ergonomic. * - * @example - * ```ts - * import { Match } from "effect" - * - * // Most users won't need to use Types directly, but it powers the type system: - * type MyPattern = Match.Types.PatternBase<{ name: string; age: number }> - * type MyWhenMatch = Match.Types.WhenMatch - * - * // These types are used internally to provide accurate type inference - * const matcher = Match.type().pipe( - * Match.when(Match.string, (s) => s.length), // s is correctly typed as string - * Match.when(Match.number, (n) => n * 2), // n is correctly typed as number - * Match.exhaustive - * ) - * ``` - * - * @category types * @since 4.0.0 */ export declare namespace Types { /** * Computes the matched type when a pattern P is applied to type R. * + * **Details** + * * This utility type determines what type a value will have after successfully * matching against a pattern. It handles refinements, predicates, and complex * object patterns to provide accurate type narrowing. * - * @example + * **Example** (Computing matched types) + * * ```ts * import type { Match } from "effect" * @@ -1775,11 +1984,14 @@ export declare namespace Types { /** * Computes the remaining type when a pattern P is excluded from type R. * + * **Details** + * * This utility type determines what type remains after a `Match.not` pattern * excludes certain values. It's the complement of `WhenMatch`, calculating * what's left after removing the matched portion. * - * @example + * **Example** (Computing unmatched types) + * * ```ts * import type { Match } from "effect" * @@ -1802,11 +2014,14 @@ export declare namespace Types { /** * Resolves a pattern to its matched type for use in type computations. * + * **Details** + * * This utility type processes patterns (predicates, refinements, objects) * and resolves them to their corresponding matched types. It's used internally * to compute type transformations during pattern matching. * - * @example + * **Example** (Resolving match patterns) + * * ```ts * import type { Match } from "effect" * @@ -1825,11 +2040,14 @@ export declare namespace Types { /** * Computes the excluded type when a pattern P is used for exclusion. * + * **Details** + * * This utility type determines what should be excluded from a union type * when a pattern is used in filtering operations. It transforms patterns * into their exclusion-safe representations. * - * @example + * **Example** (Computing excluded patterns) + * * ```ts * import type { Match } from "effect" * @@ -1862,11 +2080,14 @@ export declare namespace Types { /** * Defines the structure for complex object and array patterns. * + * **Details** + * * This type represents patterns that can match against complex data structures * like objects and arrays. It supports nested pattern matching and partial * object matching, enabling sophisticated pattern compositions. * - * @example + * **Example** (Describing complex object patterns) + * * ```ts * import { Match } from "effect" * @@ -1898,28 +2119,12 @@ export declare namespace Types { /** * Defines primitive patterns that can match simple values. * + * **Details** + * * This type represents the building blocks of pattern matching: predicates, * literal values, and safe refinements. These are the atomic patterns that * can be composed into more complex matching logic. * - * @example - * ```ts - * import { Match } from "effect" - * - * // PatternPrimitive includes various pattern types: - * - * // Literal values - * Match.when("exact", () => "matched exact") - * Match.when(42, () => "matched number") - * - * // Predicates - * Match.when(Match.string, (s) => `string: ${s}`) - * Match.when((x: number) => x > 10, (n: number) => `large number: ${n}`) - * - * // Custom refinements - * Match.when(Match.defined, (value) => `defined: ${value}`) - * ``` - * * @category types * @since 4.0.0 */ @@ -1927,11 +2132,14 @@ export declare namespace Types { /** * Represents a filter that excludes specific types from a union. * + * **Details** + * * `Without` is used internally to track which types should be excluded * from consideration during pattern matching. It helps implement the * type-level logic for `Match.not` and other exclusion operations. * - * @example + * **Example** (Tracking excluded types) + * * ```ts * import { Match } from "effect" * @@ -1953,11 +2161,14 @@ export declare namespace Types { /** * Represents a filter that includes only specific types from a union. * + * **Details** + * * `Only` is used internally to track which types should be exclusively * considered during pattern matching. It helps implement the type-level * logic for positive matches and type narrowing. * - * @example + * **Example** (Tracking included types) + * * ```ts * import { Match } from "effect" * @@ -1979,11 +2190,14 @@ export declare namespace Types { /** * Adds a type to the exclusion filter, expanding what should be filtered out. * + * **Details** + * * This utility type manages the accumulation of excluded types during * pattern matching. When multiple exclusions are applied, it combines * them into a single filter representation. * - * @example + * **Example** (Accumulating excluded types) + * * ```ts * import { Match } from "effect" * @@ -2003,11 +2217,14 @@ export declare namespace Types { /** * Adds a type to the inclusion filter, refining what should be included. * + * **Details** + * * This utility type manages the refinement of included types during * pattern matching. It ensures that only the most specific type * constraints are maintained when multiple positive matches are applied. * - * @example + * **Example** (Refining included types) + * * ```ts * import { Match } from "effect" * @@ -2026,11 +2243,14 @@ export declare namespace Types { /** * Applies accumulated filters to an input type, producing the final narrowed type. * + * **Details** + * * This utility type takes the collected inclusion/exclusion filters and * applies them to the input type to compute the final narrowed result. * It's the culmination of the type-level filtering process. * - * @example + * **Example** (Applying accumulated filters) + * * ```ts * import type { Match } from "effect" * @@ -2055,11 +2275,14 @@ export declare namespace Types { /** * Extracts tag values from a discriminated union based on a discriminant field. * + * **Details** + * * This utility type extracts the possible values of a discriminant field * from a union type. It's used internally to implement tag-based pattern * matching for discriminated unions. * - * @example + * **Example** (Extracting discriminator tags) + * * ```ts * import type { Match } from "effect" * @@ -2086,11 +2309,14 @@ export declare namespace Types { /** * Converts an array type to an intersection of its element types. * + * **Details** + * * This utility type takes an array of types and converts them into a single * intersection type. It's used internally when multiple patterns need to * be satisfied simultaneously (like in `Match.whenAnd`). * - * @example + * **Example** (Converting arrays to intersections) + * * ```ts * import type { Match } from "effect" * @@ -2114,11 +2340,14 @@ export declare namespace Types { /** * Extracts and narrows the matched type from an input type given a pattern. * + * **Details** + * * This is the core type utility that performs the actual type extraction * and narrowing logic. It handles the complex type-level computation that * determines what type results from applying a pattern to an input type. * - * @example + * **Example** (Extracting matched types) + * * ```ts * import { Match } from "effect" * diff --git a/.opencode/node_modules/effect/dist/Match.d.ts.map b/.opencode/node_modules/effect/dist/Match.d.ts.map index 202d1baaa201ec5b2eee5c02fdee51791a1162f3..bbf42e60e2090313e646b83e4d98fcafccbe6052 100644 --- a/.opencode/node_modules/effect/dist/Match.d.ts.map +++ b/.opencode/node_modules/effect/dist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AAA;CACR"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Match.js b/.opencode/node_modules/effect/dist/Match.js index daf54c800a1f6dedab273ac33624f61c63c2b80a..e8e18072d0f926979808756e292cba944adb17fc 100644 --- a/.opencode/node_modules/effect/dist/Match.js +++ b/.opencode/node_modules/effect/dist/Match.js @@ -1,28 +1,12 @@ /** - * The `effect/match` module provides a type-safe pattern matching system for - * TypeScript. Inspired by functional programming, it simplifies conditional - * logic by replacing verbose if/else or switch statements with a structured and - * expressive API. + * Builds pattern matchers for TypeScript values. * - * This module supports matching against types, values, and discriminated unions - * while enforcing exhaustiveness checking to ensure all cases are handled. - * - * Although pattern matching is not yet a native JavaScript feature, - * `effect/match` offers a reliable implementation that is available today. - * - * **How Pattern Matching Works** - * - * Pattern matching follows a structured process: - * - * - **Creating a matcher**: Define a `Matcher` that operates on either a - * specific `Match.type` or `Match.value`. - * - * - **Defining patterns**: Use combinators such as `Match.when`, `Match.not`, - * and `Match.tag` to specify matching conditions. - * - * - **Completing the match**: Apply a finalizer such as `Match.exhaustive`, - * `Match.orElse`, or `Match.option` to determine how unmatched cases should - * be handled. + * `Match` lets you add ordered cases and then finish them with a result, + * fallback, `Option`, or exhaustive check. Use `Match.type` to define a + * reusable matcher for a type, or `Match.value` to match one value immediately. + * Cases can match literal values, predicates, object shapes, tags, negated + * patterns, and common checks such as strings, numbers, records, and class + * instances. * * @since 4.0.0 */ @@ -32,6 +16,10 @@ const TypeId = internal.TypeId; /** * Creates a matcher for a specific type. * + * **When to use** + * + * Use to build a reusable matcher function for values of a known input type. + * * **Details** * * This function defines a `Matcher` that operates on a given type, allowing you @@ -39,7 +27,7 @@ const TypeId = internal.TypeId; * created, you can use pattern-matching functions like {@link when} to define * how different values should be processed. * - * @example (Matching Numbers and Strings) + * **Example** (Matching Numbers and Strings) * * ```ts * import { Match } from "effect" @@ -66,13 +54,17 @@ const TypeId = internal.TypeId; * * @see {@link value} for creating a matcher from a specific value. * - * @category Creating a matcher + * @category constructors * @since 4.0.0 */ export const type = internal.type; /** * Creates a matcher from a specific value. * + * **When to use** + * + * Use to match one concrete input immediately. + * * **Details** * * This function allows you to define a `Matcher` directly from a given value, @@ -83,7 +75,7 @@ export const type = internal.type; * Once the matcher is created, you can use pattern-matching functions like * {@link when} to define how different cases should be handled. * - * @example (Matching an Object by Property) + * **Example** (Matching an Object by Property) * * ```ts * import { Match } from "effect" @@ -107,18 +99,21 @@ export const type = internal.type; * * @see {@link type} for creating a matcher from a specific type. * - * @category Creating a matcher + * @category constructors * @since 4.0.0 */ export const value = internal.value; /** * Creates a match function for a specific value with discriminated union handling. * + * **Details** + * * This function provides a convenient way to pattern match on discriminated unions * by providing an object that maps each `_tag` value to its corresponding handler. * It's similar to a switch statement but with better type safety and exhaustiveness checking. * - * @example + * **Example** (Matching value tags) + * * ```ts * import { Match } from "effect" * @@ -134,18 +129,21 @@ export const value = internal.value; * console.log(message) // "Success: Hello" * ``` * - * @category Creating a matcher + * @category constructors * @since 4.0.0 */ export const valueTags = internal.valueTags; /** * Creates a type-safe match function for discriminated unions based on `_tag` field. * + * **Details** + * * This function allows you to define exhaustive pattern matching for discriminated unions * by providing handlers for each possible `_tag` value. It ensures type safety and * can optionally enforce a specific return type across all branches. * - * @example + * **Example** (Matching type tags) + * * ```ts * import { Match } from "effect" * @@ -178,7 +176,7 @@ export const valueTags = internal.valueTags; * // Output: { type: "pending" } * ``` * - * @category Creating a matcher + * @category constructors * @since 4.0.0 */ export const typeTags = internal.typeTags; @@ -194,7 +192,7 @@ export const typeTags = internal.typeTags; * **Important:** This function must be the first step in the matcher pipeline. * If used later, TypeScript will not enforce type consistency correctly. * - * @example (Validating Return Type Consistency) + * **Example** (Validating Return Type Consistency) * * ```ts * import { Match } from "effect" @@ -211,25 +209,26 @@ export const typeTags = internal.typeTags; * ) * ``` * - * @category utils + * @category utility types * @since 4.0.0 */ export const withReturnType = internal.withReturnType; /** * Defines a condition for matching values. * - * **Details** + * **When to use** + * + * Use to add one positive pattern case to a `Match.type` or `Match.value` + * pipeline when a direct value, predicate, or structured object pattern should + * run a handler for matching input. * - * This function enables pattern matching by checking whether a given value - * satisfies a condition. It supports both direct value comparisons and - * predicate functions. If the condition is met, the associated function is - * executed. + * **Details** * - * This function is useful when defining matchers that need to check for - * specific values or apply logical conditions to determine a match. It works - * well with structured objects and primitive types. + * Supports both direct value comparisons and predicate functions. If the + * pattern matches, the associated function is executed and the matched input is + * removed from the remaining cases tracked by the matcher. * - * @example (Matching with Values and Predicates) + * **Example** (Matching with Values and Predicates) * * ```ts * import { Match } from "effect" @@ -257,10 +256,10 @@ export const withReturnType = internal.withReturnType; * // Output: "4 is too young" * ``` * - * @see {@link whenOr} Use this when multiple patterns should match in a single - * condition. - * @see {@link whenAnd} Use this when a value must match all provided patterns. - * @see {@link orElse} Provides a fallback when no patterns match. + * @see {@link whenOr} for handling any one of several patterns with the same handler + * @see {@link whenAnd} for requiring all provided patterns to match before running a handler + * @see {@link not} for handling inputs that do not match a pattern + * @see {@link orElse} for providing a fallback when no pattern case matches * * @category Defining patterns * @since 4.0.0 @@ -279,7 +278,8 @@ export const when = internal.when; * this function enables combining them into a single statement, making the * matcher more concise. * - * @example + * **Example** (Matching one of several patterns) + * * ```ts * import { Match } from "effect" * @@ -323,7 +323,8 @@ export const whenOr = internal.whenOr; * useful when checking for values that need to fulfill multiple criteria at * once. * - * @example + * **Example** (Matching all provided patterns) + * * ```ts * import { Match } from "effect" * @@ -352,6 +353,10 @@ export const whenAnd = internal.whenAnd; /** * Matches values based on a specified discriminant field. * + * **When to use** + * + * Use to match one or more exact values of a discriminator field. + * * **Details** * * This function is used to define pattern matching on objects that follow a @@ -360,7 +365,8 @@ export const whenAnd = internal.whenAnd; * multiple values of the discriminant and provides a function to handle the * matched cases. * - * @example + * **Example** (Matching on a discriminator field) + * * ```ts * import { Match, pipe } from "effect" * @@ -377,6 +383,9 @@ export const whenAnd = internal.whenAnd; * ) * ``` * + * @see {@link discriminators} for defining several discriminator handlers at once + * @see {@link discriminatorStartsWith} for matching string discriminator values by prefix + * * @category Defining patterns * @since 4.0.0 */ @@ -384,19 +393,19 @@ export const discriminator = internal.discriminator; /** * Matches values where a specified field starts with a given prefix. * + * **When to use** + * + * Use to match string discriminator values by prefix instead of exact value. + * * **Details** * - * This function is useful for working with discriminated unions where the - * discriminant field follows a hierarchical or namespaced structure. It allows - * you to match values based on whether the specified field starts with a given - * prefix, making it easier to handle grouped cases. + * Instead of checking for exact matches, this helper matches values that share + * a common prefix. For example, if the discriminant field contains hierarchical + * names like `"A"`, `"A.A"`, and `"B"`, a single `"A"` rule can match both + * `"A"` and `"A.A"`. * - * Instead of checking for exact matches, this function lets you match values - * that share a common prefix. For example, if your discriminant field contains - * hierarchical names like `"A"`, `"A.A"`, and `"B"`, you can match all values - * starting with `"A"` using a single rule. + * **Example** (Matching discriminator prefixes) * - * @example * ```ts * import { Match, pipe } from "effect" * @@ -412,6 +421,8 @@ export const discriminator = internal.discriminator; * console.log(match({ type: "A.A" })) // 1 * ``` * + * @see {@link discriminator} for matching exact discriminator values + * * @category Defining patterns * @since 4.0.0 */ @@ -420,6 +431,11 @@ export const discriminatorStartsWith = internal.discriminatorStartsWith; * Matches values based on a field that serves as a discriminator, mapping each * possible value to a corresponding handler. * + * **When to use** + * + * Use to define several discriminator handlers at once without finalizing the + * matcher. + * * **Details** * * This function simplifies working with discriminated unions by letting you @@ -429,7 +445,8 @@ export const discriminatorStartsWith = internal.discriminatorStartsWith; * possible values of the field, and the values are the corresponding handler * functions. * - * @example + * **Example** (Mapping discriminator handlers) + * * ```ts * import { Match, pipe } from "effect" * @@ -449,26 +466,31 @@ export const discriminatorStartsWith = internal.discriminatorStartsWith; * ) * ``` * + * @see {@link discriminator} for adding one discriminator case to a matcher pipeline + * @see {@link discriminatorsExhaustive} for handling every discriminator value and finalizing the matcher + * * @category Defining patterns * @since 4.0.0 */ export const discriminators = internal.discriminators; /** - * Matches values based on a discriminator field and **ensures all cases are - * handled**. + * Matches values by a discriminator field and requires every possible case to + * be handled. * - * **Details*+ + * **When to use** * - * This function is similar to {@link discriminators}, but **requires that all - * possible cases** are explicitly handled. It is useful when working with - * discriminated unions, where a specific field (e.g., `"type"`) determines the - * shape of an object. Each possible value of the field must have a - * corresponding handler, ensuring **exhaustiveness checking** at compile time. + * Use to define an exhaustive discriminator handler map that finalizes the + * matcher. * - * This function **does not require** `Match.exhaustive` at the end of the - * pipeline because it enforces exhaustiveness by design. + * **Details** + * + * This is the exhaustive variant of {@link discriminators}. Each possible + * discriminator value must have a corresponding handler, so the matcher is + * finalized directly and does not require `Match.exhaustive` at the end of the + * pipeline. + * + * **Example** (Handling all discriminator cases) * - * @example * ```ts * import { Match, pipe } from "effect" * @@ -487,22 +509,26 @@ export const discriminators = internal.discriminators; * ) * ``` * + * @see {@link discriminators} for defining discriminator handlers without finalizing the matcher + * * @category Defining patterns * @since 4.0.0 */ export const discriminatorsExhaustive = internal.discriminatorsExhaustive; /** - * The `Match.tag` function allows pattern matching based on the `_tag` field in - * a [Discriminated Union](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes-func.html#discriminated-unions). - * You can specify multiple tags to match within a single pattern. + * Matches discriminated union members by their `_tag` field. + * + * **When to use** * - * **Note** + * Use to handle one or more `_tag` cases with the same matcher branch. * - * The `Match.tag` function relies on the convention within the Effect ecosystem - * of naming the tag field as `"_tag"`. Ensure that your discriminated unions - * follow this naming convention for proper functionality. + * **Details** + * + * This helper follows the Effect convention that discriminated unions use + * `"_tag"` as their discriminator field. Use {@link discriminator} for a + * different discriminator field. * - * @example (Matching a Discriminated Union by Tag) + * **Example** (Matching a Discriminated Union by Tag) * * ```ts * import { Match } from "effect" @@ -544,10 +570,10 @@ export const tag = internal.tag; * useful for handling hierarchical or namespaced tags, where multiple related * cases share a common prefix. * - * @example - ```ts - * import { pipe } from "effect" - * import { Match } from "effect" + * **Example** (Matching tag prefixes) + * + * ```ts + * import { Match, pipe } from "effect" * * const match = pipe( * Match.type<{ _tag: "A" } | { _tag: "B" } | { _tag: "A.A" } | {}>(), @@ -576,7 +602,8 @@ export const tagStartsWith = internal.tagStartsWith; * returns a transformed result. If all possible tags are handled, you can * enforce exhaustiveness using `Match.exhaustive` to ensure no case is missed. * - * @example + * **Example** (Mapping tag handlers) + * * ```ts * import { Match, pipe } from "effect" * @@ -612,7 +639,8 @@ export const tags = internal.tags; * handled. If a `_tag` value is missing from the mapping, TypeScript will * report an error. * - * @example + * **Example** (Handling all tag cases) + * * ```ts * import { Match, pipe } from "effect" * @@ -636,17 +664,19 @@ export const tags = internal.tags; */ export const tagsExhaustive = internal.tagsExhaustive; /** - * Excludes a specific value from matching while allowing all others. + * Creates a pattern that excludes a specific value while allowing all others. + * + * **When to use** + * + * Use to add a negative pattern case for inputs that should match when another + * pattern does not. * * **Details** * - * This function is useful when you need to **handle all values except one or - * more specific cases**. Instead of listing all possible matches manually, this - * function simplifies the logic by allowing you to specify values to exclude. - * Any excluded value will bypass the provided function and continue matching - * through other cases. + * Any excluded value bypasses the provided function and continues matching + * through later cases. * - * @example (Ignoring a Specific Value) + * **Example** (Ignoring a Specific Value) * * ```ts * import { Match } from "effect" @@ -666,6 +696,8 @@ export const tagsExhaustive = internal.tagsExhaustive; * // Output: "fallback" * ``` * + * @see {@link when} for adding a positive pattern case + * * @category Defining patterns * @since 4.0.0 */ @@ -673,10 +705,17 @@ export const not = internal.not; /** * Matches non-empty strings. * + * **When to use** + * + * Use to match strings whose length is greater than zero. + * + * **Details** + * * This predicate matches any string that contains at least one character, * effectively filtering out empty strings (""). * - * @example + * **Example** (Matching non-empty strings) + * * ```ts * import { Match } from "effect" * @@ -696,17 +735,26 @@ export const not = internal.not; * // Output: "Valid input: " (whitespace-only strings are considered non-empty) * ``` * - * @category Predicates + * @see {@link string} for matching any string + * + * @category predicates * @since 4.0.0 */ export const nonEmptyString = internal.nonEmptyString; /** * Matches a specific set of literal values (e.g., `Match.is("a", 42, true)`). * + * **When to use** + * + * Use to match one of several literal primitive or null values. + * + * **Details** + * * This function creates a predicate that matches any of the provided literal values. * It's useful for matching against multiple specific values in a single pattern. * - * @example + * **Example** (Matching literal values) + * * ```ts * import { Match } from "effect" * @@ -734,17 +782,20 @@ export const nonEmptyString = internal.nonEmptyString; * // Output: "Unknown status: pending" * ``` * - * @category Predicates + * @category predicates * @since 4.0.0 */ export const is = internal.is; /** * Matches values of type `string`. * + * **Details** + * * This predicate refines unknown values to strings, allowing pattern matching * on string types. It's commonly used in type-based matchers to handle string cases. * - * @example + * **Example** (Matching string values) + * * ```ts * import { Match } from "effect" * @@ -767,11 +818,18 @@ export const string = Predicate.isString; /** * Matches values of type `number`. * + * **When to use** + * + * Use to match primitive number values, including `NaN` and infinities. + * + * **Details** + * * This predicate refines unknown values to numbers, allowing pattern matching * on numeric types. It matches all number values including integers, floats, * `Infinity`, `-Infinity`, and `NaN`. * - * @example + * **Example** (Matching number values) + * * ```ts * import { Match } from "effect" * @@ -791,6 +849,8 @@ export const string = Predicate.isString; * console.log(categorizeNumber("hello")) // "Not a number type" * ``` * + * @see {@link bigint} for matching primitive bigint values + * * @category predicates * @since 4.0.0 */ @@ -798,11 +858,23 @@ export const number = Predicate.isNumber; /** * Matches any value without restrictions. * - * This predicate matches absolutely any value, including `undefined`, `null`, - * objects, primitives, functions, etc. It's useful as a catch-all pattern - * or when you need to match any remaining cases. + * **When to use** + * + * Use to define an explicit catch-all pattern when the handler should receive + * the unmatched value. + * + * **Details** + * + * This predicate matches every input, including `undefined`, `null`, objects, + * primitives, and functions. + * + * **Gotchas** + * + * `Match.any` should usually be last because cases are checked in order and + * the first matching case wins. + * + * **Example** (Matching any remaining value) * - * @example * ```ts * import { Match } from "effect" * @@ -828,17 +900,27 @@ export const number = Predicate.isNumber; * // Output: "Other: object" * ``` * - * @category Predicates + * @see {@link defined} for matching only non-nullish values + * @see {@link orElse} for providing a fallback after earlier cases + * + * @category predicates * @since 4.0.0 */ export const any = internal.any; /** * Matches any defined (non-null and non-undefined) value. * + * **When to use** + * + * Use to exclude only `null` and `undefined` from a match branch. + * + * **Details** + * * This predicate matches values that are neither `null` nor `undefined`, * effectively filtering out nullish values while preserving all other types. * - * @example + * **Example** (Matching defined values) + * * ```ts * import { Match } from "effect" * @@ -867,17 +949,26 @@ export const any = internal.any; * // Output: "Value is null or undefined" * ``` * - * @category Predicates + * @see {@link any} for matching every value without excluding nullish inputs + * + * @category predicates * @since 4.0.0 */ export const defined = internal.defined; /** * Matches values of type `boolean`. * + * **When to use** + * + * Use to match primitive boolean values. + * + * **Details** + * * This predicate refines unknown values to booleans, allowing pattern matching * on boolean types. It only matches the primitive boolean values `true` and `false`. * - * @example + * **Example** (Matching boolean values) + * * ```ts * import { Match } from "effect" * @@ -898,6 +989,8 @@ export const defined = internal.defined; * console.log(describeTruthiness(1)) // "Some other truthy value" * ``` * + * @see {@link is} for matching specific literal boolean values + * * @category predicates * @since 4.0.0 */ @@ -907,7 +1000,19 @@ export { /** * Matches the value `undefined`. * - * @category Predicates + * **When to use** + * + * Use when a matcher should handle only inputs with no defined value. + * + * **Details** + * + * This refinement is backed by `Predicate.isUndefined`, which checks + * `input === undefined`. + * + * @see {@link defined} for matching non-nullish values + * @see {@link is} for matching literal values + * + * @category predicates * @since 4.0.0 */ _undefined as undefined }; @@ -916,17 +1021,36 @@ export { /** * Matches the value `null`. * - * @category Predicates + * **When to use** + * + * Use to handle only the `null` literal in a match branch. + * + * **Details** + * + * This refinement is backed by `Predicate.isNull`, which checks + * `input === null`. + * + * @see {@link defined} for matching non-nullish values + * @see {@link is} for matching literal values + * + * @category predicates * @since 4.0.0 */ _null as null }; /** * Matches values of type `bigint`. * + * **When to use** + * + * Use to match primitive bigint values. + * + * **Details** + * * This predicate refines unknown values to bigints, allowing pattern matching * on bigint types. BigInts are used for representing integers with arbitrary precision. * - * @example + * **Example** (Matching bigint values) + * * ```ts * import { Match } from "effect" * @@ -947,6 +1071,8 @@ _null as null }; * console.log(processLargeNumber("123")) // "Not a numeric type" * ``` * + * @see {@link number} for matching primitive number values + * * @category predicates * @since 4.0.0 */ @@ -954,11 +1080,14 @@ export const bigint = Predicate.isBigInt; /** * Matches values of type `symbol`. * + * **Details** + * * This predicate refines unknown values to symbols, allowing pattern matching * on symbol types. Symbols are unique identifiers that are often used as * object keys or for creating private properties. * - * @example + * **Example** (Matching symbol values) + * * ```ts * import { Match } from "effect" * @@ -988,11 +1117,18 @@ export const symbol = Predicate.isSymbol; /** * Matches values that are instances of `Date`. * + * **When to use** + * + * Use to match `Date` instances. + * + * **Details** + * * This predicate refines unknown values to Date instances, allowing pattern * matching on Date objects. It only matches actual Date instances, not * date strings or timestamps. * - * @example + * **Example** (Matching Date instances) + * * ```ts * import { Match } from "effect" * @@ -1004,31 +1140,37 @@ export const symbol = Predicate.isSymbol; * return `Date: ${date.toISOString().split("T")[0]}` * }), * Match.when(Match.string, (str) => `Date string: ${str}`), - * Match.when( - * Match.number, - * (num) => `Timestamp: ${new Date(num).toISOString()}` - * ), * Match.orElse(() => "Not a date-related value") * ) * * console.log(processDateValue(new Date("2024-01-01"))) // "Date: 2024-01-01" * console.log(processDateValue(new Date("invalid"))) // "Invalid date" * console.log(processDateValue("2024-01-01")) // "Date string: 2024-01-01" - * console.log(processDateValue(1704067200000)) // "Timestamp: 2024-01-01T00:00:00.000Z" + * console.log(processDateValue(1704067200000)) // "Not a date-related value" * ``` * + * @see {@link instanceOf} for matching instances of any constructor + * * @category predicates * @since 4.0.0 */ export const date = Predicate.isDate; /** - * Matches objects where keys are `string` or `symbol` and values are `unknown`. + * Matches non-null objects other than arrays. * - * This predicate refines unknown values to record objects, allowing pattern - * matching on plain objects. It excludes arrays, functions, dates, and other - * special object types, matching only plain objects and object literals. + * **When to use** + * + * Use to match broad non-null, non-array object values. + * + * **Details** + * + * This predicate uses `Predicate.isObject`: it returns `true` for values whose + * runtime type is `"object"`, are not `null`, and are not arrays. It can match + * `Date`, `RegExp`, and class instances; use `instanceOf` or a more specific + * pattern when those cases need to be distinguished. + * + * **Example** (Matching record objects) * - * @example * ```ts * import { Match } from "effect" * @@ -1042,20 +1184,17 @@ export const date = Predicate.isDate; * Match.instanceOf(Array), * (arr) => `Array with ${arr.length} items` * ), - * Match.when(Match.date, () => "Date object"), * Match.orElse(() => "Not an object") * ) * - * console.log(analyzeValue({ name: "Alice", age: 30 })) - * // "Object with 2 properties: [name, age]" - * console.log(analyzeValue([1, 2, 3])) - * // "Array with 3 items" - * console.log(analyzeValue(new Date())) - * // "Date object" - * console.log(analyzeValue("hello")) - * // "Not an object" + * console.log(analyzeValue({ name: "Alice", age: 30 })) // "Object with 2 properties: [name, age]" + * console.log(analyzeValue([1, 2, 3])) // "Array with 3 items" + * console.log(analyzeValue(null)) // "Not an object" + * console.log(analyzeValue("hello")) // "Not an object" * ``` * + * @see {@link instanceOf} for matching a specific constructor + * * @category predicates * @since 4.0.0 */ @@ -1063,10 +1202,18 @@ export const record = Predicate.isObject; /** * Matches instances of a given class. * + * **When to use** + * + * Use to match values that are instances of a constructor with type-safe + * narrowing. + * + * **Details** + * * This predicate checks if a value is an instance of the specified constructor, * providing type-safe matching for class instances and built-in objects. * - * @example + * **Example** (Matching class instances) + * * ```ts * import { Match } from "effect" * @@ -1086,39 +1233,45 @@ export const record = Predicate.isObject; * Match.instanceOf(Error), * (err) => `Standard error: ${err.message}` * ), - * Match.when(Match.instanceOf(Date), (date) => `Date: ${date.toISOString()}`), * Match.when( * Match.instanceOf(Array), * (arr) => `Array with ${arr.length} items` * ), + * Match.when( + * Match.instanceOf(Map), + * (map) => `Map with ${map.size} entries` + * ), * Match.orElse((value) => `Other: ${typeof value}`) * ) * - * console.log(handleValue(new CustomError("Failed", 404))) - * // Output: "Custom error: Failed (code: 404)" - * - * console.log(handleValue(new Error("Generic error"))) - * // Output: "Standard error: Generic error" - * - * console.log(handleValue(new Date())) - * // Output: "Date: 2024-01-01T00:00:00.000Z" - * - * console.log(handleValue([1, 2, 3])) - * // Output: "Array with 3 items" + * console.log(handleValue(new CustomError("Failed", 404))) // "Custom error: Failed (code: 404)" + * console.log(handleValue(new Error("Generic error"))) // "Standard error: Generic error" + * console.log(handleValue([1, 2, 3])) // "Array with 3 items" + * console.log(handleValue(new Map([["count", 1]]))) // "Map with 1 entries" * ``` * - * @category Predicates + * @see {@link instanceOfUnsafe} for constructor matching without the same type-safety guarantee + * @see {@link record} for matching broad non-null, non-array objects + * + * @category predicates * @since 4.0.0 */ export const instanceOf = internal.instanceOf; /** - * Unsafe variant of `instanceOf` that allows matching without type narrowing. + * Checks whether a value is an instance of a constructor without type-safe narrowing. + * + * **When to use** + * + * Use when you need constructor matching to use the unsafe refinement type. + * + * **Details** * * This predicate checks if a value is an instance of the specified constructor * but doesn't provide the same type safety guarantees as the regular `instanceOf`. * Use this when you need more flexibility but understand the type safety implications. * - * @example + * **Example** (Matching class instances unsafely) + * * ```ts * import { Match } from "effect" * @@ -1139,6 +1292,8 @@ export const instanceOf = internal.instanceOf; * ) * ``` * + * @see {@link instanceOf} for type-safe constructor matching + * * @category predicates * @since 4.0.0 */ @@ -1146,6 +1301,10 @@ export const instanceOfUnsafe = internal.instanceOf; /** * Provides a fallback value when no patterns match. * + * **When to use** + * + * Use to finalize a matcher with a fallback for unmatched input. + * * **Details** * * This function ensures that a matcher always returns a valid result, even if @@ -1153,7 +1312,7 @@ export const instanceOfUnsafe = internal.instanceOf; * `default` clause in a `switch` statement or the final `else` in an `if-else` * chain. * - * @example (Providing a Default Value When No Patterns Match) + * **Example** (Providing a Default Value When No Patterns Match) * * ```ts * import { Match } from "effect" @@ -1173,13 +1332,22 @@ export const instanceOfUnsafe = internal.instanceOf; * // Output: "fallback" * ``` * - * @category Completion + * @see {@link option} for finalizing unmatched input as `Option.none` + * @see {@link result} for returning unmatched input as a `Result` failure + * @see {@link orElseAbsurd} for finalizing when unmatched input should be impossible + * + * @category completion * @since 4.0.0 */ export const orElse = internal.orElse; // TODO(4.0): Rename to "orThrow"? Like Result.getOrThrow /** - * Throws an error if no pattern matches. + * Returns a matcher that throws an error if no pattern matches. + * + * **When to use** + * + * Use to finalize a matcher when every remaining unmatched case should be + * impossible. * * **Details** * @@ -1191,7 +1359,8 @@ export const orElse = internal.orElse; * When used, this function removes the need for an explicit fallback case and * ensures that an unmatched value is never silently ignored. * - * @example + * **Example** (Throwing on unmatched input) + * * ```ts * import { Match } from "effect" * @@ -1209,6 +1378,9 @@ export const orElse = internal.orElse; * // strictMatcher("c" as any) // throws * ``` * + * @see {@link exhaustive} for compile-time exhaustive matcher finalization + * @see {@link orElse} for providing a fallback for unmatched input + * * @category completion * @since 4.0.0 */ @@ -1228,7 +1400,7 @@ export const orElseAbsurd = internal.orElseAbsurd; * unmatched case should be explicitly handled rather than returning a default * value or throwing an error. * - * @example (Extracting a User Role with `Match.result`) + * **Example** (Extracting a User Role with `Match.result`) * * ```ts * import { Match } from "effect" @@ -1249,13 +1421,18 @@ export const orElseAbsurd = internal.orElseAbsurd; * // Output: { _id: 'Result', _tag: 'Err', err: { role: 'viewer' } } * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ export const result = internal.result; /** * Wraps the match result in an `Option`, representing an optional match. * + * **When to use** + * + * Use to finalize a matcher when unmatched input is expected and should become + * `Option.none`. + * * **Details** * * This function ensures that the result of a matcher is wrapped in an `Option`, @@ -1266,7 +1443,7 @@ export const result = internal.result; * handled explicitly rather than throwing an error or returning a default * value. * - * @example (Extracting a User Role with `Match.option`) + * **Example** (Extracting a User Role with `Match.option`) * * ```ts * import { Match } from "effect" @@ -1287,17 +1464,27 @@ export const result = internal.result; * // Output: { _id: 'Option', _tag: 'None' } * ``` * - * @category Completion + * @see {@link result} for preserving unmatched input as a `Result` failure + * @see {@link orElse} for replacing unmatched input with a fallback value + * + * @category completion * @since 4.0.0 */ export const option = internal.option; /** - * The `Match.exhaustive` method finalizes the pattern matching process by - * ensuring that all possible cases are accounted for. If any case is missing, - * TypeScript will produce a type error. This is particularly useful when - * working with unions, as it helps prevent unintended gaps in pattern matching. + * Completes a matcher that handles every remaining input case. + * + * **When to use** * - * @example (Ensuring All Cases Are Covered) + * Use to require TypeScript to reject incomplete matcher definitions before the + * matcher is turned into a function. + * + * **Details** + * + * If any case is still unmatched, the matcher does not type-check as + * exhaustive. + * + * **Example** (Ensuring All Cases Are Covered) * * ```ts * import { Match } from "effect" @@ -1313,7 +1500,7 @@ export const option = internal.option; * ) * ``` * - * @category Completion + * @category completion * @since 4.0.0 */ export const exhaustive = internal.exhaustive; diff --git a/.opencode/node_modules/effect/dist/Match.js.map b/.opencode/node_modules/effect/dist/Match.js.map index 984480e0a910e226c9b49603d6ddc5e705d2c044..ff864fb448118f8866fbd9e1083ea012a0ffc587 100644 --- a/.opencode/node_modules/effect/dist/Match.js.map +++ b/.opencode/node_modules/effect/dist/Match.js.map @@ -1 +1 @@ -{"version":3,"file":"Match.js","names":["internal","Predicate","TypeId","type","value","valueTags","typeTags","withReturnType","when","whenOr","whenAnd","discriminator","discriminatorStartsWith","discriminators","discriminatorsExhaustive","tag","tagStartsWith","tags","tagsExhaustive","not","nonEmptyString","is","string","isString","number","isNumber","any","defined","boolean","isBoolean","_undefined","isUndefined","undefined","_null","isNull","null","bigint","isBigInt","symbol","isSymbol","date","isDate","record","isObject","instanceOf","instanceOfUnsafe","orElse","orElseAbsurd","result","option","exhaustive","SafeRefinementId","Fail","Symbol","for"],"sources":["../src/Match.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAO,KAAKA,QAAQ,MAAM,uBAAuB;AAGjD,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAK3C,MAAMC,MAAM,GAAGF,QAAQ,CAACE,MAAM;AAqN9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,OAAO,MAAMC,IAAI,GAA+DH,QAAQ,CAACG,IAAI;AAE7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,OAAO,MAAMC,KAAK,GAEmCJ,QAAQ,CAACI,KAAK;AAEnE;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,CAACC,GAAG,CAAC,aAAa,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Match.js","names":["internal","Predicate","TypeId","type","value","valueTags","typeTags","withReturnType","when","whenOr","whenAnd","discriminator","discriminatorStartsWith","discriminators","discriminatorsExhaustive","tag","tagStartsWith","tags","tagsExhaustive","not","nonEmptyString","is","string","isString","number","isNumber","any","defined","boolean","isBoolean","_undefined","isUndefined","undefined","_null","isNull","null","bigint","isBigInt","symbol","isSymbol","date","isDate","record","isObject","instanceOf","instanceOfUnsafe","orElse","orElseAbsurd","result","option","exhaustive","SafeRefinementId","Fail","Symbol","for"],"sources":["../src/Match.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;AAYA,OAAO,KAAKA,QAAQ,MAAM,uBAAuB;AAGjD,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAK3C,MAAMC,MAAM,GAAGF,QAAQ,CAACE,MAAM;AAwN9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,OAAO,MAAMC,IAAI,GAA+DH,QAAQ,CAACG,IAAI;AAE7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,OAAO,MAAMC,KAAK,GAEmCJ,QAAQ,CAACI,KAAK;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,OAAO,MAAMC,SAAS,GAuElBL,QAAQ,CAACK,SAAS;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,OAAO,MAAMC,QAAQ,GA+GjBN,QAAQ,CAACM,QAAQ;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,MAAMC,cAAc,GAGmCP,QAAQ,CAACO,cAAc;AAErF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,OAAO,MAAMC,IAAI,GAiBbR,QAAQ,CAACQ,IAA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d87c3077ebbd4 100644 --- a/.opencode/node_modules/effect/dist/Metric.d.ts +++ b/.opencode/node_modules/effect/dist/Metric.d.ts @@ -1,140 +1,14 @@ /** - * @since 2.0.0 - * - * The `Metric` module provides a comprehensive system for collecting, aggregating, and observing - * application metrics in Effect applications. It offers type-safe, concurrent metrics that can - * be used to monitor performance, track business metrics, and gain insights into application behavior. - * - * ## Key Features - * - * - **Five Metric Types**: Counters, Gauges, Frequencies, Histograms, and Summaries - * - **Type Safety**: Fully typed metrics with compile-time guarantees - * - **Concurrency Safe**: Thread-safe metrics that work with Effect's concurrency model - * - **Attributes**: Tag metrics with key-value attributes for filtering and grouping - * - **Snapshots**: Take point-in-time snapshots of all metrics for reporting - * - **Runtime Integration**: Automatic fiber runtime metrics collection - * - * ## Metric Types - * - * ### Counter - * Tracks cumulative values that only increase or can be reset to zero. - * Perfect for counting events, requests, errors, etc. - * - * ### Gauge - * Represents a single numerical value that can go up or down. - * Ideal for current resource usage, temperature, queue sizes, etc. - * - * ### Frequency - * Counts occurrences of discrete string values. - * Useful for tracking categorical data like HTTP status codes, user actions, etc. - * - * ### Histogram - * Records observations in configurable buckets to analyze distribution. - * Great for response times, request sizes, and other measured values. - * - * ### Summary - * Calculates quantiles over a sliding time window. - * Provides statistical insights into value distributions over time. - * - * ## Basic Usage - * - * ```ts - * import { Effect, Metric } from "effect" - * - * // Create metrics - * const requestCount = Metric.counter("http_requests_total", { - * description: "Total number of HTTP requests" - * }) - * - * const responseTime = Metric.histogram("http_response_time", { - * description: "HTTP response time in milliseconds", - * boundaries: Metric.linearBoundaries({ start: 0, width: 50, count: 20 }) - * }) - * - * // Use metrics in your application - * const handleRequest = Effect.gen(function*() { - * yield* Metric.update(requestCount, 1) - * - * const startTime = yield* Effect.clockWith((clock) => clock.currentTimeMillis) - * - * // Process request... - * yield* Effect.sleep("100 millis") - * - * const endTime = yield* Effect.clockWith((clock) => clock.currentTimeMillis) - * yield* Metric.update(responseTime, endTime - startTime) - * }) - * ``` - * - * ## Attributes and Tagging - * - * ```ts - * import { Effect, Metric } from "effect" - * - * const requestCount = Metric.counter("requests", { - * description: "Number of requests by endpoint and method" - * }) + * Records and reads measurements from Effect programs. * - * const program = Effect.gen(function*() { - * // Add attributes to metrics - * yield* Metric.update( - * Metric.withAttributes(requestCount, { - * endpoint: "/api/users", - * method: "GET" - * }), - * 1 - * ) - * - * // Or use withAttributes for compile-time attributes - * const taggedCounter = Metric.withAttributes(requestCount, { - * endpoint: "/api/posts", - * method: "POST" - * }) - * yield* Metric.update(taggedCounter, 1) - * }) - * ``` - * - * ## Advanced Examples - * - * ```ts - * import { Effect, Metric } from "effect" - * - * // Business metrics - * const userSignups = Metric.counter("user_signups_total") - * const activeUsers = Metric.gauge("active_users_current") - * const featureUsage = Metric.frequency("feature_usage") - * - * // Performance metrics - * const dbQueryTime = Metric.summary("db_query_duration", { - * maxAge: "5 minutes", - * maxSize: 1000, - * quantiles: [0.5, 0.9, 0.95, 0.99] - * }) - * - * const program = Effect.gen(function*() { - * // Track user signup - * yield* Metric.update(userSignups, 1) - * - * // Update active user count - * yield* Metric.update(activeUsers, 1250) - * - * // Record feature usage - * yield* Metric.update(featureUsage, "dashboard_view") - * - * // Measure database query time - * yield* Effect.timed(performDatabaseQuery).pipe( - * Effect.tap(([duration]) => Metric.update(dbQueryTime, duration)) - * ) - * }) - * - * // Get metric snapshots - * const getMetrics = Effect.gen(function*() { - * const snapshots = yield* Metric.snapshot + * A `Metric` accepts typed update values and stores an aggregated + * state that can be read directly or included in a snapshot. Metrics are used + * for counters, gauges, frequencies, histograms, summaries, and timers. This + * module includes metric constructors, update and read helpers, attributes, + * histogram boundaries, registry snapshots, text dumps, and controls for + * enabling runtime metrics. * - * for (const metric of snapshots) { - * console.log(`${metric.id}: ${JSON.stringify(metric.state)}`) - * } - * }) - * ``` + * @since 2.0.0 */ import * as Context from "./Context.ts"; import * as Duration from "./Duration.ts"; @@ -147,6 +21,8 @@ import type { Contravariant, Covariant } from "./Types.ts"; * A `Metric` represents a concurrent metric which accepts update * values of type `Input` and are aggregated to a value of type `State`. * + * **Details** + * * For example, a counter metric would have type `Metric`, * representing the fact that the metric can be updated with numbers (the amount * to increment or decrement the counter by), and the state of the counter is a @@ -160,7 +36,8 @@ import type { Contravariant, Covariant } from "./Types.ts"; * - Histograms * - Summaries * - * @example + * **Example** (Using multiple metric types) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -214,8 +91,8 @@ import type { Contravariant, Covariant } from "./Types.ts"; * }) * ``` * + * @category models * @since 2.0.0 - * @category Models */ export interface Metric extends Pipeable { readonly [TypeId]: typeof TypeId; @@ -232,10 +109,13 @@ export interface Metric extends Pipeable { /** * A Counter metric that tracks cumulative values that typically only increase. * - * Counters are useful for tracking monotonically increasing values like request counts, + * **When to use** + * + * Use when counters are useful for tracking monotonically increasing values like request counts, * bytes processed, errors encountered, or any value that accumulates over time. * - * @example + * **Example** (Using counter metrics) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -289,15 +169,16 @@ export interface Metric extends Pipeable { * }) * ``` * + * @category metrics * @since 2.0.0 - * @category Metrics */ export interface Counter extends Metric> { } /** * State interface for Counter metrics containing the current count and increment mode. * - * @example + * **Example** (Reading counter state) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -350,8 +231,8 @@ export interface Counter extends Metric { readonly count: Input extends bigint ? bigint : number; @@ -360,11 +241,14 @@ export interface CounterState { /** * A Frequency metric interface that counts occurrences of discrete string values. * - * Frequency metrics are ideal for tracking categorical data where you want to count + * **When to use** + * + * Use when frequency metrics are ideal for tracking categorical data where you want to count * how many times specific string values occur, such as HTTP status codes, user actions, * error types, or any discrete string-based events. * - * @example + * **Example** (Using frequency metrics) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -434,15 +318,16 @@ export interface CounterState { * }) * ``` * + * @category metrics * @since 2.0.0 - * @category Metrics */ export interface Frequency extends Metric { } /** * State interface for Frequency metrics containing occurrence counts for discrete string values. * - * @example + * **Example** (Reading frequency state) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -518,8 +403,8 @@ export interface Frequency extends Metric { * }) * ``` * - * @since 2.0.0 - * @category Metrics + * @category metrics + * @since 4.0.0 */ export interface FrequencyState { readonly occurrences: ReadonlyMap; @@ -527,10 +412,13 @@ export interface FrequencyState { /** * A Gauge metric that tracks instantaneous values that can go up or down. * - * Gauges are useful for tracking current state values like memory usage, CPU load, + * **When to use** + * + * Use when gauges are useful for tracking current state values like memory usage, CPU load, * active connections, queue sizes, or any value that represents a current level. * - * @example + * **Example** (Using gauge metrics) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -577,15 +465,16 @@ export interface FrequencyState { * }) * ``` * + * @category metrics * @since 2.0.0 - * @category Metrics */ export interface Gauge extends Metric> { } /** * State interface for Gauge metrics containing the current instantaneous value. * - * @example + * **Example** (Reading gauge state) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -645,8 +534,8 @@ export interface Gauge extends Metric { readonly value: Input extends bigint ? bigint : number; @@ -654,10 +543,13 @@ export interface GaugeState { /** * A Histogram metric that records observations in configurable buckets to analyze value distributions. * - * Histograms are ideal for measuring request durations, response sizes, and other continuous values + * **When to use** + * + * Use when histograms are ideal for measuring request durations, response sizes, and other continuous values * where you need to understand the distribution of values rather than just aggregates. * - * @example + * **Example** (Using histogram metrics) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -732,15 +624,16 @@ export interface GaugeState { * }) * ``` * + * @category metrics * @since 2.0.0 - * @category Metrics */ export interface Histogram extends Metric { } /** * State interface for Histogram metrics containing bucket distributions and aggregate statistics. * - * @example + * **Example** (Reading histogram state) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -818,8 +711,8 @@ export interface Histogram extends Metric { * }) * ``` * - * @since 2.0.0 - * @category Metrics + * @category metrics + * @since 4.0.0 */ export interface HistogramState { readonly buckets: ReadonlyArray<[number, number]>; @@ -831,11 +724,14 @@ export interface HistogramState { /** * A Summary metric that calculates quantiles over a sliding time window of observations. * - * Summaries provide statistical insights into value distributions by tracking specific quantiles + * **When to use** + * + * Use when summaries provide statistical insights into value distributions by tracking specific quantiles * (percentiles) such as median (50th), 95th percentile, 99th percentile, etc. They're ideal for * understanding performance characteristics like response time distributions. * - * @example + * **Example** (Using summary metrics) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -920,15 +816,16 @@ export interface HistogramState { * }) * ``` * + * @category metrics * @since 2.0.0 - * @category Metrics */ export interface Summary extends Metric { } /** * State interface for Summary metrics containing quantile calculations and aggregate statistics. * - * @example + * **Example** (Reading summary state) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1001,8 +898,8 @@ export interface Summary extends Metric { * }) * ``` * - * @since 2.0.0 - * @category Metrics + * @category metrics + * @since 4.0.0 */ export interface SummaryState { readonly quantiles: ReadonlyArray; @@ -1015,7 +912,8 @@ export interface SummaryState { * The `Metric` namespace provides a comprehensive system for collecting, aggregating, and observing * application metrics in Effect applications. * - * @example + * **Example** (Collecting application metrics) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1054,13 +952,13 @@ export interface SummaryState { * ``` * * @since 2.0.0 - * @category models */ export declare namespace Metric { /** * Union type representing all available metric types in the Effect metrics system. * - * @example + * **Example** (Inspecting metric types) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1132,14 +1030,15 @@ export declare namespace Metric { * }) * ``` * - * @since 2.0.0 * @category types + * @since 4.0.0 */ type Type = "Counter" | "Frequency" | "Gauge" | "Histogram" | "Summary"; /** * Union type for metric attributes that can be provided as either an object or array of tuples. * - * @example + * **Example** (Providing attributes in different formats) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1206,14 +1105,15 @@ export declare namespace Metric { * }) * ``` * - * @since 2.0.0 * @category types + * @since 4.0.0 */ type Attributes = AttributeSet | ReadonlyArray<[string, string]>; /** * Type for metric attributes as a readonly record of string key-value pairs. * - * @example + * **Example** (Combining metric attribute sets) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1282,14 +1182,15 @@ export declare namespace Metric { * }) * ``` * - * @since 2.0.0 * @category types + * @since 4.0.0 */ type AttributeSet = Readonly>; /** * Utility type to extract the Input type from a Metric type. * - * @example + * **Example** (Extracting metric input types) + * * ```ts * import { Metric } from "effect" * @@ -1330,14 +1231,15 @@ export declare namespace Metric { * // Metric.update(stringFrequency, 404) // ✗ Type error * ``` * - * @since 2.0.0 * @category types + * @since 4.0.0 */ type Input = A extends Metric ? _Input : never; /** * Utility type to extract the State type from a Metric type. * - * @example + * **Example** (Extracting metric state types) + * * ```ts * import { Effect, Metric } from "effect" * @@ -1387,14 +1289,15 @@ export declare namespace Metric { * }) * ``` * - * @since 2.0.0 * @category types + * @since 4.0.0 */ type State = A extends Metric ? _State : never; /** * Interface defining the core hooks for metric operations: get, update, and modify. * - * @example + * **Example** (Using metric hooks) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1430,8 +1333,8 @@ export declare namespace Metric { * }) * ``` * - * @since 2.0.0 * @category interfaces + * @since 4.0.0 */ interface Hooks { readonly get: (context: Context.Context) => State; @@ -1441,7 +1344,8 @@ export declare namespace Metric { /** * Interface containing complete metadata information about a metric. * - * @example + * **Example** (Inspecting metric metadata) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1494,8 +1398,8 @@ export declare namespace Metric { * }) * ``` * - * @since 4.0.0 * @category interfaces + * @since 4.0.0 */ interface Metadata { readonly id: string; @@ -1507,7 +1411,8 @@ export declare namespace Metric { /** * Protocol interface for metric snapshots containing metadata and current state. * - * @example + * **Example** (Inspecting metric snapshot protocols) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1565,8 +1470,8 @@ export declare namespace Metric { * }) * ``` * - * @since 4.0.0 * @category interfaces + * @since 4.0.0 */ interface SnapshotProto { readonly id: string; @@ -1578,7 +1483,8 @@ export declare namespace Metric { /** * Union type representing all possible metric snapshot types with their corresponding states. * - * @example + * **Example** (Analyzing metric snapshots) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1640,15 +1546,16 @@ export declare namespace Metric { * }) * ``` * - * @since 4.0.0 * @category types + * @since 4.0.0 */ type Snapshot = SnapshotProto<"Counter", CounterState> | SnapshotProto<"Gauge", GaugeState> | SnapshotProto<"Frequency", FrequencyState> | SnapshotProto<"Histogram", HistogramState> | SnapshotProto<"Summary", SummaryState>; } /** * Service key for the current metric attributes context. * - * @example + * **Example** (Using the current attributes key) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1690,14 +1597,27 @@ export declare namespace Metric { * }) * ``` * + * @category references * @since 4.0.0 - * @category References */ export declare const CurrentMetricAttributesKey: "effect/Metric/CurrentMetricAttributes"; /** - * Service class for managing the current metric attributes context. + * Context reference for metric attributes applied from the current Effect + * context. + * + * **When to use** + * + * Use to provide default attributes that should be merged into metric updates + * and reads in a scoped part of a program. + * + * **Details** + * + * The default value is an empty attribute set. Metric reads and updates merge + * these contextual attributes with the metric's own attributes to select the + * metric series being accessed. + * + * **Example** (Providing current metric attributes) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1725,25 +1645,48 @@ export declare const CurrentMetricAttributesKey: "effect/Metric/CurrentMetricAtt * }) * ``` * + * @category references * @since 4.0.0 - * @category References */ export declare const CurrentMetricAttributes: Context.Reference>>; /** - * Service class for accessing the current metric registry. + * Context reference for the metric registry in the current context. + * + * **When to use** + * + * Use when you need a custom metric registry for an isolated program or test + * instead of the default registry. + * + * **Details** + * + * By default, the reference creates an empty `Map` the first time it is + * resolved. Metrics register their metadata and hooks lazily in this map when + * they are read or updated. + * + * **Gotchas** + * + * Because `Context.Reference` caches default values, the default `Map` is + * shared by contexts that do not provide an override. Provide `MetricRegistry` + * with a fresh `Map` when isolation matters. + * + * @see {@link snapshot} for reading all registered metrics from the current `Effect` context + * @see {@link snapshotUnsafe} for reading all registered metrics from an explicit `Context` * + * @category references * @since 4.0.0 - * @category References */ export declare const MetricRegistry: Context.Reference>>; declare const TypeId = "~effect/observability/Metric"; /** * Returns `true` if the specified value is a `Metric`, otherwise returns `false`. * - * This function is useful for runtime type checking and ensuring that a value + * **When to use** + * + * Use when you need runtime type checking and ensuring that a value * conforms to the Metric interface before performing metric operations. * - * @example + * **Example** (Checking metric values) + * * ```ts * import { Metric } from "effect" * @@ -1757,8 +1700,8 @@ declare const TypeId = "~effect/observability/Metric"; * console.log(Metric.isMetric(null)) // false * ``` * + * @category guards * @since 4.0.0 - * @category Guards */ export declare const isMetric: (u: unknown) => u is Metric; /** @@ -1766,15 +1709,15 @@ export declare const isMetric: (u: unknown) => u is Metric; * time. Counters can be incremented and decremented and provide a running total * of changes. * - * **Options** + * **Details** * - * - `description` - A description of the `Counter`. - * - `attributes` - The attributes to associate with the `Counter`. - * - `bigint` - Indicates if the `Counter` should use the `bigint` type. - * - `incremental` - Set to `true` to create a `Counter` that can only ever be - * incremented. + * The optional `description` describes the counter, and `attributes` attach + * dimensions to it. Set `bigint` to create a counter that accepts `bigint` + * inputs. Set `incremental` to `true` to create a counter that can only ever be + * incremented. + * + * **Example** (Creating counter metrics) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1816,8 +1759,8 @@ export declare const isMetric: (u: unknown) => u is Metric; * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export declare const counter: { /** @@ -1825,15 +1768,15 @@ export declare const counter: { * time. Counters can be incremented and decremented and provide a running total * of changes. * - * **Options** + * **Details** + * + * The optional `description` describes the counter, and `attributes` attach + * dimensions to it. Set `bigint` to create a counter that accepts `bigint` + * inputs. Set `incremental` to `true` to create a counter that can only ever be + * incremented. * - * - `description` - A description of the `Counter`. - * - `attributes` - The attributes to associate with the `Counter`. - * - `bigint` - Indicates if the `Counter` should use the `bigint` type. - * - `incremental` - Set to `true` to create a `Counter` that can only ever be - * incremented. + * **Example** (Creating counter metrics) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1875,8 +1818,8 @@ export declare const counter: { * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ (name: string, options?: { readonly description?: string | undefined; @@ -1889,15 +1832,15 @@ export declare const counter: { * time. Counters can be incremented and decremented and provide a running total * of changes. * - * **Options** + * **Details** * - * - `description` - A description of the `Counter`. - * - `attributes` - The attributes to associate with the `Counter`. - * - `bigint` - Indicates if the `Counter` should use the `bigint` type. - * - `incremental` - Set to `true` to create a `Counter` that can only ever be - * incremented. + * The optional `description` describes the counter, and `attributes` attach + * dimensions to it. Set `bigint` to create a counter that accepts `bigint` + * inputs. Set `incremental` to `true` to create a counter that can only ever be + * incremented. + * + * **Example** (Creating counter metrics) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1939,8 +1882,8 @@ export declare const counter: { * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ (name: string, options: { readonly description?: string | undefined; @@ -1953,16 +1896,19 @@ export declare const counter: { * Represents a `Gauge` metric that tracks and reports a single numerical value * at a specific moment. * - * Gauges are most suitable for metrics that represent instantaneous values, - * such as memory usage or CPU load. + * **When to use** + * + * Use when you need a metric for instantaneous values, such as memory usage or + * CPU load. + * + * **Details** * - * **Options** + * The optional `description` describes the gauge, and `attributes` attach + * dimensions to it. Set `bigint` to create a gauge that accepts `bigint` + * inputs. * - * - `description` - A description of the `Gauge`. - * - `attributes` - The attributes to associate with the `Gauge`. - * - `bigint` - Indicates if the `Gauge` should use the `bigint` type. + * **Example** (Creating gauge metrics) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -2009,24 +1955,27 @@ export declare const counter: { * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export declare const gauge: { /** * Represents a `Gauge` metric that tracks and reports a single numerical value * at a specific moment. * - * Gauges are most suitable for metrics that represent instantaneous values, - * such as memory usage or CPU load. + * **When to use** * - * **Options** + * Use when you need a metric for instantaneous values, such as memory usage or + * CPU load. * - * - `description` - A description of the `Gauge`. - * - `attributes` - The attributes to associate with the `Gauge`. - * - `bigint` - Indicates if the `Gauge` should use the `bigint` type. + * **Details** + * + * The optional `description` describes the gauge, and `attributes` attach + * dimensions to it. Set `bigint` to create a gauge that accepts `bigint` + * inputs. + * + * **Example** (Creating gauge metrics) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -2073,8 +2022,8 @@ export declare const gauge: { * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ (name: string, options?: { readonly description?: string | undefined; @@ -2085,16 +2034,19 @@ export declare const gauge: { * Represents a `Gauge` metric that tracks and reports a single numerical value * at a specific moment. * - * Gauges are most suitable for metrics that represent instantaneous values, - * such as memory usage or CPU load. + * **When to use** + * + * Use when you need a metric for instantaneous values, such as memory usage or + * CPU load. + * + * **Details** * - * **Options** + * The optional `description` describes the gauge, and `attributes` attach + * dimensions to it. Set `bigint` to create a gauge that accepts `bigint` + * inputs. * - * - `description` - A description of the `Gauge`. - * - `attributes` - The attributes to associate with the `Gauge`. - * - `bigint` - Indicates if the `Gauge` should use the `bigint` type. + * **Example** (Creating gauge metrics) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -2141,8 +2093,8 @@ export declare const gauge: { * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ (name: string, options: { readonly description?: string | undefined; @@ -2154,17 +2106,19 @@ export declare const gauge: { * Creates a `Frequency` metric which can be used to count the number of * occurrences of a string. * - * Frequency metrics are most suitable for counting the number of times a - * specific event or incident occurs. + * **When to use** * - * **Options** + * Use when you need a metric for counting how often a specific event or + * incident occurs. * - * - `description` - A description of the `Frequency`. - * - `attributes` - The attributes to associate with the `Frequency`. - * - `preregisteredWords` - Occurrences which are pre-registered with the - * `Frequency` metric occurrences. + * **Details** + * + * The optional `description` describes the frequency, and `attributes` attach + * dimensions to it. Use `preregisteredWords` to initialize occurrence counts + * for known string values before updates arrive. + * + * **Example** (Creating frequency metrics) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -2222,8 +2176,8 @@ export declare const gauge: { * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export declare const frequency: (name: string, options?: { readonly description?: string | undefined; @@ -2233,16 +2187,19 @@ export declare const frequency: (name: string, options?: { /** * Represents a `Histogram` metric that records observations into buckets. * - * Histogram metrics are most suitable for measuring the distribution of values - * within a range. + * **When to use** + * + * Use when you need a metric for measuring the distribution of values within a + * range. + * + * **Details** * - * **Options** + * The optional `description` describes the histogram, and `attributes` attach + * dimensions to it. The required `boundaries` option defines the histogram + * bucket boundaries. * - * - `description` - A description of the `Histogram`. - * - `attributes` - The attributes to associate with the `Histogram`. - * - `boundaries` - The bucket boundaries of the `Histogram` + * **Example** (Creating histogram metrics) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -2297,8 +2254,8 @@ export declare const frequency: (name: string, options?: { * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export declare const histogram: (name: string, options: { readonly description?: string | undefined; @@ -2309,18 +2266,20 @@ export declare const histogram: (name: string, options: { * Creates a `Summary` metric that records observations and calculates quantiles * which takes a value as input and uses the current time. * - * Summary metrics are most suitable for providing statistical information about - * a set of values, including quantiles. + * **When to use** * - * **Options** + * Use when you need a metric that records statistical information about a set + * of values, including quantiles. * - * - `description` - An description of the `Summary`. - * - `attributes` - The attributes to associate with the `Summary`. - * - `maxAge` - The maximum age of observations to retain. - * - `maxSize` - The maximum number of observations to keep. - * - `quantiles` - An array of quantiles to calculate (e.g., [0.5, 0.9]). + * **Details** + * + * The optional `description` describes the summary, and `attributes` attach + * dimensions to it. `maxAge` controls how long observations are retained, + * `maxSize` controls how many observations are kept, and `quantiles` lists the + * quantiles to calculate, such as `[0.5, 0.9]`. + * + * **Example** (Creating summary metrics) * - * @example * ```ts * import { Data, Duration, Effect, Metric } from "effect" * @@ -2346,13 +2305,10 @@ export declare const histogram: (name: string, options: { * attributes: { service: "upload-service" } * }) * - * // Simulate recording various response times over time - * for (let i = 0; i < 20; i++) { - * const responseTime = 50 + Math.random() * 200 // 50-250ms + * // Record deterministic response times + * const responseTimes = [82, 96, 104, 118, 135, 170, 210, 240] + * for (const responseTime of responseTimes) { * yield* Metric.update(responseTimeSummary, responseTime) - * - * // Wait a bit to simulate different timestamps - * yield* Effect.sleep(Duration.millis(100)) * } * * // Record some payload sizes @@ -2365,20 +2321,28 @@ export declare const histogram: (name: string, options: { * const responseStats = yield* Metric.value(responseTimeSummary) * const payloadStats = yield* Metric.value(payloadSizeSummary) * - * // responseStats will contain: - * // - quantiles: [[0.5, Some(125)], [0.9, Some(220)], [0.95, Some(235)], [0.99, Some(245)]] - * // - count: 20, min: ~50, max: ~250, sum: ~2500 - * // - Only observations from the last 5 minutes are included + * console.log({ + * count: responseStats.count, + * min: responseStats.min, + * max: responseStats.max, + * sum: responseStats.sum + * }) // { count: 8, min: 82, max: 240, sum: 1155 } + * + * console.log({ + * count: payloadStats.count, + * min: payloadStats.min, + * max: payloadStats.max, + * sum: payloadStats.sum + * }) // { count: 4, min: 1.2, max: 15.6, sum: 26 } * - * // payloadStats will contain quantile information for recent payload sizes - * // Older observations automatically age out based on maxAge setting + * // Both summaries include quantile information for their configured windows. * * return { responseStats, payloadStats } * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export declare const summary: (name: string, options: { readonly description?: string | undefined; @@ -2388,21 +2352,26 @@ export declare const summary: (name: string, options: { readonly quantiles: ReadonlyArray; }) => Summary; /** - * Creates a `Summary` metric that records observations and calculates quantiles - * which takes a value and the current timestamp as input. + * Creates a `Summary` metric that records observations with explicit + * timestamps and calculates quantiles. + * + * **When to use** + * + * Use when you need a metric that records statistical information about a set + * of values together with timestamps. * - * Summary metrics are most suitable for providing statistical information about - * a set of values, including quantiles. + * **Details** * - * **Options** + * Inputs to this metric are `[value, timestamp]` pairs; the current clock is + * used when reading quantiles against the configured `maxAge`. * - * - `description` - An description of the `Summary`. - * - `attributes` - The attributes to associate with the `Summary`. - * - `maxAge` - The maximum age of observations to retain. - * - `maxSize` - The maximum number of observations to keep. - * - `quantiles` - An array of quantiles to calculate (e.g., [0.5, 0.9]). + * The optional `description` describes the summary, and `attributes` attach + * dimensions to it. `maxAge` controls how long observations are retained, + * `maxSize` controls how many observations are kept, and `quantiles` lists the + * quantiles to calculate, such as `[0.5, 0.9]`. + * + * **Example** (Creating summaries with explicit timestamps) * - * @example * ```ts * import { Metric } from "effect" * @@ -2417,8 +2386,8 @@ export declare const summary: (name: string, options: { * ) * ``` * - * @since 2.0.0 - * @category Constructors + * @category constructors + * @since 4.0.0 */ export declare const summaryWithTimestamp: (name: string, options: { readonly description?: string | undefined; @@ -2431,13 +2400,16 @@ export declare const summaryWithTimestamp: (name: string, options: { * Creates a timer metric, based on a `Histogram`, which keeps track of * durations in milliseconds. * + * **Details** + * * The unit of time will automatically be added to the metric as a tag (i.e. * `"time_unit: milliseconds"`). * * If `options.boundaries` is not provided, the boundaries will be computed * using `Metric.exponentialBoundaries({ start: 0.5, factor: 2, count: 35 })`. * - * @example + * **Example** (Recording durations with a timer) + * * ```ts * import { Data, Duration, Effect, Metric } from "effect" * @@ -2451,19 +2423,23 @@ export declare const summaryWithTimestamp: (name: string, options: { * attributes: { service: "user-api" } * }) * - * // Simulate an API operation and measure its duration + * // Record a measured API operation duration * const apiOperation = Effect.gen(function*() { - * const start = Date.now() - * yield* Effect.sleep(Duration.millis(100)) // Simulate work - * const duration = Duration.millis(Date.now() - start) - * - * // Update the timer with the measured duration + * const duration = Duration.millis(120) * yield* Metric.update(apiRequestTimer, duration) + * + * const state = yield* Metric.value(apiRequestTimer) + * console.log({ + * count: state.count, + * min: state.min, + * max: state.max, + * sum: state.sum + * }) // { count: 1, min: 120, max: 120, sum: 120 } * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export declare const timer: (name: string, options?: { readonly description?: string | undefined; @@ -2473,15 +2449,17 @@ export declare const timer: (name: string, options?: { /** * Retrieves the current state of the specified `Metric`. * - * This function returns an Effect that, when executed, will provide the current - * aggregated state of the metric. The state type depends on the metric type: - * - Counter: `{ count: number | bigint }` - * - Gauge: `{ value: number | bigint }` - * - Frequency: `{ occurrences: Map }` - * - Histogram: `{ buckets: Array<[number, number]>, count: number, min: number, max: number, sum: number }` - * - Summary: `{ quantiles: Array<[number, number | undefined]>, count: number, min: number, max: number, sum: number }` + * **Details** + * + * The returned state depends on the metric type. Counters return + * `CounterState` with `count` and `incremental`, gauges return + * `GaugeState` with `value`, frequencies return + * `FrequencyState` with `occurrences`, histograms return `HistogramState` with + * buckets, count, min, max, and sum, and summaries return `SummaryState` with + * quantiles, count, min, max, and sum. + * + * **Example** (Reading metric state) * - * @example * ```ts * import { Effect, Metric } from "effect" * @@ -2509,21 +2487,23 @@ export declare const timer: (name: string, options?: { * }) * ``` * + * @category getters * @since 2.0.0 - * @category Utilities */ export declare const value: (self: Metric) => Effect; /** * Modifies the metric with the specified input. * - * The behavior of `modify` depends on the metric type: - * - **Counter**: Adds the input value to the current count - * - **Gauge**: Adds the input value to the current gauge value - * - **Frequency**: Same as `update` - increments the occurrence count for the input string - * - **Histogram**: Same as `update` - records the input value in the appropriate bucket - * - **Summary**: Same as `update` - records the input observation + * **Details** + * + * The behavior of `modify` depends on the metric type. Counters add the input + * value to the current count, gauges add the input value to the current gauge + * value, frequencies increment the occurrence count for the input string, + * histograms record the input value in the appropriate bucket, and summaries + * record the input observation. + * + * **Example** (Modifying metric values) * - * @example * ```ts * import { Effect, Metric } from "effect" * @@ -2550,21 +2530,23 @@ export declare const value: (self: Metric) => Effect * }) * ``` * - * @since 2.0.0 - * @category Utilities + * @category mutations + * @since 3.6.5 */ export declare const modify: { /** * Modifies the metric with the specified input. * - * The behavior of `modify` depends on the metric type: - * - **Counter**: Adds the input value to the current count - * - **Gauge**: Adds the input value to the current gauge value - * - **Frequency**: Same as `update` - increments the occurrence count for the input string - * - **Histogram**: Same as `update` - records the input value in the appropriate bucket - * - **Summary**: Same as `update` - records the input observation + * **Details** + * + * The behavior of `modify` depends on the metric type. Counters add the input + * value to the current count, gauges add the input value to the current gauge + * value, frequencies increment the occurrence count for the input string, + * histograms record the input value in the appropriate bucket, and summaries + * record the input observation. + * + * **Example** (Modifying metric values) * - * @example * ```ts * import { Effect, Metric } from "effect" * @@ -2591,21 +2573,23 @@ export declare const modify: { * }) * ``` * - * @since 2.0.0 - * @category Utilities + * @category mutations + * @since 3.6.5 */ (input: Input): (self: Metric) => Effect; /** * Modifies the metric with the specified input. * - * The behavior of `modify` depends on the metric type: - * - **Counter**: Adds the input value to the current count - * - **Gauge**: Adds the input value to the current gauge value - * - **Frequency**: Same as `update` - increments the occurrence count for the input string - * - **Histogram**: Same as `update` - records the input value in the appropriate bucket - * - **Summary**: Same as `update` - records the input observation + * **Details** + * + * The behavior of `modify` depends on the metric type. Counters add the input + * value to the current count, gauges add the input value to the current gauge + * value, frequencies increment the occurrence count for the input string, + * histograms record the input value in the appropriate bucket, and summaries + * record the input observation. + * + * **Example** (Modifying metric values) * - * @example * ```ts * import { Effect, Metric } from "effect" * @@ -2632,22 +2616,24 @@ export declare const modify: { * }) * ``` * - * @since 2.0.0 - * @category Utilities + * @category mutations + * @since 3.6.5 */ (self: Metric, input: Input): Effect; }; /** * Updates the metric with the specified input. * - * The behavior of `update` depends on the metric type: - * - **Counter**: Adds the input value to the current count (same as `modify`) - * - **Gauge**: Sets the gauge to the specified value (replaces current value) - * - **Frequency**: Increments the occurrence count for the input string by 1 - * - **Histogram**: Records the input value in the appropriate bucket - * - **Summary**: Records the input value as a new observation + * **Details** + * + * The behavior of `update` depends on the metric type. Counters add the input + * value to the current count, gauges replace the current value with the input + * value, frequencies increment the occurrence count for the input string, + * histograms record the input value in the appropriate bucket, and summaries + * record the input value as a new observation. + * + * **Example** (Updating metric values) * - * @example * ```ts * import { Effect, Metric } from "effect" * @@ -2683,21 +2669,23 @@ export declare const modify: { * }) * ``` * + * @category mutations * @since 2.0.0 - * @category Utilities */ export declare const update: { /** * Updates the metric with the specified input. * - * The behavior of `update` depends on the metric type: - * - **Counter**: Adds the input value to the current count (same as `modify`) - * - **Gauge**: Sets the gauge to the specified value (replaces current value) - * - **Frequency**: Increments the occurrence count for the input string by 1 - * - **Histogram**: Records the input value in the appropriate bucket - * - **Summary**: Records the input value as a new observation + * **Details** + * + * The behavior of `update` depends on the metric type. Counters add the input + * value to the current count, gauges replace the current value with the input + * value, frequencies increment the occurrence count for the input string, + * histograms record the input value in the appropriate bucket, and summaries + * record the input value as a new observation. + * + * **Example** (Updating metric values) * - * @example * ```ts * import { Effect, Metric } from "effect" * @@ -2733,21 +2721,23 @@ export declare const update: { * }) * ``` * + * @category mutations * @since 2.0.0 - * @category Utilities */ (input: Input): (self: Metric) => Effect; /** * Updates the metric with the specified input. * - * The behavior of `update` depends on the metric type: - * - **Counter**: Adds the input value to the current count (same as `modify`) - * - **Gauge**: Sets the gauge to the specified value (replaces current value) - * - **Frequency**: Increments the occurrence count for the input string by 1 - * - **Histogram**: Records the input value in the appropriate bucket - * - **Summary**: Records the input value as a new observation + * **Details** + * + * The behavior of `update` depends on the metric type. Counters add the input + * value to the current count, gauges replace the current value with the input + * value, frequencies increment the occurrence count for the input string, + * histograms record the input value in the appropriate bucket, and summaries + * record the input value as a new observation. + * + * **Example** (Updating metric values) * - * @example * ```ts * import { Effect, Metric } from "effect" * @@ -2783,8 +2773,8 @@ export declare const update: { * }) * ``` * + * @category mutations * @since 2.0.0 - * @category Utilities */ (self: Metric, input: Input): Effect; }; @@ -2793,7 +2783,8 @@ export declare const update: { * of the specified new type, which must be transformable to the input type of * this metric. * - * @example + * **Example** (Mapping metric inputs) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -2823,8 +2814,8 @@ export declare const update: { * }) * ``` * + * @category mapping * @since 2.0.0 - * @category Mapping */ export declare const mapInput: { /** @@ -2832,7 +2823,8 @@ export declare const mapInput: { * of the specified new type, which must be transformable to the input type of * this metric. * - * @example + * **Example** (Mapping metric inputs) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -2862,8 +2854,8 @@ export declare const mapInput: { * }) * ``` * + * @category mapping * @since 2.0.0 - * @category Mapping */ (f: (input: Input2, context: Context.Context) => Input): (self: Metric) => Metric; /** @@ -2871,7 +2863,8 @@ export declare const mapInput: { * of the specified new type, which must be transformable to the input type of * this metric. * - * @example + * **Example** (Mapping metric inputs) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -2901,8 +2894,8 @@ export declare const mapInput: { * }) * ``` * + * @category mapping * @since 2.0.0 - * @category Mapping */ (self: Metric, f: (input: Input2, context: Context.Context) => Input): Metric; }; @@ -2911,7 +2904,8 @@ export declare const mapInput: { * of any type, and translates them to updates with the specified constant * update value. * - * @example + * **Example** (Ignoring inputs with a constant value) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -2938,8 +2932,8 @@ export declare const mapInput: { * }) * ``` * - * @since 2.0.0 * @category Input + * @since 2.0.0 */ export declare const withConstantInput: { /** @@ -2947,7 +2941,8 @@ export declare const withConstantInput: { * of any type, and translates them to updates with the specified constant * update value. * - * @example + * **Example** (Ignoring inputs with a constant value) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -2974,8 +2969,8 @@ export declare const withConstantInput: { * }) * ``` * - * @since 2.0.0 * @category Input + * @since 2.0.0 */ (input: Input): (self: Metric) => Metric; /** @@ -2983,7 +2978,8 @@ export declare const withConstantInput: { * of any type, and translates them to updates with the specified constant * update value. * - * @example + * **Example** (Ignoring inputs with a constant value) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -3010,19 +3006,22 @@ export declare const withConstantInput: { * }) * ``` * - * @since 2.0.0 * @category Input + * @since 2.0.0 */ (self: Metric, input: Input): Metric; }; /** * Returns a new metric that applies the specified attributes to all operations. * + * **Details** + * * Attributes are key-value pairs that provide additional context for metrics, * enabling filtering, grouping, and more detailed analysis. Each combination * of attribute values creates a separate metric series. * - * @example + * **Example** (Applying metric attributes) + * * ```ts * import { Effect, Metric } from "effect" * @@ -3067,18 +3066,21 @@ export declare const withConstantInput: { * }) * ``` * - * @since 4.0.0 * @category Attributes + * @since 4.0.0 */ export declare const withAttributes: { /** * Returns a new metric that applies the specified attributes to all operations. * + * **Details** + * * Attributes are key-value pairs that provide additional context for metrics, * enabling filtering, grouping, and more detailed analysis. Each combination * of attribute values creates a separate metric series. * - * @example + * **Example** (Applying metric attributes) + * * ```ts * import { Effect, Metric } from "effect" * @@ -3123,18 +3125,21 @@ export declare const withAttributes: { * }) * ``` * - * @since 4.0.0 * @category Attributes + * @since 4.0.0 */ (attributes: Metric.Attributes): (self: Metric) => Metric; /** * Returns a new metric that applies the specified attributes to all operations. * + * **Details** + * * Attributes are key-value pairs that provide additional context for metrics, * enabling filtering, grouping, and more detailed analysis. Each combination * of attribute values creates a separate metric series. * - * @example + * **Example** (Applying metric attributes) + * * ```ts * import { Effect, Metric } from "effect" * @@ -3179,18 +3184,21 @@ export declare const withAttributes: { * }) * ``` * - * @since 4.0.0 * @category Attributes + * @since 4.0.0 */ (self: Metric, attributes: Metric.Attributes): Metric; }; /** * Captures a snapshot of all registered metrics in the current context. * + * **Details** + * * Returns an array of metric snapshots, each containing the metric's metadata * (name, description, type) and current state (values, counts, etc.). * - * @example + * **Example** (Capturing metric snapshots) + * * ```ts * import { Console, Data, Effect, Metric } from "effect" * @@ -3229,19 +3237,22 @@ export declare const withAttributes: { * }) * ``` * - * @since 2.0.0 * @category Snapshotting + * @since 2.0.0 */ export declare const snapshot: Effect>; /** * Returns a human-readable string representation of all currently registered * metrics in a tabular format. * + * **Details** + * * This debugging utility captures a snapshot of all metrics and formats them * in an easy-to-read table showing names, descriptions, types, attributes, * and current state values. * - * @example + * **Example** (Dumping metrics as text) + * * ```ts * import { Console, Data, Effect, Metric } from "effect" * @@ -3284,19 +3295,27 @@ export declare const snapshot: Effect>; * }) * ``` * - * @since 2.0.0 * @category Debugging + * @since 4.0.0 */ export declare const dump: Effect; /** - * Synchronously captures a snapshot of all registered metrics using the provided + * Captures a snapshot of all registered metrics synchronously using the provided * service context. * + * **When to use** + * + * Use to read metric snapshots from an explicit `Context` in low-level + * integrations, exporters, or debugging tools that already have the context. + * + * **Details** + * * This is the "unsafe" version that bypasses Effect's safety guarantees and requires * manual handling of the services context. Use the safe `snapshot` function for normal * application code. * - * @example + * **Example** (Capturing snapshots from a context) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -3323,13 +3342,14 @@ export declare const dump: Effect; * * // Use snapshotUnsafe for direct, synchronous access * const snapshots = Metric.snapshotUnsafe(services) + * const exportBatchCreatedAt = 1_700_000_000_000 * * // Process snapshots immediately (useful for exporters, debugging tools) * const exportData = snapshots.map((snapshot) => ({ * name: snapshot.id, * type: snapshot.type, * value: snapshot.state, - * timestamp: Date.now() + * timestamp: exportBatchCreatedAt * })) * * // This is synchronous and doesn't involve Effect overhead @@ -3345,19 +3365,21 @@ export declare const dump: Effect; * }) * ``` * - * @since 2.0.0 * @category Snapshotting + * @since 4.0.0 */ export declare const snapshotUnsafe: (context: Context.Context) => ReadonlyArray; /** - * A helper method to create histogram bucket boundaries from an iterable set - * of values. + * Creates histogram bucket boundaries from an iterable set of values. + * + * **Details** * * Processes any iterable of numbers by removing duplicates, filtering out * non-positive values, and automatically appending positive infinity as the * final boundary. * - * @example + * **Example** (Creating boundaries from values) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -3411,18 +3433,23 @@ export declare const snapshotUnsafe: (context: Context.Context) => Readon * }) * ``` * - * @since 2.0.0 - * @category Boundaries + * @category boundaries + * @since 4.0.0 */ export declare const boundariesFromIterable: (iterable: Iterable) => ReadonlyArray; /** - * A helper method to create histogram bucket boundaries with linearly - * increasing values. + * Creates histogram bucket boundaries from a linear sequence and appends + * positive infinity. + * + * **Details** + * + * Generates `count - 1` finite boundaries using `start + width + index` for + * each zero-based index, then applies the same normalization as + * `boundariesFromIterable`: non-positive values are removed, duplicates are + * collapsed, and `Infinity` is appended. * - * Creates evenly-spaced boundaries starting from a base value and incrementing - * by a fixed width. Automatically adds positive infinity as the final boundary. + * **Example** (Creating linear boundaries) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -3431,13 +3458,12 @@ export declare const boundariesFromIterable: (iterable: Iterable) => Rea * }> {} * * // Create boundaries for response time histogram - * // Buckets: 0-100ms, 100-200ms, 200-300ms, 300-400ms, 400ms+ * const responseBoundaries = Metric.linearBoundaries({ * start: 0, // Starting point - * width: 100, // 100ms intervals + * width: 100, // Offset used for the first boundary * count: 5 // Creates 4 boundaries + infinity * }) - * console.log(responseBoundaries) // [100, 200, 300, 400, Infinity] + * console.log(responseBoundaries) // [100, 101, 102, 103, Infinity] * * // Create a histogram using these boundaries * const responseTimeHistogram = Metric.histogram("api_response_time", { @@ -3447,17 +3473,17 @@ export declare const boundariesFromIterable: (iterable: Iterable) => Rea * * const program = Effect.gen(function*() { * // Record some response times - * yield* Metric.update(responseTimeHistogram, 85) // Goes in 0-100ms bucket - * yield* Metric.update(responseTimeHistogram, 250) // Goes in 200-300ms bucket - * yield* Metric.update(responseTimeHistogram, 450) // Goes in 400ms+ bucket + * yield* Metric.update(responseTimeHistogram, 85) + * yield* Metric.update(responseTimeHistogram, 101) + * yield* Metric.update(responseTimeHistogram, 450) * * const value = yield* Metric.value(responseTimeHistogram) * return value * }) * ``` * - * @since 2.0.0 - * @category Boundaries + * @category boundaries + * @since 4.0.0 */ export declare const linearBoundaries: (options: { readonly start: number; @@ -3465,13 +3491,15 @@ export declare const linearBoundaries: (options: { readonly count: number; }) => ReadonlyArray; /** - * A helper method to create histogram bucket boundaries with exponentially - * increasing values. + * Creates histogram bucket boundaries with exponentially increasing values. + * + * **Details** * * Creates boundaries that grow exponentially, useful for metrics that span * multiple orders of magnitude. Each boundary is calculated as start * factor^i. * - * @example + * **Example** (Creating exponential boundaries) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -3512,8 +3540,8 @@ export declare const linearBoundaries: (options: { * }) * ``` * - * @since 2.0.0 - * @category Boundaries + * @category boundaries + * @since 4.0.0 */ export declare const exponentialBoundaries: (options: { readonly start: number; @@ -3523,7 +3551,8 @@ export declare const exponentialBoundaries: (options: { /** * Service key for the fiber runtime metrics service. * - * @example + * **Example** (Using the fiber runtime metrics key) + * * ```ts * import { Data, Effect, Layer, Metric } from "effect" * @@ -3553,18 +3582,18 @@ export declare const exponentialBoundaries: (options: { * }) * ``` * + * @category metrics * @since 4.0.0 - * @category Runtime Metrics */ export declare const FiberRuntimeMetricsKey: "effect/observability/Metric/FiberRuntimeMetricsKey"; /** * Interface for the fiber runtime metrics service that tracks fiber lifecycle events. * - * @example + * **Example** (Providing a custom fiber metrics service) + * * ```ts - * import type { Context } from "effect" * import { Data, Effect, Layer, Metric } from "effect" - * import type { Exit } from "effect/Exit" + * import type { Context, Exit } from "effect" * * class MetricsError extends Data.TaggedError("MetricsError")<{ * readonly operation: string @@ -3578,7 +3607,7 @@ export declare const FiberRuntimeMetricsKey: "effect/observability/Metric/FiberR * }, * recordFiberEnd: ( * context: Context.Context, - * exit: Exit + * exit: Exit.Exit * ) => { * console.log("Fiber completed with exit:", exit) * // Custom logic for tracking fiber completion based on exit status @@ -3593,17 +3622,30 @@ export declare const FiberRuntimeMetricsKey: "effect/observability/Metric/FiberR * }) * ``` * + * @category metrics * @since 4.0.0 - * @category Runtime Metrics */ export interface FiberRuntimeMetricsService { readonly recordFiberStart: (context: Context.Context) => void; readonly recordFiberEnd: (context: Context.Context, exit: Exit) => void; } /** - * Service class for managing fiber runtime metrics collection. + * Context reference for the optional service that records fiber runtime + * metrics. + * + * **When to use** + * + * Use to provide or inspect the service that receives fiber start and end + * notifications for automatic runtime metrics. + * + * **Details** + * + * When provided, the runtime can notify the service about child-fiber start and + * end events. When the reference is `undefined`, automatic fiber runtime metric + * collection is disabled. + * + * **Example** (Accessing the fiber runtime metrics service) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -3642,14 +3684,15 @@ export interface FiberRuntimeMetricsService { * }) * ``` * + * @category runtime metrics * @since 4.0.0 - * @category Runtime Metrics */ export declare const FiberRuntimeMetrics: Context.Reference; /** * Default implementation of the fiber runtime metrics service. * - * @example + * **Example** (Using the default fiber metrics implementation) + * * ```ts * import { Data, Effect, Layer, Metric } from "effect" * @@ -3687,20 +3730,21 @@ export declare const FiberRuntimeMetrics: Context.Reference; /** - * A Layer that disables automatic collection of fiber runtime metrics. + * Layer that disables automatic collection of fiber runtime metrics. + * + * **Example** (Disabling runtime metrics with a layer) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -3824,18 +3869,21 @@ export declare const enableRuntimeMetricsLayer: Layer.Layer * }) * ``` * + * @category metrics * @since 4.0.0 - * @category Runtime Metrics */ export declare const disableRuntimeMetricsLayer: Layer.Layer; /** * Enables automatic collection of fiber runtime metrics for the provided Effect. * + * **Details** + * * When enabled, automatically tracks fiber lifecycle metrics including active fibers, * started fibers, successful completions, and failures. These metrics provide valuable * insights into the concurrency patterns and health of your Effect application. * - * @example + * **Example** (Enabling runtime metrics for an effect) + * * ```ts * import { Console, Data, Effect, Layer, Metric } from "effect" * @@ -3904,18 +3952,20 @@ export declare const disableRuntimeMetricsLayer: Layer.Layer(self: Effect) => Effect; /** * Disables automatic collection of fiber runtime metrics for the provided Effect. * - * This is useful when you want to selectively disable runtime metrics for specific - * parts of your application while keeping them enabled elsewhere, or when you need - * to avoid the overhead of metrics collection in performance-critical sections. + * **When to use** + * + * Use when you need to disable runtime metrics for a specific effect while + * keeping them enabled elsewhere. + * + * **Example** (Disabling runtime metrics for an effect) * - * @example * ```ts * import { Console, Data, Effect, Layer, Metric } from "effect" * @@ -3943,7 +3993,7 @@ export declare const enableRuntimeMetrics: (self: Effect) => E * (_, i) => * Effect.gen(function*() { * // Simulate intensive computation - * const result = i * i + Math.random() + * const result = i * i + (i % 10) / 10 * return result * }) * ) @@ -3985,8 +4035,8 @@ export declare const enableRuntimeMetrics: (self: Effect) => E * ) * ``` * + * @category metrics * @since 4.0.0 - * @category Runtime Metrics */ export declare const disableRuntimeMetrics: (self: Effect) => Effect; export {}; diff --git a/.opencode/node_modules/effect/dist/Metric.d.ts.map b/.opencode/node_modules/effect/dist/Metric.d.ts.map index 9e4aa22a5f90df48880391cff04a4e30a6188b83..aa6761823909a11c1e4889c0f763ed162f43fc5b 100644 --- a/.opencode/node_modules/effect/dist/Metric.d.ts.map +++ b/.opencode/node_modules/effect/dist/Metric.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Metric.d.ts","sourceRoot":"","sources":["../src/Metric.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyIG;AAGH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAIrC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAEnC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAI7C,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,MAAM,WAAW,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAE,SAAQ,QAAQ;IAC3D,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;IAChC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,CAAA;IACpC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,CAAA;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAA;IAC1B,QAAQ,CAAC,WAAW,EAAE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AACH,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAGrF,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Metric.js b/.opencode/node_modules/effect/dist/Metric.js index 56cafd4242dbdff4d9eb59a3c2c8c19ee24f1061..031e4f2a33b84fd4a5a924678665a864333eb5c3 100644 --- a/.opencode/node_modules/effect/dist/Metric.js +++ b/.opencode/node_modules/effect/dist/Metric.js @@ -1,140 +1,14 @@ /** - * @since 2.0.0 - * - * The `Metric` module provides a comprehensive system for collecting, aggregating, and observing - * application metrics in Effect applications. It offers type-safe, concurrent metrics that can - * be used to monitor performance, track business metrics, and gain insights into application behavior. - * - * ## Key Features - * - * - **Five Metric Types**: Counters, Gauges, Frequencies, Histograms, and Summaries - * - **Type Safety**: Fully typed metrics with compile-time guarantees - * - **Concurrency Safe**: Thread-safe metrics that work with Effect's concurrency model - * - **Attributes**: Tag metrics with key-value attributes for filtering and grouping - * - **Snapshots**: Take point-in-time snapshots of all metrics for reporting - * - **Runtime Integration**: Automatic fiber runtime metrics collection - * - * ## Metric Types - * - * ### Counter - * Tracks cumulative values that only increase or can be reset to zero. - * Perfect for counting events, requests, errors, etc. - * - * ### Gauge - * Represents a single numerical value that can go up or down. - * Ideal for current resource usage, temperature, queue sizes, etc. - * - * ### Frequency - * Counts occurrences of discrete string values. - * Useful for tracking categorical data like HTTP status codes, user actions, etc. - * - * ### Histogram - * Records observations in configurable buckets to analyze distribution. - * Great for response times, request sizes, and other measured values. - * - * ### Summary - * Calculates quantiles over a sliding time window. - * Provides statistical insights into value distributions over time. - * - * ## Basic Usage - * - * ```ts - * import { Effect, Metric } from "effect" - * - * // Create metrics - * const requestCount = Metric.counter("http_requests_total", { - * description: "Total number of HTTP requests" - * }) - * - * const responseTime = Metric.histogram("http_response_time", { - * description: "HTTP response time in milliseconds", - * boundaries: Metric.linearBoundaries({ start: 0, width: 50, count: 20 }) - * }) - * - * // Use metrics in your application - * const handleRequest = Effect.gen(function*() { - * yield* Metric.update(requestCount, 1) - * - * const startTime = yield* Effect.clockWith((clock) => clock.currentTimeMillis) - * - * // Process request... - * yield* Effect.sleep("100 millis") - * - * const endTime = yield* Effect.clockWith((clock) => clock.currentTimeMillis) - * yield* Metric.update(responseTime, endTime - startTime) - * }) - * ``` - * - * ## Attributes and Tagging - * - * ```ts - * import { Effect, Metric } from "effect" - * - * const requestCount = Metric.counter("requests", { - * description: "Number of requests by endpoint and method" - * }) - * - * const program = Effect.gen(function*() { - * // Add attributes to metrics - * yield* Metric.update( - * Metric.withAttributes(requestCount, { - * endpoint: "/api/users", - * method: "GET" - * }), - * 1 - * ) - * - * // Or use withAttributes for compile-time attributes - * const taggedCounter = Metric.withAttributes(requestCount, { - * endpoint: "/api/posts", - * method: "POST" - * }) - * yield* Metric.update(taggedCounter, 1) - * }) - * ``` + * Records and reads measurements from Effect programs. * - * ## Advanced Examples + * A `Metric` accepts typed update values and stores an aggregated + * state that can be read directly or included in a snapshot. Metrics are used + * for counters, gauges, frequencies, histograms, summaries, and timers. This + * module includes metric constructors, update and read helpers, attributes, + * histogram boundaries, registry snapshots, text dumps, and controls for + * enabling runtime metrics. * - * ```ts - * import { Effect, Metric } from "effect" - * - * // Business metrics - * const userSignups = Metric.counter("user_signups_total") - * const activeUsers = Metric.gauge("active_users_current") - * const featureUsage = Metric.frequency("feature_usage") - * - * // Performance metrics - * const dbQueryTime = Metric.summary("db_query_duration", { - * maxAge: "5 minutes", - * maxSize: 1000, - * quantiles: [0.5, 0.9, 0.95, 0.99] - * }) - * - * const program = Effect.gen(function*() { - * // Track user signup - * yield* Metric.update(userSignups, 1) - * - * // Update active user count - * yield* Metric.update(activeUsers, 1250) - * - * // Record feature usage - * yield* Metric.update(featureUsage, "dashboard_view") - * - * // Measure database query time - * yield* Effect.timed(performDatabaseQuery).pipe( - * Effect.tap(([duration]) => Metric.update(dbQueryTime, duration)) - * ) - * }) - * - * // Get metric snapshots - * const getMetrics = Effect.gen(function*() { - * const snapshots = yield* Metric.snapshot - * - * for (const metric of snapshots) { - * console.log(`${metric.id}: ${JSON.stringify(metric.state)}`) - * } - * }) - * ``` + * @since 2.0.0 */ import * as Arr from "./Array.js"; import * as Context from "./Context.js"; @@ -150,7 +24,8 @@ import * as _String from "./String.js"; /** * Service key for the current metric attributes context. * - * @example + * **Example** (Using the current attributes key) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -192,14 +67,27 @@ import * as _String from "./String.js"; * }) * ``` * + * @category references * @since 4.0.0 - * @category References */ export const CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes"; /** - * Service class for managing the current metric attributes context. + * Context reference for metric attributes applied from the current Effect + * context. + * + * **When to use** + * + * Use to provide default attributes that should be merged into metric updates + * and reads in a scoped part of a program. + * + * **Details** + * + * The default value is an empty attribute set. Metric reads and updates merge + * these contextual attributes with the metric's own attributes to select the + * metric series being accessed. + * + * **Example** (Providing current metric attributes) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -227,18 +115,38 @@ export const CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes * }) * ``` * + * @category references * @since 4.0.0 - * @category References */ export const CurrentMetricAttributes = /*#__PURE__*/Context.Reference(CurrentMetricAttributesKey, { defaultValue: () => ({}) }); const MetricRegistryKey = "~effect/observability/Metric/MetricRegistryKey"; /** - * Service class for accessing the current metric registry. + * Context reference for the metric registry in the current context. + * + * **When to use** + * + * Use when you need a custom metric registry for an isolated program or test + * instead of the default registry. * + * **Details** + * + * By default, the reference creates an empty `Map` the first time it is + * resolved. Metrics register their metadata and hooks lazily in this map when + * they are read or updated. + * + * **Gotchas** + * + * Because `Context.Reference` caches default values, the default `Map` is + * shared by contexts that do not provide an override. Provide `MetricRegistry` + * with a fresh `Map` when isolation matters. + * + * @see {@link snapshot} for reading all registered metrics from the current `Effect` context + * @see {@link snapshotUnsafe} for reading all registered metrics from an explicit `Context` + * + * @category references * @since 4.0.0 - * @category References */ export const MetricRegistry = /*#__PURE__*/Context.Reference(MetricRegistryKey, { defaultValue: () => new Map() @@ -545,10 +453,13 @@ class MetricTransform extends Metric$ { /** * Returns `true` if the specified value is a `Metric`, otherwise returns `false`. * - * This function is useful for runtime type checking and ensuring that a value + * **When to use** + * + * Use when you need runtime type checking and ensuring that a value * conforms to the Metric interface before performing metric operations. * - * @example + * **Example** (Checking metric values) + * * ```ts * import { Metric } from "effect" * @@ -562,8 +473,8 @@ class MetricTransform extends Metric$ { * console.log(Metric.isMetric(null)) // false * ``` * + * @category guards * @since 4.0.0 - * @category Guards */ export const isMetric = u => Predicate.hasProperty(u, "~effect/Metric") && u["~effect/Metric"] === "~effect/Metric"; /** @@ -571,15 +482,15 @@ export const isMetric = u => Predicate.hasProperty(u, "~effect/Metric") && u["~e * time. Counters can be incremented and decremented and provide a running total * of changes. * - * **Options** + * **Details** * - * - `description` - A description of the `Counter`. - * - `attributes` - The attributes to associate with the `Counter`. - * - `bigint` - Indicates if the `Counter` should use the `bigint` type. - * - `incremental` - Set to `true` to create a `Counter` that can only ever be - * incremented. + * The optional `description` describes the counter, and `attributes` attach + * dimensions to it. Set `bigint` to create a counter that accepts `bigint` + * inputs. Set `incremental` to `true` to create a counter that can only ever be + * incremented. + * + * **Example** (Creating counter metrics) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -621,24 +532,27 @@ export const isMetric = u => Predicate.hasProperty(u, "~effect/Metric") && u["~e * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export const counter = (name, options) => new CounterMetric(name, options); /** * Represents a `Gauge` metric that tracks and reports a single numerical value * at a specific moment. * - * Gauges are most suitable for metrics that represent instantaneous values, - * such as memory usage or CPU load. + * **When to use** + * + * Use when you need a metric for instantaneous values, such as memory usage or + * CPU load. * - * **Options** + * **Details** * - * - `description` - A description of the `Gauge`. - * - `attributes` - The attributes to associate with the `Gauge`. - * - `bigint` - Indicates if the `Gauge` should use the `bigint` type. + * The optional `description` describes the gauge, and `attributes` attach + * dimensions to it. Set `bigint` to create a gauge that accepts `bigint` + * inputs. + * + * **Example** (Creating gauge metrics) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -685,25 +599,27 @@ export const counter = (name, options) => new CounterMetric(name, options); * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export const gauge = (name, options) => new GaugeMetric(name, options); /** * Creates a `Frequency` metric which can be used to count the number of * occurrences of a string. * - * Frequency metrics are most suitable for counting the number of times a - * specific event or incident occurs. + * **When to use** + * + * Use when you need a metric for counting how often a specific event or + * incident occurs. + * + * **Details** * - * **Options** + * The optional `description` describes the frequency, and `attributes` attach + * dimensions to it. Use `preregisteredWords` to initialize occurrence counts + * for known string values before updates arrive. * - * - `description` - A description of the `Frequency`. - * - `attributes` - The attributes to associate with the `Frequency`. - * - `preregisteredWords` - Occurrences which are pre-registered with the - * `Frequency` metric occurrences. + * **Example** (Creating frequency metrics) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -761,23 +677,26 @@ export const gauge = (name, options) => new GaugeMetric(name, options); * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export const frequency = (name, options) => new FrequencyMetric(name, options); /** * Represents a `Histogram` metric that records observations into buckets. * - * Histogram metrics are most suitable for measuring the distribution of values - * within a range. + * **When to use** + * + * Use when you need a metric for measuring the distribution of values within a + * range. + * + * **Details** * - * **Options** + * The optional `description` describes the histogram, and `attributes` attach + * dimensions to it. The required `boundaries` option defines the histogram + * bucket boundaries. * - * - `description` - A description of the `Histogram`. - * - `attributes` - The attributes to associate with the `Histogram`. - * - `boundaries` - The bucket boundaries of the `Histogram` + * **Example** (Creating histogram metrics) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -832,26 +751,28 @@ export const frequency = (name, options) => new FrequencyMetric(name, options); * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export const histogram = (name, options) => new HistogramMetric(name, options); /** * Creates a `Summary` metric that records observations and calculates quantiles * which takes a value as input and uses the current time. * - * Summary metrics are most suitable for providing statistical information about - * a set of values, including quantiles. + * **When to use** * - * **Options** + * Use when you need a metric that records statistical information about a set + * of values, including quantiles. * - * - `description` - An description of the `Summary`. - * - `attributes` - The attributes to associate with the `Summary`. - * - `maxAge` - The maximum age of observations to retain. - * - `maxSize` - The maximum number of observations to keep. - * - `quantiles` - An array of quantiles to calculate (e.g., [0.5, 0.9]). + * **Details** + * + * The optional `description` describes the summary, and `attributes` attach + * dimensions to it. `maxAge` controls how long observations are retained, + * `maxSize` controls how many observations are kept, and `quantiles` lists the + * quantiles to calculate, such as `[0.5, 0.9]`. + * + * **Example** (Creating summary metrics) * - * @example * ```ts * import { Data, Duration, Effect, Metric } from "effect" * @@ -877,13 +798,10 @@ export const histogram = (name, options) => new HistogramMetric(name, options); * attributes: { service: "upload-service" } * }) * - * // Simulate recording various response times over time - * for (let i = 0; i < 20; i++) { - * const responseTime = 50 + Math.random() * 200 // 50-250ms + * // Record deterministic response times + * const responseTimes = [82, 96, 104, 118, 135, 170, 210, 240] + * for (const responseTime of responseTimes) { * yield* Metric.update(responseTimeSummary, responseTime) - * - * // Wait a bit to simulate different timestamps - * yield* Effect.sleep(Duration.millis(100)) * } * * // Record some payload sizes @@ -896,38 +814,51 @@ export const histogram = (name, options) => new HistogramMetric(name, options); * const responseStats = yield* Metric.value(responseTimeSummary) * const payloadStats = yield* Metric.value(payloadSizeSummary) * - * // responseStats will contain: - * // - quantiles: [[0.5, Some(125)], [0.9, Some(220)], [0.95, Some(235)], [0.99, Some(245)]] - * // - count: 20, min: ~50, max: ~250, sum: ~2500 - * // - Only observations from the last 5 minutes are included + * console.log({ + * count: responseStats.count, + * min: responseStats.min, + * max: responseStats.max, + * sum: responseStats.sum + * }) // { count: 8, min: 82, max: 240, sum: 1155 } * - * // payloadStats will contain quantile information for recent payload sizes - * // Older observations automatically age out based on maxAge setting + * console.log({ + * count: payloadStats.count, + * min: payloadStats.min, + * max: payloadStats.max, + * sum: payloadStats.sum + * }) // { count: 4, min: 1.2, max: 15.6, sum: 26 } + * + * // Both summaries include quantile information for their configured windows. * * return { responseStats, payloadStats } * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export const summary = (name, options) => mapInput(summaryWithTimestamp(name, options), (input, context) => [input, Context.get(context, InternalEffect.ClockRef).currentTimeMillisUnsafe()]); /** - * Creates a `Summary` metric that records observations and calculates quantiles - * which takes a value and the current timestamp as input. + * Creates a `Summary` metric that records observations with explicit + * timestamps and calculates quantiles. * - * Summary metrics are most suitable for providing statistical information about - * a set of values, including quantiles. + * **When to use** * - * **Options** + * Use when you need a metric that records statistical information about a set + * of values together with timestamps. * - * - `description` - An description of the `Summary`. - * - `attributes` - The attributes to associate with the `Summary`. - * - `maxAge` - The maximum age of observations to retain. - * - `maxSize` - The maximum number of observations to keep. - * - `quantiles` - An array of quantiles to calculate (e.g., [0.5, 0.9]). + * **Details** + * + * Inputs to this metric are `[value, timestamp]` pairs; the current clock is + * used when reading quantiles against the configured `maxAge`. + * + * The optional `description` describes the summary, and `attributes` attach + * dimensions to it. `maxAge` controls how long observations are retained, + * `maxSize` controls how many observations are kept, and `quantiles` lists the + * quantiles to calculate, such as `[0.5, 0.9]`. + * + * **Example** (Creating summaries with explicit timestamps) * - * @example * ```ts * import { Metric } from "effect" * @@ -942,21 +873,24 @@ export const summary = (name, options) => mapInput(summaryWithTimestamp(name, op * ) * ``` * - * @since 2.0.0 - * @category Constructors + * @category constructors + * @since 4.0.0 */ export const summaryWithTimestamp = (name, options) => new SummaryMetric(name, options); /** * Creates a timer metric, based on a `Histogram`, which keeps track of * durations in milliseconds. * + * **Details** + * * The unit of time will automatically be added to the metric as a tag (i.e. * `"time_unit: milliseconds"`). * * If `options.boundaries` is not provided, the boundaries will be computed * using `Metric.exponentialBoundaries({ start: 0.5, factor: 2, count: 35 })`. * - * @example + * **Example** (Recording durations with a timer) + * * ```ts * import { Data, Duration, Effect, Metric } from "effect" * @@ -970,19 +904,23 @@ export const summaryWithTimestamp = (name, options) => new SummaryMetric(name, o * attributes: { service: "user-api" } * }) * - * // Simulate an API operation and measure its duration + * // Record a measured API operation duration * const apiOperation = Effect.gen(function*() { - * const start = Date.now() - * yield* Effect.sleep(Duration.millis(100)) // Simulate work - * const duration = Duration.millis(Date.now() - start) - * - * // Update the timer with the measured duration + * const duration = Duration.millis(120) * yield* Metric.update(apiRequestTimer, duration) + * + * const state = yield* Metric.value(apiRequestTimer) + * console.log({ + * count: state.count, + * min: state.min, + * max: state.max, + * sum: state.sum + * }) // { count: 1, min: 120, max: 120, sum: 120 } * }) * ``` * + * @category constructors * @since 2.0.0 - * @category Constructors */ export const timer = (name, options) => { const boundaries = Predicate.isNotUndefined(options?.boundaries) ? options.boundaries : exponentialBoundaries({ @@ -1003,15 +941,17 @@ export const timer = (name, options) => { /** * Retrieves the current state of the specified `Metric`. * - * This function returns an Effect that, when executed, will provide the current - * aggregated state of the metric. The state type depends on the metric type: - * - Counter: `{ count: number | bigint }` - * - Gauge: `{ value: number | bigint }` - * - Frequency: `{ occurrences: Map }` - * - Histogram: `{ buckets: Array<[number, number]>, count: number, min: number, max: number, sum: number }` - * - Summary: `{ quantiles: Array<[number, number | undefined]>, count: number, min: number, max: number, sum: number }` + * **Details** + * + * The returned state depends on the metric type. Counters return + * `CounterState` with `count` and `incremental`, gauges return + * `GaugeState` with `value`, frequencies return + * `FrequencyState` with `occurrences`, histograms return `HistogramState` with + * buckets, count, min, max, and sum, and summaries return `SummaryState` with + * quantiles, count, min, max, and sum. + * + * **Example** (Reading metric state) * - * @example * ```ts * import { Effect, Metric } from "effect" * @@ -1039,21 +979,23 @@ export const timer = (name, options) => { * }) * ``` * + * @category getters * @since 2.0.0 - * @category Utilities */ export const value = self => InternalEffect.flatMap(InternalEffect.context(), context => InternalEffect.sync(() => self.valueUnsafe(context))); /** * Modifies the metric with the specified input. * - * The behavior of `modify` depends on the metric type: - * - **Counter**: Adds the input value to the current count - * - **Gauge**: Adds the input value to the current gauge value - * - **Frequency**: Same as `update` - increments the occurrence count for the input string - * - **Histogram**: Same as `update` - records the input value in the appropriate bucket - * - **Summary**: Same as `update` - records the input observation + * **Details** + * + * The behavior of `modify` depends on the metric type. Counters add the input + * value to the current count, gauges add the input value to the current gauge + * value, frequencies increment the occurrence count for the input string, + * histograms record the input value in the appropriate bucket, and summaries + * record the input observation. + * + * **Example** (Modifying metric values) * - * @example * ```ts * import { Effect, Metric } from "effect" * @@ -1080,21 +1022,23 @@ export const value = self => InternalEffect.flatMap(InternalEffect.context(), co * }) * ``` * - * @since 2.0.0 - * @category Utilities + * @category mutations + * @since 3.6.5 */ export const modify = /*#__PURE__*/dual(2, (self, input) => InternalEffect.flatMap(InternalEffect.context(), context => InternalEffect.sync(() => self.modifyUnsafe(input, context)))); /** * Updates the metric with the specified input. * - * The behavior of `update` depends on the metric type: - * - **Counter**: Adds the input value to the current count (same as `modify`) - * - **Gauge**: Sets the gauge to the specified value (replaces current value) - * - **Frequency**: Increments the occurrence count for the input string by 1 - * - **Histogram**: Records the input value in the appropriate bucket - * - **Summary**: Records the input value as a new observation + * **Details** + * + * The behavior of `update` depends on the metric type. Counters add the input + * value to the current count, gauges replace the current value with the input + * value, frequencies increment the occurrence count for the input string, + * histograms record the input value in the appropriate bucket, and summaries + * record the input value as a new observation. + * + * **Example** (Updating metric values) * - * @example * ```ts * import { Effect, Metric } from "effect" * @@ -1130,8 +1074,8 @@ export const modify = /*#__PURE__*/dual(2, (self, input) => InternalEffect.flatM * }) * ``` * + * @category mutations * @since 2.0.0 - * @category Utilities */ export const update = /*#__PURE__*/dual(2, (self, input) => InternalEffect.contextWith(services => InternalEffect.sync(() => self.updateUnsafe(input, services)))); /** @@ -1139,7 +1083,8 @@ export const update = /*#__PURE__*/dual(2, (self, input) => InternalEffect.conte * of the specified new type, which must be transformable to the input type of * this metric. * - * @example + * **Example** (Mapping metric inputs) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1169,8 +1114,8 @@ export const update = /*#__PURE__*/dual(2, (self, input) => InternalEffect.conte * }) * ``` * + * @category mapping * @since 2.0.0 - * @category Mapping */ export const mapInput = /*#__PURE__*/dual(2, (self, f) => new MetricTransform(self, context => self.valueUnsafe(context), (input, context) => self.updateUnsafe(f(input, context), context), (input, context) => self.modifyUnsafe(f(input, context), context))); /** @@ -1178,7 +1123,8 @@ export const mapInput = /*#__PURE__*/dual(2, (self, f) => new MetricTransform(se * of any type, and translates them to updates with the specified constant * update value. * - * @example + * **Example** (Ignoring inputs with a constant value) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1205,18 +1151,21 @@ export const mapInput = /*#__PURE__*/dual(2, (self, f) => new MetricTransform(se * }) * ``` * - * @since 2.0.0 * @category Input + * @since 2.0.0 */ export const withConstantInput = /*#__PURE__*/dual(2, (self, input) => mapInput(self, () => input)); /** * Returns a new metric that applies the specified attributes to all operations. * + * **Details** + * * Attributes are key-value pairs that provide additional context for metrics, * enabling filtering, grouping, and more detailed analysis. Each combination * of attribute values creates a separate metric series. * - * @example + * **Example** (Applying metric attributes) + * * ```ts * import { Effect, Metric } from "effect" * @@ -1261,18 +1210,21 @@ export const withConstantInput = /*#__PURE__*/dual(2, (self, input) => mapInput( * }) * ``` * - * @since 4.0.0 * @category Attributes + * @since 4.0.0 */ export const withAttributes = /*#__PURE__*/dual(2, (self, attributes) => new MetricTransform(self, context => self.valueUnsafe(addAttributesToContext(context, attributes)), (input, context) => self.updateUnsafe(input, addAttributesToContext(context, attributes)), (input, context) => self.modifyUnsafe(input, addAttributesToContext(context, attributes)))); // Metric Snapshots /** * Captures a snapshot of all registered metrics in the current context. * + * **Details** + * * Returns an array of metric snapshots, each containing the metric's metadata * (name, description, type) and current state (values, counts, etc.). * - * @example + * **Example** (Capturing metric snapshots) + * * ```ts * import { Console, Data, Effect, Metric } from "effect" * @@ -1311,19 +1263,22 @@ export const withAttributes = /*#__PURE__*/dual(2, (self, attributes) => new Met * }) * ``` * - * @since 2.0.0 * @category Snapshotting + * @since 2.0.0 */ export const snapshot = /*#__PURE__*/InternalEffect.map(/*#__PURE__*/InternalEffect.context(), context => snapshotUnsafe(context)); /** * Returns a human-readable string representation of all currently registered * metrics in a tabular format. * + * **Details** + * * This debugging utility captures a snapshot of all metrics and formats them * in an easy-to-read table showing names, descriptions, types, attributes, * and current state values. * - * @example + * **Example** (Dumping metrics as text) + * * ```ts * import { Console, Data, Effect, Metric } from "effect" * @@ -1366,8 +1321,8 @@ export const snapshot = /*#__PURE__*/InternalEffect.map(/*#__PURE__*/InternalEff * }) * ``` * - * @since 2.0.0 * @category Debugging + * @since 4.0.0 */ export const dump = /*#__PURE__*/InternalEffect.flatMap(/*#__PURE__*/InternalEffect.context(), context => { const metrics = snapshotUnsafe(context); @@ -1396,14 +1351,22 @@ export const dump = /*#__PURE__*/InternalEffect.flatMap(/*#__PURE__*/InternalEff return InternalEffect.succeed(""); }); /** - * Synchronously captures a snapshot of all registered metrics using the provided + * Captures a snapshot of all registered metrics synchronously using the provided * service context. * + * **When to use** + * + * Use to read metric snapshots from an explicit `Context` in low-level + * integrations, exporters, or debugging tools that already have the context. + * + * **Details** + * * This is the "unsafe" version that bypasses Effect's safety guarantees and requires * manual handling of the services context. Use the safe `snapshot` function for normal * application code. * - * @example + * **Example** (Capturing snapshots from a context) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1430,13 +1393,14 @@ export const dump = /*#__PURE__*/InternalEffect.flatMap(/*#__PURE__*/InternalEff * * // Use snapshotUnsafe for direct, synchronous access * const snapshots = Metric.snapshotUnsafe(services) + * const exportBatchCreatedAt = 1_700_000_000_000 * * // Process snapshots immediately (useful for exporters, debugging tools) * const exportData = snapshots.map((snapshot) => ({ * name: snapshot.id, * type: snapshot.type, * value: snapshot.state, - * timestamp: Date.now() + * timestamp: exportBatchCreatedAt * })) * * // This is synchronous and doesn't involve Effect overhead @@ -1452,8 +1416,8 @@ export const dump = /*#__PURE__*/InternalEffect.flatMap(/*#__PURE__*/InternalEff * }) * ``` * - * @since 2.0.0 * @category Snapshotting + * @since 4.0.0 */ export const snapshotUnsafe = context => { const registry = Context.get(context, MetricRegistry); @@ -1522,14 +1486,16 @@ const attributesToString = attributes => { }; // Metric Boundaries /** - * A helper method to create histogram bucket boundaries from an iterable set - * of values. + * Creates histogram bucket boundaries from an iterable set of values. + * + * **Details** * * Processes any iterable of numbers by removing duplicates, filtering out * non-positive values, and automatically appending positive infinity as the * final boundary. * - * @example + * **Example** (Creating boundaries from values) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1583,18 +1549,23 @@ const attributesToString = attributes => { * }) * ``` * - * @since 2.0.0 - * @category Boundaries + * @category boundaries + * @since 4.0.0 */ export const boundariesFromIterable = iterable => Arr.append(Arr.filter(new Set(iterable), n => n > 0), Number.POSITIVE_INFINITY); /** - * A helper method to create histogram bucket boundaries with linearly - * increasing values. + * Creates histogram bucket boundaries from a linear sequence and appends + * positive infinity. * - * Creates evenly-spaced boundaries starting from a base value and incrementing - * by a fixed width. Automatically adds positive infinity as the final boundary. + * **Details** + * + * Generates `count - 1` finite boundaries using `start + width + index` for + * each zero-based index, then applies the same normalization as + * `boundariesFromIterable`: non-positive values are removed, duplicates are + * collapsed, and `Infinity` is appended. + * + * **Example** (Creating linear boundaries) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1603,13 +1574,12 @@ export const boundariesFromIterable = iterable => Arr.append(Arr.filter(new Set( * }> {} * * // Create boundaries for response time histogram - * // Buckets: 0-100ms, 100-200ms, 200-300ms, 300-400ms, 400ms+ * const responseBoundaries = Metric.linearBoundaries({ * start: 0, // Starting point - * width: 100, // 100ms intervals + * width: 100, // Offset used for the first boundary * count: 5 // Creates 4 boundaries + infinity * }) - * console.log(responseBoundaries) // [100, 200, 300, 400, Infinity] + * console.log(responseBoundaries) // [100, 101, 102, 103, Infinity] * * // Create a histogram using these boundaries * const responseTimeHistogram = Metric.histogram("api_response_time", { @@ -1619,27 +1589,29 @@ export const boundariesFromIterable = iterable => Arr.append(Arr.filter(new Set( * * const program = Effect.gen(function*() { * // Record some response times - * yield* Metric.update(responseTimeHistogram, 85) // Goes in 0-100ms bucket - * yield* Metric.update(responseTimeHistogram, 250) // Goes in 200-300ms bucket - * yield* Metric.update(responseTimeHistogram, 450) // Goes in 400ms+ bucket + * yield* Metric.update(responseTimeHistogram, 85) + * yield* Metric.update(responseTimeHistogram, 101) + * yield* Metric.update(responseTimeHistogram, 450) * * const value = yield* Metric.value(responseTimeHistogram) * return value * }) * ``` * - * @since 2.0.0 - * @category Boundaries + * @category boundaries + * @since 4.0.0 */ export const linearBoundaries = options => boundariesFromIterable(Arr.makeBy(options.count - 1, n => options.start + n + options.width)); /** - * A helper method to create histogram bucket boundaries with exponentially - * increasing values. + * Creates histogram bucket boundaries with exponentially increasing values. + * + * **Details** * * Creates boundaries that grow exponentially, useful for metrics that span * multiple orders of magnitude. Each boundary is calculated as start * factor^i. * - * @example + * **Example** (Creating exponential boundaries) + * * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1680,8 +1652,8 @@ export const linearBoundaries = options => boundariesFromIterable(Arr.makeBy(opt * }) * ``` * - * @since 2.0.0 - * @category Boundaries + * @category boundaries + * @since 4.0.0 */ export const exponentialBoundaries = options => boundariesFromIterable(Arr.makeBy(options.count - 1, i => options.start * Math.pow(options.factor, i))); // Fiber Runtime Metrics @@ -1703,7 +1675,8 @@ const fiberFailures = /*#__PURE__*/counter("child_fiber_failures", { /** * Service key for the fiber runtime metrics service. * - * @example + * **Example** (Using the fiber runtime metrics key) + * * ```ts * import { Data, Effect, Layer, Metric } from "effect" * @@ -1733,14 +1706,27 @@ const fiberFailures = /*#__PURE__*/counter("child_fiber_failures", { * }) * ``` * + * @category metrics * @since 4.0.0 - * @category Runtime Metrics */ export const FiberRuntimeMetricsKey = InternalMetric.FiberRuntimeMetricsKey; /** - * Service class for managing fiber runtime metrics collection. + * Context reference for the optional service that records fiber runtime + * metrics. + * + * **When to use** + * + * Use to provide or inspect the service that receives fiber start and end + * notifications for automatic runtime metrics. + * + * **Details** + * + * When provided, the runtime can notify the service about child-fiber start and + * end events. When the reference is `undefined`, automatic fiber runtime metric + * collection is disabled. + * + * **Example** (Accessing the fiber runtime metrics service) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1779,8 +1765,8 @@ export const FiberRuntimeMetricsKey = InternalMetric.FiberRuntimeMetricsKey; * }) * ``` * + * @category runtime metrics * @since 4.0.0 - * @category Runtime Metrics */ export const FiberRuntimeMetrics = /*#__PURE__*/Context.Reference(InternalMetric.FiberRuntimeMetricsKey, { defaultValue: constUndefined @@ -1788,7 +1774,8 @@ export const FiberRuntimeMetrics = /*#__PURE__*/Context.Reference(InternalMetric /** * Default implementation of the fiber runtime metrics service. * - * @example + * **Example** (Using the default fiber metrics implementation) + * * ```ts * import { Data, Effect, Layer, Metric } from "effect" * @@ -1826,8 +1813,8 @@ export const FiberRuntimeMetrics = /*#__PURE__*/Context.Reference(InternalMetric * }) * ``` * + * @category metrics * @since 4.0.0 - * @category Runtime Metrics */ export const FiberRuntimeMetricsImpl = { recordFiberStart(context) { @@ -1844,15 +1831,16 @@ export const FiberRuntimeMetricsImpl = { } }; /** - * A Layer that enables automatic collection of fiber runtime metrics across + * Layer that enables automatic collection of fiber runtime metrics across * an entire Effect application. * - * Unlike the function version which wraps individual Effects, this layer provides - * runtime metrics collection to all Effects in the application context. This is - * the recommended approach for production applications that need comprehensive - * fiber monitoring. + * **When to use** + * + * Use when you need runtime metrics collection for all Effects in the + * application context rather than wrapping individual Effects. + * + * **Example** (Enabling runtime metrics with a layer) * - * @example * ```ts * import { Console, Data, Effect, Layer, Metric } from "effect" * @@ -1937,14 +1925,15 @@ export const FiberRuntimeMetricsImpl = { * ) * ``` * + * @category metrics * @since 4.0.0 - * @category Runtime Metrics */ export const enableRuntimeMetricsLayer = /*#__PURE__*/Layer.succeed(FiberRuntimeMetrics)(FiberRuntimeMetricsImpl); /** - * A Layer that disables automatic collection of fiber runtime metrics. + * Layer that disables automatic collection of fiber runtime metrics. + * + * **Example** (Disabling runtime metrics with a layer) * - * @example * ```ts * import { Data, Effect, Metric } from "effect" * @@ -1976,18 +1965,21 @@ export const enableRuntimeMetricsLayer = /*#__PURE__*/Layer.succeed(FiberRuntime * }) * ``` * + * @category metrics * @since 4.0.0 - * @category Runtime Metrics */ export const disableRuntimeMetricsLayer = /*#__PURE__*/Layer.succeed(FiberRuntimeMetrics)(undefined); /** * Enables automatic collection of fiber runtime metrics for the provided Effect. * + * **Details** + * * When enabled, automatically tracks fiber lifecycle metrics including active fibers, * started fibers, successful completions, and failures. These metrics provide valuable * insights into the concurrency patterns and health of your Effect application. * - * @example + * **Example** (Enabling runtime metrics for an effect) + * * ```ts * import { Console, Data, Effect, Layer, Metric } from "effect" * @@ -2056,18 +2048,20 @@ export const disableRuntimeMetricsLayer = /*#__PURE__*/Layer.succeed(FiberRuntim * ) * ``` * + * @category metrics * @since 4.0.0 - * @category Runtime Metrics */ export const enableRuntimeMetrics = /*#__PURE__*/InternalEffect.provideService(FiberRuntimeMetrics, FiberRuntimeMetricsImpl); /** * Disables automatic collection of fiber runtime metrics for the provided Effect. * - * This is useful when you want to selectively disable runtime metrics for specific - * parts of your application while keeping them enabled elsewhere, or when you need - * to avoid the overhead of metrics collection in performance-critical sections. + * **When to use** + * + * Use when you need to disable runtime metrics for a specific effect while + * keeping them enabled elsewhere. + * + * **Example** (Disabling runtime metrics for an effect) * - * @example * ```ts * import { Console, Data, Effect, Layer, Metric } from "effect" * @@ -2095,7 +2089,7 @@ export const enableRuntimeMetrics = /*#__PURE__*/InternalEffect.provideService(F * (_, i) => * Effect.gen(function*() { * // Simulate intensive computation - * const result = i * i + Math.random() + * const result = i * i + (i % 10) / 10 * return result * }) * ) @@ -2137,8 +2131,8 @@ export const enableRuntimeMetrics = /*#__PURE__*/InternalEffect.provideService(F * ) * ``` * + * @category metrics * @since 4.0.0 - * @category Runtime Metrics */ export const disableRuntimeMetrics = /*#__PURE__*/InternalEffect.provideService(FiberRuntimeMetrics, undefined); // Utilities diff --git a/.opencode/node_modules/effect/dist/Metric.js.map b/.opencode/node_modules/effect/dist/Metric.js.map index 23e08e6bb9c0432a9534b448d0c45c51241a1967..0d3ebb14299b8be3e61c78ae8ec04d55073a8f88 100644 --- a/.opencode/node_modules/effect/dist/Metric.js.map +++ b/.opencode/node_modules/effect/dist/Metric.js.map @@ -1 +1 @@ -{"version":3,"file":"Metric.js","names":["Arr","Context","Duration","constUndefined","dual","InternalEffect","InternalMetric","Layer","Order","pipeArguments","Predicate","_String","CurrentMetricAttributesKey","CurrentMetricAttributes","Reference","defaultValue","MetricRegistryKey","MetricRegistry","Map","TypeId","Metric$","metadataCache","WeakMap","metadata","id","description","attributes","constructor","valueUnsafe","context","hook","get","modifyUnsafe","input","modify","updateUnsafe","update","extraAttributes","Object","keys","length","isNotUndefined","hooks","getOrCreate","mergedAttributes","mergeAttributes","set","key","makeKey","registry","has","createHooks","meta","type","attributesToRecord","pipe","arguments","bigint0","BigInt","CounterMetric","bigint","incremental","options","count","canUpdate","value","_value","makeHooks","GaugeMetric","FrequencyMetric","preregisteredWords","occurrences","word","HistogramMetric","boundaries","bounds","size","values","Uint32Array","Float64Array","sum","min","Number","MAX_VALUE","max","MIN_VALUE","map","sort","n","i","from","to","mid","Math","floor","boundary","getBuckets","builder","allocate","cumulated","buckets","SummaryMetric","maxAge","maxSize","quantiles","toMillis","fromInputUnsafe","sortedQuantiles","observations","quantile","Error","head","snapshot","now","observation","timestamp","age","push","samples","sampleSize","q","undefined","index","ceil","observe","target","clock","ClockRef","currentTimeMillisUnsafe","MetricTransform","metric","isMetric","u","hasProperty","counter","name","gauge","frequency","histogram","summary","mapInput","summaryWithTimestamp","timer","exponentialBoundaries","start","factor","time_unit","self","flatMap","sync","contextWith","services","f","withConstantInput","withAttributes","addAttributesToContext","snapshotUnsafe","dump","metrics","maxNameLength","reduce","maxDescriptionLength","maxTypeLength","maxAttributesLength","attributesToString","grouped","entries","groupBy","sorted","sortWith","entry","rendered","group","renderName","renderDescription","renderType","renderAttributes","renderState","join","succeed","Array","state","padTo","padEnd","attrs","padding","repeat","prefix","renderKeyValues","printableQuantiles","keyValues","attr","boundariesFromIterable","iterable","append","filter","Set","POSITIVE_INFINITY","linearBoundaries","makeBy","width","pow","fibersActive","fibersStarted","fiberSuccesses","fiberFailures","FiberRuntimeMetricsKey","FiberRuntimeMetrics","FiberRuntimeMetricsImpl","recordFiberStart","recordFiberEnd","exit","exitIsSuccess","enableRuntimeMetricsLayer","disableRuntimeMetricsLayer","enableRuntimeMetrics","provideService","disableRuntimeMetrics","serializeAttributes","serializeEntries","isArray","other","acc","current","updated","add"],"sources":["../src/Metric.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2IA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAGzC,SAASC,cAAc,EAAEC,IAAI,QAAQ,eAAe;AACpD,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AACtD,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AACtD,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,SAASC,aAAa,QAAQ,eAAe;AAC7C,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,OAAO,MAAM,aAAa;AAu/CtC;;;;;;;;;;;;;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AAG9N,OAAO,CAAC8B,GAAG,CAACF,OAAO,EAAEhB,uBAAuB,CAAC;EAC7D,MAAMmN,OAAO,GAAGnL,eAAe,CAACkL,OAAO,EAAErM,UAAU,CAAC;EACpD,OAAOzB,OAAO,CAACgO,GAAG,CAACpM,OAAO,EAAEhB,uBAAuB,EAAEmN,OAAO,CAAC;AAC/D","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Metric.js","names":["Arr","Context","Duration","constUndefined","dual","InternalEffect","InternalMetric","Layer","Order","pipeArguments","Predicate","_String","CurrentMetricAttributesKey","CurrentMetricAttributes","Reference","defaultValue","MetricRegistryKey","MetricRegistry","Map","TypeId","Metric$","metadataCache","WeakMap","metadata","id","description","attributes","constructor","valueUnsafe","context","hook","get","modifyUnsafe","input","modify","updateUnsafe","update","extraAttributes","Object","keys","length","isNotUndefined","hooks","getOrCreate","mergedAttributes","mergeAttributes","set","key","makeKey","registry","has","createHooks","meta","type","attributesToRecord","pipe","arguments","bigint0","BigInt","CounterMetric","bigint","incremental","options","count","canUpdate","value","_value","makeHooks","GaugeMetric","FrequencyMetric","preregisteredWords","occurrences","word","HistogramMetric","boundaries","bounds","size","values","Uint32Array","Float64Array","sum","min","Number","MAX_VALUE","max","MIN_VALUE","map","sort","n","i","from","to","mid","Math","floor","boundary","getBuckets","builder","allocate","cumulated","buckets","SummaryMetric","maxAge","maxSize","quantiles","toMillis","fromInputUnsafe","sortedQuantiles","observations","quantile","Error","head","snapshot","now","observation","timestamp","age","push","samples","sampleSize","q","undefined","index","ceil","observe","target","clock","ClockRef","currentTimeMillisUnsafe","MetricTransform","metric","isMetric","u","hasProperty","counter","name","gauge","frequency","histogram","summary","mapInput","summaryWithTimestamp","timer","exponentialBoundaries","start","factor","time_unit","self","flatMap","sync","contextWith","services","f","withConstantInput","withAttributes","addAttributesToContext","snapshotUnsafe","dump","metrics","maxNameLength","reduce","maxDescriptionLength","maxTypeLength","maxAttributesLength","attributesToString","grouped","entries","groupBy","sorted","sortWith","entry","rendered","group","renderName","renderDescription","renderType","renderAttributes","renderState","join","succeed","Array","state","padTo","padEnd","attrs","padding","repeat","prefix","renderKeyValues","printableQuantiles","keyValues","attr","boundariesFromIterable","iterable","append","filter","Set","POSITIVE_INFINITY","linearBoundaries","makeBy","width","pow","fibersActive","fibersStarted","fiberSuccesses","fiberFailures","FiberRuntimeMetricsKey","FiberRuntimeMetrics","FiberRuntimeMetricsImpl","recordFiberStart","recordFiberEnd","exit","exitIsSuccess","enableRuntimeMetricsLayer","disableRuntimeMetricsLayer","enableRuntimeMetrics","provideService","disableRuntimeMetrics","serializeAttributes","serializeEntries","isArray","other","acc","current","updated","add"],"sources":["../src/Metric.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;AAaA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAGzC,SAASC,cAAc,EAAEC,IAAI,QAAQ,eAAe;AACpD,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AACtD,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AACtD,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,SAASC,aAAa,QAAQ,eAAe;AAC7C,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,OAAO,MAAM,aAAa;AAuhDtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,OAAO,MAAMC,0BAA0B,GAAG,uCAAgD;AAE1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,OAAO,MAAMC,uBAAuB,gBAAGZ,OAAO,CAACa,SAAS,CAAsBF,0BAA0B,EAAE;EACxGG,YAAY,EAAEA,CAAA,MAAO,EAAE;CACxB,CAAC;AAEF,MAAMC,iBAAiB,GAAG,gDAAgD;AAE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AAO,EAAEhB,uBAAuB,EAAEmN,OAAO,CAAC;AAC/D","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/MutableHashMap.d.ts b/.opencode/node_modules/effect/dist/MutableHashMap.d.ts index 1d9779f6e076e8e5faef88ebd887819be294f036..eacd4be302c430c11cab4d77f4259e23ba5dacb9 100644 --- a/.opencode/node_modules/effect/dist/MutableHashMap.d.ts +++ b/.opencode/node_modules/effect/dist/MutableHashMap.d.ts @@ -1,28 +1,13 @@ /** - * MutableHashMap is a high-performance, mutable hash map implementation designed for efficient key-value storage - * with support for both structural and referential equality. It provides O(1) average-case performance for - * basic operations and integrates seamlessly with Effect's Equal and Hash interfaces. - * - * The implementation uses a hybrid approach: - * - Referential keys (without Equal implementation) are stored in a native Map - * - Structural keys (with Equal implementation) are stored in hash buckets with collision handling - * - * Key Features: - * - Mutable operations for performance-critical scenarios - * - Supports both structural and referential equality - * - Efficient collision handling through bucketing - * - Iterable interface for easy traversal - * - Memory-efficient storage with automatic bucket management - * - * Performance Characteristics: - * - Get/Set/Has: O(1) average, O(n) worst case (hash collisions) - * - Remove: O(1) average, O(n) worst case - * - Clear: O(1) - * - Size: O(1) - * - Iteration: O(n) + * Stores key/value entries in a mutable hash map. + * + * `MutableHashMap` updates the same collection in place and supports fast + * lookup, insertion, removal, clearing, and iteration. It combines a native + * `Map` for ordinary JavaScript keys with hash buckets for keys that implement + * Effect `Equal` and `Hash`, so callers can mix reference-based and structural + * lookup in the same collection. * * @since 2.0.0 - * @category data-structures */ import type { NonEmptyArray } from "./Array.ts"; import { type Inspectable } from "./Inspectable.ts"; @@ -30,9 +15,24 @@ import * as Option from "./Option.ts"; import type { Pipeable } from "./Pipeable.ts"; declare const TypeId = "~effect/collections/MutableHashMap"; /** - * @example + * A mutable hash map that stores key-value pairs and supports both referential + * and Effect structural equality. + * + * **When to use** + * + * Use as a mutable key-value map when in-place updates are acceptable and keys + * may rely on Effect structural equality. + * + * **Details** + * + * Operations mutate the map in place. Keys that implement `Equal` / `Hash` can + * be looked up structurally; other keys use normal JavaScript reference or + * primitive equality. + * + * **Example** (Using a mutable hash map) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * // Create a mutable hash map with string keys and number values * const map: MutableHashMap.MutableHashMap = MutableHashMap @@ -55,8 +55,12 @@ declare const TypeId = "~effect/collections/MutableHashMap"; * console.log(entries) // [["count", 42], ["total", 100]] * ``` * - * @since 2.0.0 + * @see {@link empty} for creating an empty mutable hash map + * @see {@link get} for reading values by key + * @see {@link set} for mutating entries by key + * * @category models + * @since 2.0.0 */ export interface MutableHashMap extends Iterable<[K, V]>, Pipeable, Inspectable { readonly [TypeId]: typeof TypeId; @@ -64,7 +68,21 @@ export interface MutableHashMap extends Iterable<[K, V]>, Pipeable readonly buckets: Map>; } /** - * Checks if the specified value is a `MutableHashMap`, `false` otherwise. + * Checks whether the specified value is a `MutableHashMap`, `false` otherwise. + * + * **When to use** + * + * Use to narrow an unknown value before treating it as a mutable hash map. + * + * **Details** + * + * The check looks for the `MutableHashMap` runtime marker. + * + * **Gotchas** + * + * The check does not validate the key or value types carried by the map. + * + * @see {@link MutableHashMap} for the mutable hash map interface * * @category refinements * @since 4.0.0 @@ -73,9 +91,18 @@ export declare const isMutableHashMap: (value: unknown) => value is Mutabl /** * Creates an empty MutableHashMap. * - * @example + * **When to use** + * + * Use to create a fresh mutable map before adding entries over time. + * + * **Details** + * + * Each call returns a new empty map instance. + * + * **Example** (Creating an empty map) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.empty() * @@ -86,16 +113,24 @@ export declare const isMutableHashMap: (value: unknown) => value is Mutabl * console.log(MutableHashMap.size(map)) // 2 * ``` * - * @since 2.0.0 + * @see {@link make} for creating a map from explicit entries + * @see {@link fromIterable} for creating a map from an iterable of entries + * * @category constructors + * @since 2.0.0 */ export declare const empty: () => MutableHashMap; /** * Creates a MutableHashMap from a variable number of key-value pairs. * - * @example + * **When to use** + * + * Use to create a mutable hash map from explicit entries known at the call site. + * + * **Example** (Creating a map from entries) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make( * ["key1", 42], @@ -107,16 +142,24 @@ export declare const empty: () => MutableHashMap; * console.log(MutableHashMap.size(map)) // 3 * ``` * - * @since 2.0.0 + * @see {@link empty} for creating an empty map + * @see {@link fromIterable} for creating a map from an iterable of entries + * * @category constructors + * @since 2.0.0 */ export declare const make: >(...entries: Entries) => MutableHashMap; /** * Creates a MutableHashMap from an iterable collection of key-value pairs. * - * @example + * **When to use** + * + * Use to create a mutable hash map from an existing iterable of entries. + * + * **Example** (Creating a map from an iterable) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const entries = [ * ["apple", 1], @@ -134,16 +177,29 @@ export declare const make: >(...entri * console.log(MutableHashMap.get(fromMap, "x")) // Some(10) * ``` * - * @since 2.0.0 + * @see {@link make} for creating a map from explicit entries + * @see {@link empty} for creating an empty map + * * @category constructors + * @since 2.0.0 */ export declare const fromIterable: (entries: Iterable) => MutableHashMap; /** - * Retrieves the value associated with the specified key from the MutableHashMap. + * Looks up a key in the `MutableHashMap` safely. + * + * **When to use** + * + * Use to safely read a `MutableHashMap` value for a key as an `Option`. + * + * **Details** + * + * Returns `Some(value)` when an equal key is present and `None` when the key is + * absent. + * + * **Example** (Getting a value) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make(["key1", 42], ["key2", 100]) * @@ -155,16 +211,29 @@ export declare const fromIterable: (entries: Iterable) => * console.log(getValue(map)) // Some(42) * ``` * - * @since 2.0.0 + * @see {@link has} for checking only whether a key is present + * @see {@link set} for inserting or replacing a value by key + * * @category elements + * @since 2.0.0 */ export declare const get: { /** - * Retrieves the value associated with the specified key from the MutableHashMap. + * Looks up a key in the `MutableHashMap` safely. + * + * **When to use** + * + * Use to safely read a `MutableHashMap` value for a key as an `Option`. + * + * **Details** + * + * Returns `Some(value)` when an equal key is present and `None` when the key is + * absent. + * + * **Example** (Getting a value) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make(["key1", 42], ["key2", 100]) * @@ -176,16 +245,29 @@ export declare const get: { * console.log(getValue(map)) // Some(42) * ``` * - * @since 2.0.0 + * @see {@link has} for checking only whether a key is present + * @see {@link set} for inserting or replacing a value by key + * * @category elements + * @since 2.0.0 */ (key: K): (self: MutableHashMap) => Option.Option; /** - * Retrieves the value associated with the specified key from the MutableHashMap. + * Looks up a key in the `MutableHashMap` safely. + * + * **When to use** + * + * Use to safely read a `MutableHashMap` value for a key as an `Option`. + * + * **Details** + * + * Returns `Some(value)` when an equal key is present and `None` when the key is + * absent. + * + * **Example** (Getting a value) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make(["key1", 42], ["key2", 100]) * @@ -197,17 +279,25 @@ export declare const get: { * console.log(getValue(map)) // Some(42) * ``` * - * @since 2.0.0 + * @see {@link has} for checking only whether a key is present + * @see {@link set} for inserting or replacing a value by key + * * @category elements + * @since 2.0.0 */ (self: MutableHashMap, key: K): Option.Option; }; /** - * Extracts all keys from the MutableHashMap into an array. + * Returns an iterable over the keys in the `MutableHashMap`. + * + * **When to use** + * + * Use to iterate over the keys currently stored in a mutable hash map. + * + * **Example** (Reading keys) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make( * ["apple", 1], @@ -222,16 +312,24 @@ export declare const get: { * const hasRequiredKeys = allKeys.includes("apple") && allKeys.includes("banana") * ``` * - * @since 3.8.0 + * @see {@link values} for iterating over stored values + * @see {@link has} for checking one key without iterating + * * @category elements + * @since 3.8.0 */ export declare const keys: (self: MutableHashMap) => Iterable; /** - * Extracts all values from the MutableHashMap into an array. + * Returns an iterable over the values in the `MutableHashMap`. + * + * **When to use** + * + * Use to iterate over the values currently stored in a mutable hash map. + * + * **Example** (Reading values) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make( * ["apple", 1], @@ -251,16 +349,24 @@ export declare const keys: (self: MutableHashMap) => Iterable; * console.log(largeValues) // [2, 3] * ``` * - * @since 3.8.0 + * @see {@link keys} for iterating over stored keys + * * @category elements + * @since 3.8.0 */ export declare const values: (self: MutableHashMap) => Iterable; /** - * Checks if the MutableHashMap contains the specified key. + * Checks whether the MutableHashMap contains the specified key. + * + * **When to use** + * + * Use to test whether a key is present in a `MutableHashMap` without reading + * its value. + * + * **Example** (Checking for a key) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make(["key1", 42], ["key2", 100]) * @@ -272,16 +378,24 @@ export declare const values: (self: MutableHashMap) => Iterable; * console.log(hasKey(map)) // true * ``` * - * @since 2.0.0 + * @see {@link get} for reading the value as an `Option` + * * @category elements + * @since 2.0.0 */ export declare const has: { /** - * Checks if the MutableHashMap contains the specified key. + * Checks whether the MutableHashMap contains the specified key. + * + * **When to use** + * + * Use to test whether a key is present in a `MutableHashMap` without reading + * its value. + * + * **Example** (Checking for a key) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make(["key1", 42], ["key2", 100]) * @@ -293,16 +407,24 @@ export declare const has: { * console.log(hasKey(map)) // true * ``` * - * @since 2.0.0 + * @see {@link get} for reading the value as an `Option` + * * @category elements + * @since 2.0.0 */ (key: K): (self: MutableHashMap) => boolean; /** - * Checks if the MutableHashMap contains the specified key. + * Checks whether the MutableHashMap contains the specified key. + * + * **When to use** + * + * Use to test whether a key is present in a `MutableHashMap` without reading + * its value. + * + * **Example** (Checking for a key) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make(["key1", 42], ["key2", 100]) * @@ -314,8 +436,10 @@ export declare const has: { * console.log(hasKey(map)) // true * ``` * - * @since 2.0.0 + * @see {@link get} for reading the value as an `Option` + * * @category elements + * @since 2.0.0 */ (self: MutableHashMap, key: K): boolean; }; @@ -323,9 +447,15 @@ export declare const has: { * Sets a key-value pair in the MutableHashMap, mutating the map in place. * If the key already exists, its value is updated. * - * @example + * **When to use** + * + * Use to insert a new `MutableHashMap` entry or replace an existing entry in + * place. + * + * **Example** (Setting key-value pairs) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.empty() * @@ -346,17 +476,27 @@ export declare const has: { * console.log(MutableHashMap.size(map)) // 3 * ``` * - * @since 2.0.0 + * @see {@link modify} for updating an existing value with a function + * @see {@link modifyAt} for setting or removing based on the current optional value + * @see {@link remove} for deleting an entry by key + * * @category mutations + * @since 2.0.0 */ export declare const set: { /** * Sets a key-value pair in the MutableHashMap, mutating the map in place. * If the key already exists, its value is updated. * - * @example + * **When to use** + * + * Use to insert a new `MutableHashMap` entry or replace an existing entry in + * place. + * + * **Example** (Setting key-value pairs) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.empty() * @@ -377,17 +517,27 @@ export declare const set: { * console.log(MutableHashMap.size(map)) // 3 * ``` * - * @since 2.0.0 + * @see {@link modify} for updating an existing value with a function + * @see {@link modifyAt} for setting or removing based on the current optional value + * @see {@link remove} for deleting an entry by key + * * @category mutations + * @since 2.0.0 */ (key: K, value: V): (self: MutableHashMap) => MutableHashMap; /** * Sets a key-value pair in the MutableHashMap, mutating the map in place. * If the key already exists, its value is updated. * - * @example + * **When to use** + * + * Use to insert a new `MutableHashMap` entry or replace an existing entry in + * place. + * + * **Example** (Setting key-value pairs) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.empty() * @@ -408,8 +558,12 @@ export declare const set: { * console.log(MutableHashMap.size(map)) // 3 * ``` * - * @since 2.0.0 + * @see {@link modify} for updating an existing value with a function + * @see {@link modifyAt} for setting or removing based on the current optional value + * @see {@link remove} for deleting an entry by key + * * @category mutations + * @since 2.0.0 */ (self: MutableHashMap, key: K, value: V): MutableHashMap; }; @@ -417,9 +571,15 @@ export declare const set: { * Updates the value of the specified key within the MutableHashMap if it exists. * If the key doesn't exist, the map remains unchanged. * - * @example + * **When to use** + * + * Use to transform an existing `MutableHashMap` value in place without + * inserting missing keys. + * + * **Example** (Modifying existing values) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make(["count", 5], ["total", 100]) * @@ -440,17 +600,26 @@ export declare const set: { * increment(map) * ``` * - * @since 2.0.0 + * @see {@link set} for inserting or replacing a value directly + * @see {@link modifyAt} for handling both missing and existing keys + * * @category mutations + * @since 2.0.0 */ export declare const modify: { /** * Updates the value of the specified key within the MutableHashMap if it exists. * If the key doesn't exist, the map remains unchanged. * - * @example + * **When to use** + * + * Use to transform an existing `MutableHashMap` value in place without + * inserting missing keys. + * + * **Example** (Modifying existing values) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make(["count", 5], ["total", 100]) * @@ -471,17 +640,26 @@ export declare const modify: { * increment(map) * ``` * - * @since 2.0.0 + * @see {@link set} for inserting or replacing a value directly + * @see {@link modifyAt} for handling both missing and existing keys + * * @category mutations + * @since 2.0.0 */ (key: K, f: (v: V) => V): (self: MutableHashMap) => MutableHashMap; /** * Updates the value of the specified key within the MutableHashMap if it exists. * If the key doesn't exist, the map remains unchanged. * - * @example + * **When to use** + * + * Use to transform an existing `MutableHashMap` value in place without + * inserting missing keys. + * + * **Example** (Modifying existing values) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make(["count", 5], ["total", 100]) * @@ -502,21 +680,27 @@ export declare const modify: { * increment(map) * ``` * - * @since 2.0.0 + * @see {@link set} for inserting or replacing a value directly + * @see {@link modifyAt} for handling both missing and existing keys + * * @category mutations + * @since 2.0.0 */ (self: MutableHashMap, key: K, f: (v: V) => V): MutableHashMap; }; /** - * Sets or removes the specified key in the MutableHashMap using an update function. - * The function receives the current value as an Option and returns an Option. - * If the function returns Some, the key is set to that value. - * If the function returns None, the key is removed. + * Updates or removes the specified key using a function from the current + * optional value to the next optional value. + * + * **When to use** + * + * Use to decide whether to insert, update, or remove a key based on its current + * optional value. + * + * **Example** (Updating or removing a key) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" - * import * as Option from "effect/Option" + * import { MutableHashMap, Option } from "effect" * * const map = MutableHashMap.make(["count", 5]) * @@ -549,20 +733,27 @@ export declare const modify: { * console.log(MutableHashMap.has(map, "new")) // false (42 <= 50) * ``` * - * @since 2.0.0 + * @see {@link modify} for updating only when the key already exists + * @see {@link set} for inserting or replacing directly + * @see {@link remove} for deleting directly + * * @category mutations + * @since 2.0.0 */ export declare const modifyAt: { /** - * Sets or removes the specified key in the MutableHashMap using an update function. - * The function receives the current value as an Option and returns an Option. - * If the function returns Some, the key is set to that value. - * If the function returns None, the key is removed. + * Updates or removes the specified key using a function from the current + * optional value to the next optional value. + * + * **When to use** + * + * Use to decide whether to insert, update, or remove a key based on its current + * optional value. + * + * **Example** (Updating or removing a key) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" - * import * as Option from "effect/Option" + * import { MutableHashMap, Option } from "effect" * * const map = MutableHashMap.make(["count", 5]) * @@ -595,20 +786,27 @@ export declare const modifyAt: { * console.log(MutableHashMap.has(map, "new")) // false (42 <= 50) * ``` * - * @since 2.0.0 + * @see {@link modify} for updating only when the key already exists + * @see {@link set} for inserting or replacing directly + * @see {@link remove} for deleting directly + * * @category mutations + * @since 2.0.0 */ (key: K, f: (value: Option.Option) => Option.Option): (self: MutableHashMap) => MutableHashMap; /** - * Sets or removes the specified key in the MutableHashMap using an update function. - * The function receives the current value as an Option and returns an Option. - * If the function returns Some, the key is set to that value. - * If the function returns None, the key is removed. + * Updates or removes the specified key using a function from the current + * optional value to the next optional value. + * + * **When to use** + * + * Use to decide whether to insert, update, or remove a key based on its current + * optional value. + * + * **Example** (Updating or removing a key) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" - * import * as Option from "effect/Option" + * import { MutableHashMap, Option } from "effect" * * const map = MutableHashMap.make(["count", 5]) * @@ -641,8 +839,12 @@ export declare const modifyAt: { * console.log(MutableHashMap.has(map, "new")) // false (42 <= 50) * ``` * - * @since 2.0.0 + * @see {@link modify} for updating only when the key already exists + * @see {@link set} for inserting or replacing directly + * @see {@link remove} for deleting directly + * * @category mutations + * @since 2.0.0 */ (self: MutableHashMap, key: K, f: (value: Option.Option) => Option.Option): MutableHashMap; }; @@ -650,9 +852,14 @@ export declare const modifyAt: { * Removes the specified key from the MutableHashMap, mutating the map in place. * If the key doesn't exist, the map remains unchanged. * - * @example + * **When to use** + * + * Use to delete one key from a mutable hash map in place. + * + * **Example** (Removing a key) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make( * ["key1", 42], @@ -677,17 +884,25 @@ export declare const modifyAt: { * console.log(MutableHashMap.size(map)) // 1 * ``` * - * @since 2.0.0 + * @see {@link clear} for removing all entries + * @see {@link modifyAt} for conditionally removing based on the current value + * * @category mutations + * @since 2.0.0 */ export declare const remove: { /** * Removes the specified key from the MutableHashMap, mutating the map in place. * If the key doesn't exist, the map remains unchanged. * - * @example + * **When to use** + * + * Use to delete one key from a mutable hash map in place. + * + * **Example** (Removing a key) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make( * ["key1", 42], @@ -712,17 +927,25 @@ export declare const remove: { * console.log(MutableHashMap.size(map)) // 1 * ``` * - * @since 2.0.0 + * @see {@link clear} for removing all entries + * @see {@link modifyAt} for conditionally removing based on the current value + * * @category mutations + * @since 2.0.0 */ (key: K): (self: MutableHashMap) => MutableHashMap; /** * Removes the specified key from the MutableHashMap, mutating the map in place. * If the key doesn't exist, the map remains unchanged. * - * @example + * **When to use** + * + * Use to delete one key from a mutable hash map in place. + * + * **Example** (Removing a key) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make( * ["key1", 42], @@ -747,8 +970,11 @@ export declare const remove: { * console.log(MutableHashMap.size(map)) // 1 * ``` * - * @since 2.0.0 + * @see {@link clear} for removing all entries + * @see {@link modifyAt} for conditionally removing based on the current value + * * @category mutations + * @since 2.0.0 */ (self: MutableHashMap, key: K): MutableHashMap; }; @@ -756,9 +982,14 @@ export declare const remove: { * Removes all key-value pairs from the MutableHashMap, mutating the map in place. * The map becomes empty after this operation. * - * @example + * **When to use** + * + * Use to empty a mutable hash map while keeping the same map instance. + * + * **Example** (Clearing all entries) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make( * ["key1", 42], @@ -779,16 +1010,24 @@ export declare const remove: { * console.log(MutableHashMap.size(map)) // 1 * ``` * - * @since 2.0.0 + * @see {@link remove} for deleting one key + * @see {@link empty} for creating a fresh empty map + * * @category mutations + * @since 2.0.0 */ export declare const clear: (self: MutableHashMap) => MutableHashMap; /** * Returns the number of key-value pairs in the MutableHashMap. * - * @example + * **When to use** + * + * Use to read how many entries are currently stored in the mutable hash map. + * + * **Example** (Checking map size) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.empty() * console.log(MutableHashMap.size(map)) // 0 @@ -804,23 +1043,82 @@ export declare const clear: (self: MutableHashMap) => MutableHashMap * console.log(MutableHashMap.size(map)) // 0 * ``` * - * @since 2.0.0 + * @see {@link isEmpty} for checking whether the map has no entries + * * @category elements + * @since 2.0.0 */ export declare const size: (self: MutableHashMap) => number; /** + * Returns `true` when the `MutableHashMap` contains no key-value pairs. + * + * **When to use** + * + * Use to branch on whether a mutable map currently has any entries. + * + * @see {@link size} for reading the exact number of entries + * + * @category predicates * @since 2.0.0 */ export declare const isEmpty: (self: MutableHashMap) => boolean; /** + * Runs a callback for each key-value pair in the `MutableHashMap`. + * + * **When to use** + * + * Use to run a synchronous side-effecting callback for every key-value pair in + * an existing mutable map. + * + * **Details** + * + * Iteration follows the backing map's order. The callback receives the value + * first and the key second, matching `Map.prototype.forEach`. + * + * @see {@link keys} for iterating only keys + * @see {@link values} for iterating only values + * + * @category traversing * @since 2.0.0 */ export declare const forEach: { /** + * Runs a callback for each key-value pair in the `MutableHashMap`. + * + * **When to use** + * + * Use to run a synchronous side-effecting callback for every key-value pair in + * an existing mutable map. + * + * **Details** + * + * Iteration follows the backing map's order. The callback receives the value + * first and the key second, matching `Map.prototype.forEach`. + * + * @see {@link keys} for iterating only keys + * @see {@link values} for iterating only values + * + * @category traversing * @since 2.0.0 */ (f: (value: V, key: K) => void): (self: MutableHashMap) => void; /** + * Runs a callback for each key-value pair in the `MutableHashMap`. + * + * **When to use** + * + * Use to run a synchronous side-effecting callback for every key-value pair in + * an existing mutable map. + * + * **Details** + * + * Iteration follows the backing map's order. The callback receives the value + * first and the key second, matching `Map.prototype.forEach`. + * + * @see {@link keys} for iterating only keys + * @see {@link values} for iterating only values + * + * @category traversing * @since 2.0.0 */ (self: MutableHashMap, f: (value: V, key: K) => void): void; diff --git a/.opencode/node_modules/effect/dist/MutableHashMap.d.ts.map b/.opencode/node_modules/effect/dist/MutableHashMap.d.ts.map index 9d03674e1bb47ce2500a4453b1b58cb07abe5680..4b326c3ed4fbd2cd5914178607580241cfb94e01 100644 --- a/.opencode/node_modules/effect/dist/MutableHashMap.d.ts.map +++ b/.opencode/node_modules/effect/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AAC,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,KAAG,OAAkC,CAAA;AAE7F;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,OAAO,EAAE;IACpB;;;;;;;;;;;;;;;;;;OAkBG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,IAAI,GAAG,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAA;IAC3E;;;;;;;;;;;;;;;;;;OAkBG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI,CAAA;CAGvE,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/MutableHashMap.js b/.opencode/node_modules/effect/dist/MutableHashMap.js index 0c1cb54238bb859e89a494fb9e7108b36e1d41a0..75d429a1be6688f2cf4358288f33e5d81f5a848a 100644 --- a/.opencode/node_modules/effect/dist/MutableHashMap.js +++ b/.opencode/node_modules/effect/dist/MutableHashMap.js @@ -8,7 +8,21 @@ import { pipeArguments } from "./Pipeable.js"; import { hasProperty } from "./Predicate.js"; const TypeId = "~effect/collections/MutableHashMap"; /** - * Checks if the specified value is a `MutableHashMap`, `false` otherwise. + * Checks whether the specified value is a `MutableHashMap`, `false` otherwise. + * + * **When to use** + * + * Use to narrow an unknown value before treating it as a mutable hash map. + * + * **Details** + * + * The check looks for the `MutableHashMap` runtime marker. + * + * **Gotchas** + * + * The check does not validate the key or value types carried by the map. + * + * @see {@link MutableHashMap} for the mutable hash map interface * * @category refinements * @since 4.0.0 @@ -38,9 +52,18 @@ const MutableHashMapProto = { /** * Creates an empty MutableHashMap. * - * @example + * **When to use** + * + * Use to create a fresh mutable map before adding entries over time. + * + * **Details** + * + * Each call returns a new empty map instance. + * + * **Example** (Creating an empty map) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.empty() * @@ -51,8 +74,11 @@ const MutableHashMapProto = { * console.log(MutableHashMap.size(map)) // 2 * ``` * - * @since 2.0.0 + * @see {@link make} for creating a map from explicit entries + * @see {@link fromIterable} for creating a map from an iterable of entries + * * @category constructors + * @since 2.0.0 */ export const empty = () => { const self = Object.create(MutableHashMapProto); @@ -63,9 +89,14 @@ export const empty = () => { /** * Creates a MutableHashMap from a variable number of key-value pairs. * - * @example + * **When to use** + * + * Use to create a mutable hash map from explicit entries known at the call site. + * + * **Example** (Creating a map from entries) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make( * ["key1", 42], @@ -77,16 +108,24 @@ export const empty = () => { * console.log(MutableHashMap.size(map)) // 3 * ``` * - * @since 2.0.0 + * @see {@link empty} for creating an empty map + * @see {@link fromIterable} for creating a map from an iterable of entries + * * @category constructors + * @since 2.0.0 */ export const make = (...entries) => fromIterable(entries); /** * Creates a MutableHashMap from an iterable collection of key-value pairs. * - * @example + * **When to use** + * + * Use to create a mutable hash map from an existing iterable of entries. + * + * **Example** (Creating a map from an iterable) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const entries = [ * ["apple", 1], @@ -104,8 +143,11 @@ export const make = (...entries) => fromIterable(entries); * console.log(MutableHashMap.get(fromMap, "x")) // Some(10) * ``` * - * @since 2.0.0 + * @see {@link make} for creating a map from explicit entries + * @see {@link empty} for creating an empty map + * * @category constructors + * @since 2.0.0 */ export const fromIterable = entries => { const self = empty(); @@ -115,11 +157,21 @@ export const fromIterable = entries => { return self; }; /** - * Retrieves the value associated with the specified key from the MutableHashMap. + * Looks up a key in the `MutableHashMap` safely. + * + * **When to use** + * + * Use to safely read a `MutableHashMap` value for a key as an `Option`. + * + * **Details** + * + * Returns `Some(value)` when an equal key is present and `None` when the key is + * absent. + * + * **Example** (Getting a value) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make(["key1", 42], ["key2", 100]) * @@ -131,8 +183,11 @@ export const fromIterable = entries => { * console.log(getValue(map)) // Some(42) * ``` * - * @since 2.0.0 + * @see {@link has} for checking only whether a key is present + * @see {@link set} for inserting or replacing a value by key + * * @category elements + * @since 2.0.0 */ export const get = /*#__PURE__*/dual(2, (self, key) => { if (self.backing.has(key)) { @@ -154,11 +209,16 @@ export const get = /*#__PURE__*/dual(2, (self, key) => { const referentialKeysCache = /*#__PURE__*/new WeakMap(); const isSimpleKey = u => typeof u !== "object" && typeof u !== "function"; /** - * Extracts all keys from the MutableHashMap into an array. + * Returns an iterable over the keys in the `MutableHashMap`. + * + * **When to use** + * + * Use to iterate over the keys currently stored in a mutable hash map. + * + * **Example** (Reading keys) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make( * ["apple", 1], @@ -173,16 +233,24 @@ const isSimpleKey = u => typeof u !== "object" && typeof u !== "function"; * const hasRequiredKeys = allKeys.includes("apple") && allKeys.includes("banana") * ``` * - * @since 3.8.0 + * @see {@link values} for iterating over stored values + * @see {@link has} for checking one key without iterating + * * @category elements + * @since 3.8.0 */ export const keys = self => self.backing.keys(); /** - * Extracts all values from the MutableHashMap into an array. + * Returns an iterable over the values in the `MutableHashMap`. + * + * **When to use** + * + * Use to iterate over the values currently stored in a mutable hash map. + * + * **Example** (Reading values) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make( * ["apple", 1], @@ -202,8 +270,10 @@ export const keys = self => self.backing.keys(); * console.log(largeValues) // [2, 3] * ``` * - * @since 3.8.0 + * @see {@link keys} for iterating over stored keys + * * @category elements + * @since 3.8.0 */ export const values = self => self.backing.values(); const getFromBucket = (self, bucket, key) => { @@ -217,11 +287,17 @@ const getFromBucket = (self, bucket, key) => { return Option.none(); }; /** - * Checks if the MutableHashMap contains the specified key. + * Checks whether the MutableHashMap contains the specified key. + * + * **When to use** + * + * Use to test whether a key is present in a `MutableHashMap` without reading + * its value. + * + * **Example** (Checking for a key) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make(["key1", 42], ["key2", 100]) * @@ -233,17 +309,25 @@ const getFromBucket = (self, bucket, key) => { * console.log(hasKey(map)) // true * ``` * - * @since 2.0.0 + * @see {@link get} for reading the value as an `Option` + * * @category elements + * @since 2.0.0 */ export const has = /*#__PURE__*/dual(2, (self, key) => Option.isSome(get(self, key))); /** * Sets a key-value pair in the MutableHashMap, mutating the map in place. * If the key already exists, its value is updated. * - * @example + * **When to use** + * + * Use to insert a new `MutableHashMap` entry or replace an existing entry in + * place. + * + * **Example** (Setting key-value pairs) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.empty() * @@ -264,8 +348,12 @@ export const has = /*#__PURE__*/dual(2, (self, key) => Option.isSome(get(self, k * console.log(MutableHashMap.size(map)) // 3 * ``` * - * @since 2.0.0 + * @see {@link modify} for updating an existing value with a function + * @see {@link modifyAt} for setting or removing based on the current optional value + * @see {@link remove} for deleting an entry by key + * * @category mutations + * @since 2.0.0 */ export const set = /*#__PURE__*/dual(3, (self, key, value) => { if (self.backing.has(key) || isSimpleKey(key)) { @@ -304,9 +392,15 @@ const getRefKey = (bucket, key) => { * Updates the value of the specified key within the MutableHashMap if it exists. * If the key doesn't exist, the map remains unchanged. * - * @example + * **When to use** + * + * Use to transform an existing `MutableHashMap` value in place without + * inserting missing keys. + * + * **Example** (Modifying existing values) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make(["count", 5], ["total", 100]) * @@ -327,8 +421,11 @@ const getRefKey = (bucket, key) => { * increment(map) * ``` * - * @since 2.0.0 + * @see {@link set} for inserting or replacing a value directly + * @see {@link modifyAt} for handling both missing and existing keys + * * @category mutations + * @since 2.0.0 */ export const modify = /*#__PURE__*/dual(3, (self, key, f) => { const hasKey = self.backing.has(key); @@ -356,15 +453,18 @@ export const modify = /*#__PURE__*/dual(3, (self, key, f) => { return self; }); /** - * Sets or removes the specified key in the MutableHashMap using an update function. - * The function receives the current value as an Option and returns an Option. - * If the function returns Some, the key is set to that value. - * If the function returns None, the key is removed. + * Updates or removes the specified key using a function from the current + * optional value to the next optional value. + * + * **When to use** + * + * Use to decide whether to insert, update, or remove a key based on its current + * optional value. + * + * **Example** (Updating or removing a key) * - * @example * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" - * import * as Option from "effect/Option" + * import { MutableHashMap, Option } from "effect" * * const map = MutableHashMap.make(["count", 5]) * @@ -397,8 +497,12 @@ export const modify = /*#__PURE__*/dual(3, (self, key, f) => { * console.log(MutableHashMap.has(map, "new")) // false (42 <= 50) * ``` * - * @since 2.0.0 + * @see {@link modify} for updating only when the key already exists + * @see {@link set} for inserting or replacing directly + * @see {@link remove} for deleting directly + * * @category mutations + * @since 2.0.0 */ export const modifyAt = /*#__PURE__*/dual(3, (self, key, f) => { const current = get(self, key); @@ -416,9 +520,14 @@ export const modifyAt = /*#__PURE__*/dual(3, (self, key, f) => { * Removes the specified key from the MutableHashMap, mutating the map in place. * If the key doesn't exist, the map remains unchanged. * - * @example + * **When to use** + * + * Use to delete one key from a mutable hash map in place. + * + * **Example** (Removing a key) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make( * ["key1", 42], @@ -443,8 +552,11 @@ export const modifyAt = /*#__PURE__*/dual(3, (self, key, f) => { * console.log(MutableHashMap.size(map)) // 1 * ``` * - * @since 2.0.0 + * @see {@link clear} for removing all entries + * @see {@link modifyAt} for conditionally removing based on the current value + * * @category mutations + * @since 2.0.0 */ export const remove = /*#__PURE__*/dual(2, (self, key_) => { if (isSimpleKey(key_)) { @@ -474,9 +586,14 @@ export const remove = /*#__PURE__*/dual(2, (self, key_) => { * Removes all key-value pairs from the MutableHashMap, mutating the map in place. * The map becomes empty after this operation. * - * @example + * **When to use** + * + * Use to empty a mutable hash map while keeping the same map instance. + * + * **Example** (Clearing all entries) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.make( * ["key1", 42], @@ -497,8 +614,11 @@ export const remove = /*#__PURE__*/dual(2, (self, key_) => { * console.log(MutableHashMap.size(map)) // 1 * ``` * - * @since 2.0.0 + * @see {@link remove} for deleting one key + * @see {@link empty} for creating a fresh empty map + * * @category mutations + * @since 2.0.0 */ export const clear = self => { self.backing.clear(); @@ -508,9 +628,14 @@ export const clear = self => { /** * Returns the number of key-value pairs in the MutableHashMap. * - * @example + * **When to use** + * + * Use to read how many entries are currently stored in the mutable hash map. + * + * **Example** (Checking map size) + * * ```ts - * import * as MutableHashMap from "effect/MutableHashMap" + * import { MutableHashMap } from "effect" * * const map = MutableHashMap.empty() * console.log(MutableHashMap.size(map)) // 0 @@ -526,15 +651,42 @@ export const clear = self => { * console.log(MutableHashMap.size(map)) // 0 * ``` * - * @since 2.0.0 + * @see {@link isEmpty} for checking whether the map has no entries + * * @category elements + * @since 2.0.0 */ export const size = self => self.backing.size; /** + * Returns `true` when the `MutableHashMap` contains no key-value pairs. + * + * **When to use** + * + * Use to branch on whether a mutable map currently has any entries. + * + * @see {@link size} for reading the exact number of entries + * + * @category predicates * @since 2.0.0 */ export const isEmpty = self => self.backing.size === 0; /** + * Runs a callback for each key-value pair in the `MutableHashMap`. + * + * **When to use** + * + * Use to run a synchronous side-effecting callback for every key-value pair in + * an existing mutable map. + * + * **Details** + * + * Iteration follows the backing map's order. The callback receives the value + * first and the key second, matching `Map.prototype.forEach`. + * + * @see {@link keys} for iterating only keys + * @see {@link values} for iterating only values + * + * @category traversing * @since 2.0.0 */ export const forEach = /*#__PURE__*/dual(2, (self, f) => { diff --git a/.opencode/node_modules/effect/dist/MutableHashMap.js.map b/.opencode/node_modules/effect/dist/MutableHashMap.js.map index 1b8d671cb8febfeb989e27bc84181decf7204771..25a0b7f9d8edf57054f9e8405a73e7e7f9a9227e 100644 --- a/.opencode/node_modules/effect/dist/MutableHashMap.js.map +++ b/.opencode/node_modules/effect/dist/MutableHashMap.js.map @@ -1 +1 @@ -{"version":3,"file":"MutableHashMap.js","names":["Equal","format","dual","Hash","NodeInspectSymbol","toJson","Option","pipeArguments","hasProperty","TypeId","isMutableHashMap","value","MutableHashMapProto","Symbol","iterator","backing","toString","Array","from","toJSON","_id","values","pipe","arguments","empty","self","Object","create","Map","buckets","make","entries","fromIterable","key","set","get","has","some","isSimpleKey","none","refKey","referentialKeysCache","undefined","hash","bucket","getFromBucket","WeakMap","u","keys","i","len","length","equals","isSome","getRefKey","push","modify","f","hasKey","modifyAt","current","result","isNone","remove","key_","delete","bkey","splice","clear","size","isEmpty","forEach"],"sources":["../src/MutableHashMap.ts"],"sourcesContent":[null],"mappings":"AA2BA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAA2BC,iBAAiB,EAAEC,MAAM,QAAQ,kBAAkB;AAC9E,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,WAAW,QAAQ,gBAAgB;AAE5C,MAAMC,MAAM,GAAG,oCAAoC;AAqCnD;;;;;;AAMA,OAAO,MAAMC,gBAAgB,GAAUC,KAAc,IAAoCH,WAAW,CAACG,KAAK,EAAEF,MAAM,CAAC;AAEnH,MAAMG,mBAAmB,GAAkF;EAC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AC9EhC,IAAI,CAACV,OAAO,CAACwD,OAAO,CAACd,CAAC,CAAC;AACzB,CAAC,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"MutableHashMap.js","names":["Equal","format","dual","Hash","NodeInspectSymbol","toJson","Option","pipeArguments","hasProperty","TypeId","isMutableHashMap","value","MutableHashMapProto","Symbol","iterator","backing","toString","Array","from","toJSON","_id","values","pipe","arguments","empty","self","Object","create","Map","buckets","make","entries","fromIterable","key","set","get","has","some","isSimpleKey","none","refKey","referentialKeysCache","undefined","hash","bucket","getFromBucket","WeakMap","u","keys","i","len","length","equals","isSome","getRefKey","push","modify","f","hasKey","modifyAt","current","result","isNone","remove","key_","delete","bkey","splice","clear","size","isEmpty","forEach"],"sources":["../src/MutableHashMap.ts"],"sourcesContent":[null],"mappings":"AAYA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAA2BC,iBAAiB,EAAEC,MAAM,QAAQ,kBAAkB;AAC9E,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,WAAW,QAAQ,gBAAgB;AAE5C,MAAMC,MAAM,GAAG,oCAAoC;AAwDnD;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMC,gBAAgB,GAAUC,KAAc,IAAoCH,WAAW,CAACG,KAAK,EAAEF,MAAM,CAAC;AAEnH,MAAMG,mBAAmB,GAAkF;EACzG,CAACH,MAAM,GAAGA,MAAM;EAChB,CAACI,MAAM,CAACC,QAAQ,IAAC;IACf,OAAO,IAAI,CAACC,OAAO,CAACF,MAAM,CAACC,QAAQ,CAAC,EAAE;EACxC,CAAC;EACDE,QAAQA,CAAA;IACN,OAAO,kBAAkBf,MAAM,CAACgB,KAAK,CAACC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG;EAC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reList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/MutableHashSet.d.ts b/.opencode/node_modules/effect/dist/MutableHashSet.d.ts index aaea9e46908511fb9150892f946cf87b308814dd..a869937ca579fd42e3b6c28314db66c58cbca2e6 100644 --- a/.opencode/node_modules/effect/dist/MutableHashSet.d.ts +++ b/.opencode/node_modules/effect/dist/MutableHashSet.d.ts @@ -3,7 +3,22 @@ import * as MutableHashMap from "./MutableHashMap.ts"; import type { Pipeable } from "./Pipeable.ts"; declare const TypeId = "~effect/collections/MutableHashSet"; /** - * @example + * A mutable hash set for storing unique values with Effect structural equality + * support. + * + * **When to use** + * + * Use to store and mutate a collection of unique values with Effect hashing and + * equality semantics. + * + * **Details** + * + * Operations mutate the set in place. Values that implement `Equal` / `Hash` + * can be de-duplicated structurally; other values use normal JavaScript + * reference or primitive equality. + * + * **Example** (Using a mutable hash set) + * * ```ts * import { MutableHashSet } from "effect" * @@ -29,15 +44,29 @@ declare const TypeId = "~effect/collections/MutableHashSet"; * console.log(MutableHashSet.size(set)) // 3 * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface MutableHashSet extends Iterable, Pipeable, Inspectable { readonly [TypeId]: typeof TypeId; readonly keyMap: MutableHashMap.MutableHashMap; } /** - * Checks if the specified value is a `MutableHashSet`, `false` otherwise. + * Checks whether the specified value is a `MutableHashSet`, `false` otherwise. + * + * **When to use** + * + * Use to narrow an unknown value before treating it as a mutable hash set. + * + * **Details** + * + * The check looks for the `MutableHashSet` runtime marker. + * + * **Gotchas** + * + * Native `Set` values do not satisfy this check. + * + * @see {@link MutableHashSet} for the mutable hash set interface * * @category refinements * @since 4.0.0 @@ -46,7 +75,16 @@ export declare const isMutableHashSet: (value: unknown) => value is MutableHa /** * Creates an empty MutableHashSet. * - * @example + * **When to use** + * + * Use to create a fresh mutable set before adding values over time. + * + * **Details** + * + * Each call returns a new empty set backed by an empty `MutableHashMap`. + * + * **Example** (Creating an empty set) + * * ```ts * import { MutableHashSet } from "effect" * @@ -61,15 +99,24 @@ export declare const isMutableHashSet: (value: unknown) => value is MutableHa * console.log(Array.from(set)) // ["apple", "banana"] * ``` * - * @since 2.0.0 + * @see {@link make} for creating a set from explicit values + * @see {@link fromIterable} for creating a set from an iterable of values + * @see {@link clear} for emptying an existing mutable set + * * @category constructors + * @since 2.0.0 */ export declare const empty: () => MutableHashSet; /** * Creates a MutableHashSet from an iterable collection of values. * Duplicates are automatically removed. * - * @example + * **When to use** + * + * Use to build a mutable hash set from any iterable of values. + * + * **Example** (Creating a set from an iterable) + * * ```ts * import { MutableHashSet } from "effect" * @@ -88,15 +135,20 @@ export declare const empty: () => MutableHashSet; * console.log(Array.from(fromString)) // ["h", "e", "l", "o"] * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const fromIterable: (keys: Iterable) => MutableHashSet; /** * Creates a MutableHashSet from a variable number of values. * Duplicates are automatically removed. * - * @example + * **When to use** + * + * Use to build a mutable hash set from explicit values. + * + * **Example** (Creating a set from values) + * * ```ts * import { MutableHashSet } from "effect" * @@ -115,15 +167,20 @@ export declare const fromIterable: (keys: Iterable) => MutableHash * console.log(MutableHashSet.size(mixed)) // 3 * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const make: >(...keys: Keys) => MutableHashSet; /** * Adds a value to the MutableHashSet, mutating the set in place. * If the value already exists, the set remains unchanged. * - * @example + * **When to use** + * + * Use to insert a value into a mutable set while keeping uniqueness. + * + * **Example** (Adding values) + * * ```ts * import { MutableHashSet } from "effect" * @@ -146,15 +203,20 @@ export declare const make: >(...keys: Keys) * console.log(MutableHashSet.size(set)) // 3 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export declare const add: { /** * Adds a value to the MutableHashSet, mutating the set in place. * If the value already exists, the set remains unchanged. * - * @example + * **When to use** + * + * Use to insert a value into a mutable set while keeping uniqueness. + * + * **Example** (Adding values) + * * ```ts * import { MutableHashSet } from "effect" * @@ -177,15 +239,20 @@ export declare const add: { * console.log(MutableHashSet.size(set)) // 3 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ (key: V): (self: MutableHashSet) => MutableHashSet; /** * Adds a value to the MutableHashSet, mutating the set in place. * If the value already exists, the set remains unchanged. * - * @example + * **When to use** + * + * Use to insert a value into a mutable set while keeping uniqueness. + * + * **Example** (Adding values) + * * ```ts * import { MutableHashSet } from "effect" * @@ -208,15 +275,25 @@ export declare const add: { * console.log(MutableHashSet.size(set)) // 3 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ (self: MutableHashSet, key: V): MutableHashSet; }; /** - * Checks if the MutableHashSet contains the specified value. + * Checks whether the MutableHashSet contains the specified value. + * + * **When to use** + * + * Use to test whether a mutable set currently contains a value. + * + * **Details** + * + * Membership follows the same hashing and equality rules as the underlying + * `MutableHashMap`. + * + * **Example** (Checking for a value) * - * @example * ```ts * import { MutableHashSet } from "effect" * @@ -234,14 +311,27 @@ export declare const add: { * console.log(MutableHashSet.has(set, "grape")) // true * ``` * - * @since 2.0.0 + * @see {@link add} for adding a value to the set + * @see {@link remove} for removing a value from the set + * * @category elements + * @since 2.0.0 */ export declare const has: { /** - * Checks if the MutableHashSet contains the specified value. + * Checks whether the MutableHashSet contains the specified value. + * + * **When to use** + * + * Use to test whether a mutable set currently contains a value. + * + * **Details** + * + * Membership follows the same hashing and equality rules as the underlying + * `MutableHashMap`. + * + * **Example** (Checking for a value) * - * @example * ```ts * import { MutableHashSet } from "effect" * @@ -259,14 +349,27 @@ export declare const has: { * console.log(MutableHashSet.has(set, "grape")) // true * ``` * - * @since 2.0.0 + * @see {@link add} for adding a value to the set + * @see {@link remove} for removing a value from the set + * * @category elements + * @since 2.0.0 */ (key: V): (self: MutableHashSet) => boolean; /** - * Checks if the MutableHashSet contains the specified value. + * Checks whether the MutableHashSet contains the specified value. + * + * **When to use** + * + * Use to test whether a mutable set currently contains a value. + * + * **Details** + * + * Membership follows the same hashing and equality rules as the underlying + * `MutableHashMap`. + * + * **Example** (Checking for a value) * - * @example * ```ts * import { MutableHashSet } from "effect" * @@ -284,8 +387,11 @@ export declare const has: { * console.log(MutableHashSet.has(set, "grape")) // true * ``` * - * @since 2.0.0 + * @see {@link add} for adding a value to the set + * @see {@link remove} for removing a value from the set + * * @category elements + * @since 2.0.0 */ (self: MutableHashSet, key: V): boolean; }; @@ -293,7 +399,12 @@ export declare const has: { * Removes the specified value from the MutableHashSet, mutating the set in place. * If the value doesn't exist, the set remains unchanged. * - * @example + * **When to use** + * + * Use to delete a value from a mutable set if it is present. + * + * **Example** (Removing a value) + * * ```ts * import { MutableHashSet } from "effect" * @@ -316,15 +427,20 @@ export declare const has: { * console.log(MutableHashSet.size(set)) // 1 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export declare const remove: { /** * Removes the specified value from the MutableHashSet, mutating the set in place. * If the value doesn't exist, the set remains unchanged. * - * @example + * **When to use** + * + * Use to delete a value from a mutable set if it is present. + * + * **Example** (Removing a value) + * * ```ts * import { MutableHashSet } from "effect" * @@ -347,15 +463,20 @@ export declare const remove: { * console.log(MutableHashSet.size(set)) // 1 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ (key: V): (self: MutableHashSet) => MutableHashSet; /** * Removes the specified value from the MutableHashSet, mutating the set in place. * If the value doesn't exist, the set remains unchanged. * - * @example + * **When to use** + * + * Use to delete a value from a mutable set if it is present. + * + * **Example** (Removing a value) + * * ```ts * import { MutableHashSet } from "effect" * @@ -378,15 +499,20 @@ export declare const remove: { * console.log(MutableHashSet.size(set)) // 1 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ (self: MutableHashSet, key: V): MutableHashSet; }; /** * Returns the number of unique values in the MutableHashSet. * - * @example + * **When to use** + * + * Use to read how many unique values are currently stored in the set. + * + * **Example** (Checking set size) + * * ```ts * import { MutableHashSet } from "effect" * @@ -405,15 +531,20 @@ export declare const remove: { * console.log(MutableHashSet.size(set)) // 0 * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export declare const size: (self: MutableHashSet) => number; /** * Removes all values from the MutableHashSet, mutating the set in place. * The set becomes empty after this operation. * - * @example + * **When to use** + * + * Use to empty a mutable set while keeping the same set instance. + * + * **Example** (Clearing all values) + * * ```ts * import { MutableHashSet } from "effect" * @@ -433,8 +564,8 @@ export declare const size: (self: MutableHashSet) => number; * console.log(MutableHashSet.size(set)) // 1 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export declare const clear: (self: MutableHashSet) => MutableHashSet; export {}; diff --git a/.opencode/node_modules/effect/dist/MutableHashSet.d.ts.map b/.opencode/node_modules/effect/dist/MutableHashSet.d.ts.map index 701897d1765e64f699083b348ff9e3ef56a9a932..30ca353aeaf3aefef55a4eb96194fd2793f8609a 100644 --- a/.opencode/node_modules/effect/dist/MutableHashSet.d.ts.map +++ b/.opencode/node_modules/effect/dist/MutableHashSet.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"MutableHashSet.d.ts","sourceRoot":"","sources":["../src/MutableHashSet.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,KAAK,WAAW,EAA6B,MAAM,kBAAkB,CAAA;AAC9E,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAI7C,QAAA,MAAM,MAAM,uCAAuC,CAAA;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,cAAc,CAAC,GAAG,CAAC,CAAC,CAAE,SAAQ,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,WAAW;IAC/E,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;IAChC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;CAC3D;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAAE,OAA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modules/effect/dist/MutableHashSet.js b/.opencode/node_modules/effect/dist/MutableHashSet.js index 0ce9693c370c45ab5615b5131fdeb56455b51bd0..4f410c3cf833455933f28594cbff519b46b3d1dd 100644 --- a/.opencode/node_modules/effect/dist/MutableHashSet.js +++ b/.opencode/node_modules/effect/dist/MutableHashSet.js @@ -1,28 +1,13 @@ /** - * @fileoverview - * MutableHashSet is a high-performance, mutable set implementation that provides efficient storage - * and retrieval of unique values. Built on top of MutableHashMap, it inherits the same performance - * characteristics and support for both structural and referential equality. - * - * The implementation uses a MutableHashMap internally where each value is stored as a key with a - * boolean flag, providing O(1) average-case performance for all operations. - * - * Key Features: - * - Mutable operations for performance-critical scenarios - * - Supports both structural and referential equality - * - Efficient duplicate detection and removal - * - Iterable interface for easy traversal - * - Memory-efficient storage with automatic deduplication - * - Seamless integration with Effect's Equal and Hash interfaces - * - * Performance Characteristics: - * - Add/Has/Remove: O(1) average, O(n) worst case (hash collisions) - * - Clear: O(1) - * - Size: O(1) - * - Iteration: O(n) + * Stores unique values in a mutable hash set. + * + * `MutableHashSet` updates the same collection in place and supports fast + * membership checks, insertion, removal, clearing, and iteration. It is built + * on `MutableHashMap`: each set value is stored as a map key, so uniqueness + * follows the same hashing and equality rules as the underlying mutable hash + * map. * * @since 2.0.0 - * @category data-structures */ import { format } from "./Formatter.js"; import * as Dual from "./Function.js"; @@ -32,7 +17,21 @@ import { pipeArguments } from "./Pipeable.js"; import { hasProperty } from "./Predicate.js"; const TypeId = "~effect/collections/MutableHashSet"; /** - * Checks if the specified value is a `MutableHashSet`, `false` otherwise. + * Checks whether the specified value is a `MutableHashSet`, `false` otherwise. + * + * **When to use** + * + * Use to narrow an unknown value before treating it as a mutable hash set. + * + * **Details** + * + * The check looks for the `MutableHashSet` runtime marker. + * + * **Gotchas** + * + * Native `Set` values do not satisfy this check. + * + * @see {@link MutableHashSet} for the mutable hash set interface * * @category refinements * @since 4.0.0 @@ -67,7 +66,16 @@ const fromHashMap = keyMap => { /** * Creates an empty MutableHashSet. * - * @example + * **When to use** + * + * Use to create a fresh mutable set before adding values over time. + * + * **Details** + * + * Each call returns a new empty set backed by an empty `MutableHashMap`. + * + * **Example** (Creating an empty set) + * * ```ts * import { MutableHashSet } from "effect" * @@ -82,15 +90,24 @@ const fromHashMap = keyMap => { * console.log(Array.from(set)) // ["apple", "banana"] * ``` * - * @since 2.0.0 + * @see {@link make} for creating a set from explicit values + * @see {@link fromIterable} for creating a set from an iterable of values + * @see {@link clear} for emptying an existing mutable set + * * @category constructors + * @since 2.0.0 */ export const empty = () => fromHashMap(MutableHashMap.empty()); /** * Creates a MutableHashSet from an iterable collection of values. * Duplicates are automatically removed. * - * @example + * **When to use** + * + * Use to build a mutable hash set from any iterable of values. + * + * **Example** (Creating a set from an iterable) + * * ```ts * import { MutableHashSet } from "effect" * @@ -109,15 +126,20 @@ export const empty = () => fromHashMap(MutableHashMap.empty()); * console.log(Array.from(fromString)) // ["h", "e", "l", "o"] * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const fromIterable = keys => fromHashMap(MutableHashMap.fromIterable(Array.from(keys).map(k => [k, true]))); /** * Creates a MutableHashSet from a variable number of values. * Duplicates are automatically removed. * - * @example + * **When to use** + * + * Use to build a mutable hash set from explicit values. + * + * **Example** (Creating a set from values) + * * ```ts * import { MutableHashSet } from "effect" * @@ -136,15 +158,20 @@ export const fromIterable = keys => fromHashMap(MutableHashMap.fromIterable(Arra * console.log(MutableHashSet.size(mixed)) // 3 * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const make = (...keys) => fromIterable(keys); /** * Adds a value to the MutableHashSet, mutating the set in place. * If the value already exists, the set remains unchanged. * - * @example + * **When to use** + * + * Use to insert a value into a mutable set while keeping uniqueness. + * + * **Example** (Adding values) + * * ```ts * import { MutableHashSet } from "effect" * @@ -167,14 +194,24 @@ export const make = (...keys) => fromIterable(keys); * console.log(MutableHashSet.size(set)) // 3 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export const add = /*#__PURE__*/Dual.dual(2, (self, key) => (MutableHashMap.set(self.keyMap, key, true), self)); /** - * Checks if the MutableHashSet contains the specified value. + * Checks whether the MutableHashSet contains the specified value. + * + * **When to use** + * + * Use to test whether a mutable set currently contains a value. + * + * **Details** + * + * Membership follows the same hashing and equality rules as the underlying + * `MutableHashMap`. + * + * **Example** (Checking for a value) * - * @example * ```ts * import { MutableHashSet } from "effect" * @@ -192,15 +229,23 @@ export const add = /*#__PURE__*/Dual.dual(2, (self, key) => (MutableHashMap.set( * console.log(MutableHashSet.has(set, "grape")) // true * ``` * - * @since 2.0.0 + * @see {@link add} for adding a value to the set + * @see {@link remove} for removing a value from the set + * * @category elements + * @since 2.0.0 */ export const has = /*#__PURE__*/Dual.dual(2, (self, key) => MutableHashMap.has(self.keyMap, key)); /** * Removes the specified value from the MutableHashSet, mutating the set in place. * If the value doesn't exist, the set remains unchanged. * - * @example + * **When to use** + * + * Use to delete a value from a mutable set if it is present. + * + * **Example** (Removing a value) + * * ```ts * import { MutableHashSet } from "effect" * @@ -223,14 +268,19 @@ export const has = /*#__PURE__*/Dual.dual(2, (self, key) => MutableHashMap.has(s * console.log(MutableHashSet.size(set)) // 1 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export const remove = /*#__PURE__*/Dual.dual(2, (self, key) => (MutableHashMap.remove(self.keyMap, key), self)); /** * Returns the number of unique values in the MutableHashSet. * - * @example + * **When to use** + * + * Use to read how many unique values are currently stored in the set. + * + * **Example** (Checking set size) + * * ```ts * import { MutableHashSet } from "effect" * @@ -249,15 +299,20 @@ export const remove = /*#__PURE__*/Dual.dual(2, (self, key) => (MutableHashMap.r * console.log(MutableHashSet.size(set)) // 0 * ``` * - * @since 2.0.0 * @category elements + * @since 2.0.0 */ export const size = self => MutableHashMap.size(self.keyMap); /** * Removes all values from the MutableHashSet, mutating the set in place. * The set becomes empty after this operation. * - * @example + * **When to use** + * + * Use to empty a mutable set while keeping the same set instance. + * + * **Example** (Clearing all values) + * * ```ts * import { MutableHashSet } from "effect" * @@ -277,8 +332,8 @@ export const size = self => MutableHashMap.size(self.keyMap); * console.log(MutableHashSet.size(set)) // 1 * ``` * - * @since 2.0.0 * @category mutations + * @since 2.0.0 */ export const clear = self => (MutableHashMap.clear(self.keyMap), self); //# sourceMappingURL=MutableHashSet.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/MutableHashSet.js.map b/.opencode/node_modules/effect/dist/MutableHashSet.js.map index 6c734a293496c7f970a228053040956605063ea3..1b463b588e9f96eef41172619a60507f5bb76ad9 100644 --- a/.opencode/node_modules/effect/dist/MutableHashSet.js.map +++ b/.opencode/node_modules/effect/dist/MutableHashSet.js.map @@ -1 +1 @@ -{"version":3,"file":"MutableHashSet.js","names":["format","Dual","NodeInspectSymbol","toJson","MutableHashMap","pipeArguments","hasProperty","TypeId","isMutableHashSet","value","MutableHashSetProto","Symbol","iterator","Array","from","keyMap","map","_","toString","toJSON","_id","values","pipe","arguments","fromHashMap","set","Object","create","empty","fromIterable","keys","k","make","add","dual","self","key","has","remove","size","clear"],"sources":["../src/MutableHashSet.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAASA,MAAM,QAAQ,gBAAgB;AACvC,OAAO,KAAKC,IAAI,MAAM,eAAe;AACrC,SAA2BC,iBAAiB,EAAEC,MAAM,QAAQ,kBAAkB;AAC9E,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AAErD,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,WAAW,QAAQ,gBAAgB;AAE5C,MAAMC,MAAM,GAAG,oCAAoC;AAqCnD;;;;;;AAMA,OAAO,MAAMC,gBAAgB,GAAOC,KAAc,IAAiCH,WAAW,CAACG,KAAK,EAAEF,MAAM,CAAC;AAE7G,MAAMG,mBAAmB,GAA4C;EACnE,CAACH,MAAM,GAAGA,MAAM;EAChB,CAACI,MAAM,CAACC,QAAQ,IAAC;IACf,OAA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I,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,MAAMG,GAAG,gBA+DZhC,IAAI,CAACiC,IAAI,CAGX,CAAC,EAAE,CAACC,IAAI,EAAEC,GAAG,MAAMhC,cAAc,CAACqB,GAAG,CAACU,IAAI,CAACpB,MAAM,EAAEqB,GAAG,EAAE,IAAI,CAAC,EAAED,IAAI,CAAC,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAME,GAAG,gBAmDZpC,IAAI,CAACiC,IAAI,CAGX,CAAC,EAAE,CAACC,IAAI,EAAEC,GAAG,KAAKhC,cAAc,CAACiC,GAAG,CAACF,IAAI,CAACpB,MAAM,EAAEqB,GAAG,CAAC,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,MAAME,MAAM,gBA+DfrC,IAAI,CAACiC,IAAI,CAGX,CAAC,EAAE,CAACC,IAAI,EAAEC,GAAG,MAAMhC,cAAc,CAACkC,MAAM,CAACH,IAAI,CAACpB,MAAM,EAAEqB,GAAG,CAAC,EAAED,IAAI,CAAC,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMI,IAAI,GAAOJ,IAAuB,IAAa/B,cAAc,CAACmC,IAAI,CAACJ,IAAI,CAACpB,MAAM,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,MAAMyB,KAAK,GAAOL,IAAuB,KAAyB/B,cAAc,CAACoC,KAAK,CAACL,IAAI,CAACpB,MAAM,CAAC,EAAEoB,IAAI,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"MutableHashSet.js","names":["format","Dual","NodeInspectSymbol","toJson","MutableHashMap","pipeArguments","hasProperty","TypeId","isMutableHashSet","value","MutableHashSetProto","Symbol","iterator","Array","from","keyMap","map","_","toString","toJSON","_id","values","pipe","arguments","fromHashMap","set","Object","create","empty","fromIterable","keys","k","make","add","dual","self","key","has","remove","size","clear"],"sources":["../src/MutableHashSet.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAWA,SAASA,MAAM,QAAQ,gBAAgB;AACvC,OAAO,KAAKC,IAAI,MAAM,eAAe;AACrC,SAA2BC,iBAAiB,EAAEC,MAAM,QAAQ,kBAAkB;AAC9E,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AAErD,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,WAAW,QAAQ,gBAAgB;AAE5C,MAAMC,MAAM,GAAG,oCAAoC;AAoDnD;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMC,gBAAgB,GAAOC,KAAc,IAAiCH,WAAW,CAACG,KAAK,EAAEF,MAAM,CAAC;AAE7G,MAAMG,mBAAmB,GAA4C;EACnE,CAACH,MAAM,GAAGA,MAAM;EAChB,CAACI,MAAM,CAACC,QAAQ,IAAC;IACf,OAAOC,KAAK,CAACC,IAAI,CAAC,IAAI,CAACC,MAAM,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,CAAC,CAAC,KAAKA,CAAC,CAAC,CAACN,MAAM,CAACC,QAAQ,CAAC,EAAE;EACnE,CAAC;EACDM,QAAQA,CAAA;IACN,OAAO,kBAAkBlB,MAAM,CAACa,KAAK,CAACC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG;EACtD,CAAC;EACDK,MAAMA,CAAA;IACJ,OAAO;MACLC,GAAG,EAAE,gBAAgB;MACrBC,MAAM,EAAElB,MAAM,CAACU,KAAK,CAACC,IAAI,CAAC,IAAI,CAAC;KAChC;EACH,CAAC;EACD,CAACZ,iBAAiB,IAAC;IACjB,OAAO,IAAI,CAACiB,MAAM,EAAE;EACtB,CAAC;EACDG,IAAIA,CAAA;IACF,OAAOjB,aAAa,CAAC,IAAI,EAAEkB,SAAS,CAAC;EACvC;CACD;AAED,MAAMC,WAAW,GAAOT,MAAiD,IAAuB;EAC9F,MAAMU,GAAG,GAAGC,MAAM,CAACC,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AAEC,GAAG,MAAMhC,cAAc,CAACkC,MAAM,CAACH,IAAI,CAACpB,MAAM,EAAEqB,GAAG,CAAC,EAAED,IAAI,CAAC,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,MAAMI,IAAI,GAAOJ,IAAuB,IAAa/B,cAAc,CAACmC,IAAI,CAACJ,IAAI,CAACpB,MAAM,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,MAAMyB,KAAK,GAAOL,IAAuB,KAAyB/B,cAAc,CAACoC,KAAK,CAACL,IAAI,CAACpB,MAAM,CAAC,EAAEoB,IAAI,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/MutableList.d.ts b/.opencode/node_modules/effect/dist/MutableList.d.ts index 858b08dfe3e22df8fc2b36d7c77de9d4453111fa..55eb8ecfecb1b26b3ff487998e614df9bacc9c90 100644 --- a/.opencode/node_modules/effect/dist/MutableList.d.ts +++ b/.opencode/node_modules/effect/dist/MutableList.d.ts @@ -3,9 +3,10 @@ * MutableList provides efficient append/prepend operations and is ideal for * producer-consumer patterns, queues, and streaming scenarios. * - * @example + * **Example** (Creating and consuming a mutable list) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * // Create a mutable list * const list: MutableList.MutableList = MutableList.make() @@ -26,8 +27,8 @@ * console.log(MutableList.take(list)) // 2 * ``` * - * @since 4.0.0 * @category models + * @since 2.0.0 */ export interface MutableList { head: MutableList.Bucket | undefined; @@ -38,9 +39,10 @@ export interface MutableList { * The MutableList namespace contains type definitions and utilities for working * with mutable linked lists. * - * @example + * **Example** (Typing queue processors) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * // Type annotation using the namespace * const processQueue = (queue: MutableList.MutableList) => { @@ -67,17 +69,23 @@ export interface MutableList { * } * ``` * - * @since 4.0.0 - * @category models + * @since 2.0.0 */ export declare namespace MutableList { /** - * Internal bucket structure used by MutableList to store elements efficiently. - * Buckets are linked together to form the list structure. + * Storage node used by the exposed `head` and `tail` fields of a + * `MutableList`. + * + * **Details** + * + * Most code should treat buckets as an implementation detail and use + * `MutableList` operations such as `append`, `prepend`, and `take` instead + * of constructing or mutating buckets directly. + * + * **Example** (Inspecting buckets) * - * @example * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.append(list, 1) @@ -99,8 +107,8 @@ export declare namespace MutableList { * inspectBucket(list.tail) * ``` * - * @since 4.0.0 * @category models + * @since 4.0.0 */ interface Bucket { readonly array: Array; @@ -110,12 +118,18 @@ export declare namespace MutableList { } } /** - * A unique symbol used to represent an empty result when taking elements from a MutableList. + * Defines the unique symbol used to represent an empty result when taking elements from a MutableList. * This symbol is returned by `take` when the list is empty, allowing for safe type checking. * - * @example + * **When to use** + * + * Use to detect that `take` returned no element before handling the result as a + * list item. + * + * **Example** (Checking for empty results) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * @@ -142,17 +156,18 @@ export declare namespace MutableList { * console.log(empty === MutableList.Empty) // true, list is empty * ``` * + * @category symbols * @since 4.0.0 - * @category Symbols */ export declare const Empty: unique symbol; /** * The type of the Empty symbol, used for type checking when taking elements from a MutableList. * This provides compile-time safety when checking for empty results. * - * @example + * **Example** (Handling empty results type-safely) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * @@ -190,16 +205,17 @@ export declare const Empty: unique symbol; * } * ``` * + * @category symbols * @since 4.0.0 - * @category Symbols */ export type Empty = typeof Empty; /** * Creates an empty MutableList. * - * @example + * **Example** (Creating an empty mutable list) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * @@ -216,17 +232,18 @@ export type Empty = typeof Empty; * console.log(MutableList.take(list)) // "second" * ``` * - * @since 4.0.0 * @category constructors + * @since 2.0.0 */ export declare const make: () => MutableList; /** * Appends an element to the end of the MutableList. * This operation is optimized for high-frequency usage. * - * @example + * **Example** (Appending elements) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * @@ -248,17 +265,18 @@ export declare const make: () => MutableList; * } * ``` * - * @since 4.0.0 * @category mutations + * @since 2.0.0 */ export declare const append: (self: MutableList, message: A) => void; /** * Prepends an element to the beginning of the MutableList. * This operation is optimized for high-frequency usage. * - * @example + * **Example** (Prepending elements) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * @@ -280,8 +298,8 @@ export declare const append: (self: MutableList, message: A) => void; * console.log(MutableList.take(list)) // "priority" * ``` * - * @since 4.0.0 * @category mutations + * @since 2.0.0 */ export declare const prepend: (self: MutableList, message: A) => void; /** @@ -289,9 +307,10 @@ export declare const prepend: (self: MutableList, message: A) => void; * The elements are added in order, so the first element in the iterable becomes * the new head of the list. * - * @example + * **Example** (Prepending multiple elements) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.append(list, 4) @@ -311,20 +330,28 @@ export declare const prepend: (self: MutableList, message: A) => void; * console.log(MutableList.takeAll(newList)) // ["h", "e", "l", "l", "o"] * ``` * - * @since 4.0.0 * @category mutations + * @since 4.0.0 */ export declare const prependAll: (self: MutableList, messages: Iterable) => void; /** * Prepends all elements from a ReadonlyArray to the beginning of the MutableList. * This is an optimized version that can reuse the array when mutable=true. * - * ⚠️ **Warning**: When mutable=true, the input array may be modified internally. - * Only use mutable=true when you control the array lifecycle. + * **When to use** + * + * Use when prepending a trusted array directly is worth the optimized path and + * you control whether the input may be reused. + * + * **Gotchas** + * + * When mutable=true, the input array may be modified internally. Only use + * mutable=true when you control the array lifecycle. + * + * **Example** (Prepending arrays with optional mutation) * - * @example * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.append(list, 4) @@ -342,17 +369,18 @@ export declare const prependAll: (self: MutableList, messages: Iterable * console.log(MutableList.takeAll(list)) // [10, 20, 30, 1, 2, 3, 4] * ``` * - * @since 4.0.0 * @category mutations + * @since 4.0.0 */ export declare const prependAllUnsafe: (self: MutableList, messages: ReadonlyArray, mutable?: boolean) => void; /** * Appends all elements from an iterable to the end of the MutableList. * Returns the number of elements added. * - * @example + * **Example** (Appending multiple elements) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.append(list, 1) @@ -380,8 +408,8 @@ export declare const prependAllUnsafe: (self: MutableList, messages: Reado * console.log(count) // 1000 * ``` * - * @since 4.0.0 * @category mutations + * @since 4.0.0 */ export declare const appendAll: (self: MutableList, messages: Iterable) => number; /** @@ -389,12 +417,20 @@ export declare const appendAll: (self: MutableList, messages: Iterable) * This is an optimized version that can reuse the array when mutable=true. * Returns the number of elements added. * - * ⚠️ **Warning**: When mutable=true, the input array may be modified internally. - * Only use mutable=true when you control the array lifecycle. + * **When to use** + * + * Use when appending a trusted array directly is worth the optimized path and + * you control whether the input may be reused. + * + * **Gotchas** + * + * When mutable=true, the input array may be modified internally. Only use + * mutable=true when you control the array lifecycle. + * + * **Example** (Appending arrays with optional mutation) * - * @example * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.append(list, 1) @@ -417,17 +453,18 @@ export declare const appendAll: (self: MutableList, messages: Iterable) * MutableList.appendAllUnsafe(list, bigArray, true) // Very efficient * ``` * - * @since 4.0.0 * @category mutations + * @since 4.0.0 */ export declare const appendAllUnsafe: (self: MutableList, messages: ReadonlyArray, mutable?: boolean) => number; /** * Removes all elements from the MutableList, resetting it to an empty state. * This operation is highly optimized and releases all internal memory. * - * @example + * **Example** (Clearing a mutable list) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.appendAll(list, [1, 2, 3, 4, 5]) @@ -451,8 +488,8 @@ export declare const appendAllUnsafe: (self: MutableList, messages: Readon * } * ``` * - * @since 4.0.0 * @category mutations + * @since 4.0.0 */ export declare const clear: (self: MutableList) => void; /** @@ -460,9 +497,10 @@ export declare const clear: (self: MutableList) => void; * The taken elements are removed from the list. This operation is optimized for performance * and includes zero-copy optimizations when possible. * - * @example + * **Example** (Taking batches) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.appendAll(list, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) @@ -493,22 +531,40 @@ export declare const clear: (self: MutableList) => void; * } * ``` * - * @since 4.0.0 * @category elements + * @since 4.0.0 */ export declare const takeN: (self: MutableList, n: number) => Array; /** - * @since 4.0.0 + * Removes up to `n` elements from the beginning of the `MutableList` without + * returning them. + * + * **When to use** + * + * Use to discard a bounded number of values from the head of a `MutableList` + * when the removed values are not needed. + * + * **Details** + * + * If `n` is less than or equal to zero, or the list is empty, the list is left + * unchanged. If `n` is greater than or equal to the current length, the list is + * cleared. + * + * @see {@link takeN} for removing up to `n` values and returning them as an array + * @see {@link clear} for removing every value from the list + * * @category elements + * @since 4.0.0 */ export declare const takeNVoid: (self: MutableList, n: number) => void; /** * Takes all elements from the MutableList and returns them as an array. * The list becomes empty after this operation. This is equivalent to takeN(list, list.length). * - * @example + * **Example** (Draining all elements) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.appendAll(list, ["apple", "banana", "cherry"]) @@ -540,8 +596,8 @@ export declare const takeNVoid: (self: MutableList, n: number) => void; * } * ``` * - * @since 4.0.0 * @category elements + * @since 4.0.0 */ export declare const takeAll: (self: MutableList) => Array; /** @@ -549,9 +605,10 @@ export declare const takeAll: (self: MutableList) => Array; * Returns the element if available, or the Empty symbol if the list is empty. * The taken element is removed from the list. * - * @example + * **Example** (Taking one element) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.appendAll(list, ["first", "second", "third"]) @@ -589,27 +646,48 @@ export declare const takeAll: (self: MutableList) => Array; * } * ``` * - * @since 4.0.0 * @category elements + * @since 4.0.0 */ export declare const take: (self: MutableList) => Empty | A; /** - * @since 4.0.0 + * Copies up to `n` elements from the beginning of the `MutableList` into a new + * array without modifying the list. + * + * **When to use** + * + * Use when you need to inspect or snapshot a bounded prefix of the list without + * consuming it. + * + * @see {@link takeN} for removing up to `n` values and returning them as an array + * * @category elements + * @since 4.0.0 */ export declare const toArrayN: (self: MutableList, n: number) => Array; /** - * @since 4.0.0 + * Copies all current elements of the `MutableList` into a new array without + * modifying the list. + * + * **When to use** + * + * Use when you need a snapshot of all current elements while keeping the list + * unchanged. + * + * @see {@link takeAll} for converting all elements to an array and clearing the list + * * @category elements + * @since 4.0.0 */ export declare const toArray: (self: MutableList) => Array; /** * Filters the MutableList in place, keeping only elements that satisfy the predicate. * This operation modifies the list and rebuilds its internal structure for efficiency. * - * @example + * **Example** (Filtering in place) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.appendAll(list, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) @@ -619,7 +697,6 @@ export declare const toArray: (self: MutableList) => Array; * // Keep only even numbers * MutableList.filter(list, (n) => n % 2 === 0) * - * console.log(list.length) // 5 * console.log(MutableList.takeAll(list)) // [2, 4, 6, 8, 10] * * // Filter with index @@ -641,20 +718,35 @@ export declare const toArray: (self: MutableList) => Array; * * // Keep only errors * MutableList.filter(logs, (log) => log.level === "ERROR") - * console.log(MutableList.takeAll(logs)) // Only error logs + * console.log(MutableList.takeAll(logs).map((log) => log.message)) // ["Connection failed", "Timeout"] * ``` * - * @since 4.0.0 * @category mutations + * @since 4.0.0 */ export declare const filter: (self: MutableList, f: (value: A, i: number) => boolean) => void; /** - * Removes all occurrences of a specific value from the MutableList. - * This operation modifies the list in place. + * Removes all occurrences of a value from the `MutableList` using JavaScript + * strict equality semantics. + * + * **When to use** + * + * Use when in-place removal should use JavaScript identity/strict equality + * rather than Effect structural equality. + * + * **Details** + * + * The list is modified in place. + * + * **Gotchas** + * + * Values are compared with `!==`, so this does not use Effect structural + * equality. + * + * **Example** (Removing matching values) * - * @example * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.appendAll(list, ["apple", "banana", "apple", "cherry", "apple"]) @@ -664,12 +756,13 @@ export declare const filter: (self: MutableList, f: (value: A, i: number) * // Remove all occurrences of "apple" * MutableList.remove(list, "apple") * - * console.log(list.length) // 2 * console.log(MutableList.takeAll(list)) // ["banana", "cherry"] * * // Remove non-existent value (no effect) - * MutableList.remove(list, "grape") - * console.log(list.length) // 2 + * const colors = MutableList.make() + * MutableList.appendAll(colors, ["red", "blue"]) + * MutableList.remove(colors, "green") + * console.log(MutableList.takeAll(colors)) // ["red", "blue"] * * // Real-world example: removing completed tasks * const tasks = MutableList.make<{ id: number; status: string }>() @@ -682,11 +775,11 @@ export declare const filter: (self: MutableList, f: (value: A, i: number) * * // Remove completed tasks by filtering status * MutableList.filter(tasks, (task) => task.status !== "completed") - * console.log(MutableList.takeAll(tasks)) // Only pending tasks + * console.log(MutableList.takeAll(tasks).map((task) => task.id)) // [1, 3] * ``` * - * @since 4.0.0 * @category mutations + * @since 4.0.0 */ export declare const remove: (self: MutableList, value: A) => void; //# sourceMappingURL=MutableList.d.ts.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/MutableList.d.ts.map b/.opencode/node_modules/effect/dist/MutableList.d.ts.map index 3961d9832d416943d80ad3be52f4c1928d459a9b..f9784fba4e59cf47763ce077f1917ce11feb9e76 100644 --- a/.opencode/node_modules/effect/dist/MutableList.d.ts.map +++ b/.opencode/node_modules/effect/dist/MutableList.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"MutableList.d.ts","sourceRoot":"","sources":["../src/MutableList.ts"],"names":[],"mappings":"AAsCA;;;;;;;;;;;;;;;;;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AAC,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,CAAC,CAA6B,CAAA;AAEtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,KAAG,KAAK,GAAG,CActD,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,KAAG,KAAK,CAAC,CAAC,CAapE,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,CAAC,CAAgC,CAAA;AAEzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO,KAAG,IAkBrF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,KAAG,IAAwC,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/MutableList.js b/.opencode/node_modules/effect/dist/MutableList.js index 8189490ac32501d12ff0c2f9c66bfa03556866e4..d5fe0a4e02e6afb3659676edcd5646d2ed8e91af 100644 --- a/.opencode/node_modules/effect/dist/MutableList.js +++ b/.opencode/node_modules/effect/dist/MutableList.js @@ -1,47 +1,27 @@ /** - * @fileoverview - * MutableList is an efficient, mutable linked list implementation optimized for high-throughput - * scenarios like logging, queuing, and streaming. It uses a bucket-based architecture where - * elements are stored in arrays (buckets) linked together, providing optimal performance for - * both append and prepend operations. - * - * The implementation uses a sophisticated bucket system: - * - Each bucket contains an array of elements with an offset pointer - * - Buckets can be marked as mutable or immutable for optimization - * - Elements are taken from the head and added to the tail - * - Memory is efficiently managed through bucket reuse and cleanup - * - * Key Features: - * - Highly optimized for high-frequency append/prepend operations - * - Memory efficient with automatic cleanup of consumed elements - * - Support for bulk operations (appendAll, prependAll, takeN) - * - Filtering and removal operations - * - Zero-copy optimizations for certain scenarios - * - * Performance Characteristics: - * - Append/Prepend: O(1) amortized - * - Take/TakeN: O(1) per element taken - * - Length: O(1) - * - Clear: O(1) - * - Filter: O(n) - * - * Ideal Use Cases: - * - High-throughput logging systems - * - Producer-consumer queues - * - Streaming data buffers - * - Real-time data processing pipelines + * Mutable lists for collecting ordered values and draining them from the front. + * A `MutableList` can append values to the end, prepend values to the + * beginning, take one or more values from the front, inspect its contents as an + * array, filter values, remove values, and clear itself. All operations update + * the same list object in place and keep its `length` field current. Taking + * from an empty list returns the `Empty` symbol. * * @since 4.0.0 - * @category data-structures */ import * as Arr from "./Array.js"; /** - * A unique symbol used to represent an empty result when taking elements from a MutableList. + * Defines the unique symbol used to represent an empty result when taking elements from a MutableList. * This symbol is returned by `take` when the list is empty, allowing for safe type checking. * - * @example + * **When to use** + * + * Use to detect that `take` returned no element before handling the result as a + * list item. + * + * **Example** (Checking for empty results) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * @@ -68,16 +48,17 @@ import * as Arr from "./Array.js"; * console.log(empty === MutableList.Empty) // true, list is empty * ``` * + * @category symbols * @since 4.0.0 - * @category Symbols */ export const Empty = /*#__PURE__*/Symbol.for("effect/MutableList/Empty"); /** * Creates an empty MutableList. * - * @example + * **Example** (Creating an empty mutable list) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * @@ -94,8 +75,8 @@ export const Empty = /*#__PURE__*/Symbol.for("effect/MutableList/Empty"); * console.log(MutableList.take(list)) // "second" * ``` * - * @since 4.0.0 * @category constructors + * @since 2.0.0 */ export const make = () => ({ head: undefined, @@ -112,9 +93,10 @@ const emptyBucket = () => ({ * Appends an element to the end of the MutableList. * This operation is optimized for high-frequency usage. * - * @example + * **Example** (Appending elements) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * @@ -136,8 +118,8 @@ const emptyBucket = () => ({ * } * ``` * - * @since 4.0.0 * @category mutations + * @since 2.0.0 */ export const append = (self, message) => { if (!self.tail) { @@ -153,9 +135,10 @@ export const append = (self, message) => { * Prepends an element to the beginning of the MutableList. * This operation is optimized for high-frequency usage. * - * @example + * **Example** (Prepending elements) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * @@ -177,8 +160,8 @@ export const append = (self, message) => { * console.log(MutableList.take(list)) // "priority" * ``` * - * @since 4.0.0 * @category mutations + * @since 2.0.0 */ export const prepend = (self, message) => { self.head = { @@ -194,9 +177,10 @@ export const prepend = (self, message) => { * The elements are added in order, so the first element in the iterable becomes * the new head of the list. * - * @example + * **Example** (Prepending multiple elements) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.append(list, 4) @@ -216,20 +200,28 @@ export const prepend = (self, message) => { * console.log(MutableList.takeAll(newList)) // ["h", "e", "l", "l", "o"] * ``` * - * @since 4.0.0 * @category mutations + * @since 4.0.0 */ export const prependAll = (self, messages) => prependAllUnsafe(self, Arr.fromIterable(messages), !Array.isArray(messages)); /** * Prepends all elements from a ReadonlyArray to the beginning of the MutableList. * This is an optimized version that can reuse the array when mutable=true. * - * ⚠️ **Warning**: When mutable=true, the input array may be modified internally. - * Only use mutable=true when you control the array lifecycle. + * **When to use** + * + * Use when prepending a trusted array directly is worth the optimized path and + * you control whether the input may be reused. + * + * **Gotchas** + * + * When mutable=true, the input array may be modified internally. Only use + * mutable=true when you control the array lifecycle. + * + * **Example** (Prepending arrays with optional mutation) * - * @example * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.append(list, 4) @@ -247,8 +239,8 @@ export const prependAll = (self, messages) => prependAllUnsafe(self, Arr.fromIte * console.log(MutableList.takeAll(list)) // [10, 20, 30, 1, 2, 3, 4] * ``` * - * @since 4.0.0 * @category mutations + * @since 4.0.0 */ export const prependAllUnsafe = (self, messages, mutable = false) => { self.head = { @@ -263,9 +255,10 @@ export const prependAllUnsafe = (self, messages, mutable = false) => { * Appends all elements from an iterable to the end of the MutableList. * Returns the number of elements added. * - * @example + * **Example** (Appending multiple elements) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.append(list, 1) @@ -293,8 +286,8 @@ export const prependAllUnsafe = (self, messages, mutable = false) => { * console.log(count) // 1000 * ``` * - * @since 4.0.0 * @category mutations + * @since 4.0.0 */ export const appendAll = (self, messages) => appendAllUnsafe(self, Arr.fromIterable(messages), !Array.isArray(messages)); /** @@ -302,12 +295,20 @@ export const appendAll = (self, messages) => appendAllUnsafe(self, Arr.fromItera * This is an optimized version that can reuse the array when mutable=true. * Returns the number of elements added. * - * ⚠️ **Warning**: When mutable=true, the input array may be modified internally. - * Only use mutable=true when you control the array lifecycle. + * **When to use** + * + * Use when appending a trusted array directly is worth the optimized path and + * you control whether the input may be reused. + * + * **Gotchas** + * + * When mutable=true, the input array may be modified internally. Only use + * mutable=true when you control the array lifecycle. + * + * **Example** (Appending arrays with optional mutation) * - * @example * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.append(list, 1) @@ -330,8 +331,8 @@ export const appendAll = (self, messages) => appendAllUnsafe(self, Arr.fromItera * MutableList.appendAllUnsafe(list, bigArray, true) // Very efficient * ``` * - * @since 4.0.0 * @category mutations + * @since 4.0.0 */ export const appendAllUnsafe = (self, messages, mutable = false) => { if (messages.length === 0) { @@ -355,9 +356,10 @@ export const appendAllUnsafe = (self, messages, mutable = false) => { * Removes all elements from the MutableList, resetting it to an empty state. * This operation is highly optimized and releases all internal memory. * - * @example + * **Example** (Clearing a mutable list) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.appendAll(list, [1, 2, 3, 4, 5]) @@ -381,8 +383,8 @@ export const appendAllUnsafe = (self, messages, mutable = false) => { * } * ``` * - * @since 4.0.0 * @category mutations + * @since 4.0.0 */ export const clear = self => { self.head = self.tail = undefined; @@ -393,9 +395,10 @@ export const clear = self => { * The taken elements are removed from the list. This operation is optimized for performance * and includes zero-copy optimizations when possible. * - * @example + * **Example** (Taking batches) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.appendAll(list, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) @@ -426,8 +429,8 @@ export const clear = self => { * } * ``` * - * @since 4.0.0 * @category elements + * @since 4.0.0 */ export const takeN = (self, n) => { if (n <= 0 || !self.head) return []; @@ -458,8 +461,25 @@ export const takeN = (self, n) => { return array; }; /** - * @since 4.0.0 + * Removes up to `n` elements from the beginning of the `MutableList` without + * returning them. + * + * **When to use** + * + * Use to discard a bounded number of values from the head of a `MutableList` + * when the removed values are not needed. + * + * **Details** + * + * If `n` is less than or equal to zero, or the list is empty, the list is left + * unchanged. If `n` is greater than or equal to the current length, the list is + * cleared. + * + * @see {@link takeN} for removing up to `n` values and returning them as an array + * @see {@link clear} for removing every value from the list + * * @category elements + * @since 4.0.0 */ export const takeNVoid = (self, n) => { if (n <= 0 || !self.head) return; @@ -488,9 +508,10 @@ export const takeNVoid = (self, n) => { * Takes all elements from the MutableList and returns them as an array. * The list becomes empty after this operation. This is equivalent to takeN(list, list.length). * - * @example + * **Example** (Draining all elements) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.appendAll(list, ["apple", "banana", "cherry"]) @@ -522,8 +543,8 @@ export const takeNVoid = (self, n) => { * } * ``` * - * @since 4.0.0 * @category elements + * @since 4.0.0 */ export const takeAll = self => takeN(self, self.length); /** @@ -531,9 +552,10 @@ export const takeAll = self => takeN(self, self.length); * Returns the element if available, or the Empty symbol if the list is empty. * The taken element is removed from the list. * - * @example + * **Example** (Taking one element) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.appendAll(list, ["first", "second", "third"]) @@ -571,8 +593,8 @@ export const takeAll = self => takeN(self, self.length); * } * ``` * - * @since 4.0.0 * @category elements + * @since 4.0.0 */ export const take = self => { if (!self.head) return Empty; @@ -590,8 +612,18 @@ export const take = self => { return message; }; /** - * @since 4.0.0 + * Copies up to `n` elements from the beginning of the `MutableList` into a new + * array without modifying the list. + * + * **When to use** + * + * Use when you need to inspect or snapshot a bounded prefix of the list without + * consuming it. + * + * @see {@link takeN} for removing up to `n` values and returning them as an array + * * @category elements + * @since 4.0.0 */ export const toArrayN = (self, n) => { const length = Math.min(n, self.length); @@ -608,17 +640,28 @@ export const toArrayN = (self, n) => { return out; }; /** - * @since 4.0.0 + * Copies all current elements of the `MutableList` into a new array without + * modifying the list. + * + * **When to use** + * + * Use when you need a snapshot of all current elements while keeping the list + * unchanged. + * + * @see {@link takeAll} for converting all elements to an array and clearing the list + * * @category elements + * @since 4.0.0 */ export const toArray = self => toArrayN(self, self.length); /** * Filters the MutableList in place, keeping only elements that satisfy the predicate. * This operation modifies the list and rebuilds its internal structure for efficiency. * - * @example + * **Example** (Filtering in place) + * * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.appendAll(list, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) @@ -628,7 +671,6 @@ export const toArray = self => toArrayN(self, self.length); * // Keep only even numbers * MutableList.filter(list, (n) => n % 2 === 0) * - * console.log(list.length) // 5 * console.log(MutableList.takeAll(list)) // [2, 4, 6, 8, 10] * * // Filter with index @@ -650,11 +692,11 @@ export const toArray = self => toArrayN(self, self.length); * * // Keep only errors * MutableList.filter(logs, (log) => log.level === "ERROR") - * console.log(MutableList.takeAll(logs)) // Only error logs + * console.log(MutableList.takeAll(logs).map((log) => log.message)) // ["Connection failed", "Timeout"] * ``` * - * @since 4.0.0 * @category mutations + * @since 4.0.0 */ export const filter = (self, f) => { const array = []; @@ -673,14 +715,30 @@ export const filter = (self, f) => { offset: 0, next: undefined }; + self.length = array.length; }; /** - * Removes all occurrences of a specific value from the MutableList. - * This operation modifies the list in place. + * Removes all occurrences of a value from the `MutableList` using JavaScript + * strict equality semantics. + * + * **When to use** + * + * Use when in-place removal should use JavaScript identity/strict equality + * rather than Effect structural equality. + * + * **Details** + * + * The list is modified in place. + * + * **Gotchas** + * + * Values are compared with `!==`, so this does not use Effect structural + * equality. + * + * **Example** (Removing matching values) * - * @example * ```ts - * import * as MutableList from "effect/MutableList" + * import { MutableList } from "effect" * * const list = MutableList.make() * MutableList.appendAll(list, ["apple", "banana", "apple", "cherry", "apple"]) @@ -690,12 +748,13 @@ export const filter = (self, f) => { * // Remove all occurrences of "apple" * MutableList.remove(list, "apple") * - * console.log(list.length) // 2 * console.log(MutableList.takeAll(list)) // ["banana", "cherry"] * * // Remove non-existent value (no effect) - * MutableList.remove(list, "grape") - * console.log(list.length) // 2 + * const colors = MutableList.make() + * MutableList.appendAll(colors, ["red", "blue"]) + * MutableList.remove(colors, "green") + * console.log(MutableList.takeAll(colors)) // ["red", "blue"] * * // Real-world example: removing completed tasks * const tasks = MutableList.make<{ id: number; status: string }>() @@ -708,11 +767,11 @@ export const filter = (self, f) => { * * // Remove completed tasks by filtering status * MutableList.filter(tasks, (task) => task.status !== "completed") - * console.log(MutableList.takeAll(tasks)) // Only pending tasks + * console.log(MutableList.takeAll(tasks).map((task) => task.id)) // [1, 3] * ``` * - * @since 4.0.0 * @category mutations + * @since 4.0.0 */ export const remove = (self, value) => filter(self, v => v !== value); //# sourceMappingURL=MutableList.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/MutableList.js.map b/.opencode/node_modules/effect/dist/MutableList.js.map index 1fe2f46cbbc2249b6e4353994d7dfdcd2e33fe82..418a169ee13525ed44e047ba1425a787a9b5d26f 100644 --- a/.opencode/node_modules/effect/dist/MutableList.js.map +++ b/.opencode/node_modules/effect/dist/MutableList.js.map @@ -1 +1 @@ -{"version":3,"file":"MutableList.js","names":["Arr","Empty","Symbol","for","make","head","undefined","tail","length","emptyBucket","array","mutable","offset","next","append","self","message","push","prepend","prependAll","messages","prependAllUnsafe","fromIterable","Array","isArray","appendAll","appendAllUnsafe","chunk","clear","takeN","n","Math","min","index","takeNVoid","count","size","takeAll","take","toArrayN","out","bucket","i","toArray","filter","f","remove","value","v"],"sources":["../src/MutableList.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,OAAO,KAAKA,GAAG,MAAM,YAAY;AAmHjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,OAAO,MAAMC,KAAK,gBAAkBC,MAAM,CAACC,GAAG,CAAC,0BAA0B,CAAC;AAmD1E;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMC,IAAI,GAAGA,CAAA,MAA0B;EAC5CC,IAAI,EAAEC,SAAS;EACfC,IAAI,EAAED,SAAS;EACfE,MAAM,EAAE;CACT,CAAC;AAEF,MAAMC,WAAW,GAAGA,CAAA,MAAyC;EAC3DC,KAAK,EAAE,EAAE;EACTC,OAAO,EAAE,IAAI;EACbC,MAAM,EAAE,CAAC;EACTC,IAAI,EAAEP;CACP,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,MAAMQ,MAAM,GAAGA,CAAIC,IAAoB,EAAEC,OAAU,KAAU;EAClE,I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MAAM,EAAE,OAAOgC,GAAG;IAClC;IACAC,MAAM,GAAGA,MAAM,CAAC5B,IAAI;EACtB;EACA,OAAO2B,GAAG;AACZ,CAAC;AAED;;;;AAIA,OAAO,MAAMG,OAAO,GAAO5B,IAAoB,IAAewB,QAAQ,CAACxB,IAAI,EAAEA,IAAI,CAACP,MAAM,CAAC;AAEzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,OAAO,MAAMoC,MAAM,GAAGA,CAAI7B,IAAoB,EAAE8B,CAAmC,KAAU;EAC3F,MAAMnC,KAAK,GAAa,EAAE;EAC1B,IAAIiB,KAAK,GAAsCZ,IAAI,CAACV,IAAI;EACxD,OAAOsB,KAAK,EAAE;IACZ,KAAK,IAAIe,CAAC,GAAGf,KAAK,CAACf,MAAM,EAAE8B,CAAC,GAAGf,KAAK,CAACjB,KAAK,CAACF,MAAM,EAAEkC,CAAC,EAAE,EAAE;MACtD,IAAIG,CAAC,CAAClB,KAAK,CAACjB,KAAK,CAACgC,CAAC,CAAC,EAAEA,CAAC,CAAC,EAAE;QACxBhC,KAAK,CAACO,IAAI,CAACU,KAAK,CAACjB,KAAK,CAACgC,CAAC,CAAC,CAAC;MAC5B;IACF;IACAf,KAAK,GAAGA,KAAK,CAACd,IAAI;EACpB;EACAE,IAAI,CAACV,IAAI,GAAGU,IAAI,CAACR,IAAI,GAAG;IACtBG,KAAK;IACLC,OAAO,EAAE,IAAI;IACbC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAEP;GACP;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,OAAO,MAAMwC,MAAM,GAAGA,CAAI/B,IAAoB,EAAEgC,KAAQ,KAAWH,MAAM,CAAC7B,IAAI,EAAGiC,CAAC,IAAKA,CAAC,KAAKD,KAAK,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"MutableList.js","names":["Arr","Empty","Symbol","for","make","head","undefined","tail","length","emptyBucket","array","mutable","offset","next","append","self","message","push","prepend","prependAll","messages","prependAllUnsafe","fromIterable","Array","isArray","appendAll","appendAllUnsafe","chunk","clear","takeN","n","Math","min","index","takeNVoid","count","size","takeAll","take","toArrayN","out","bucket","i","toArray","filter","f","remove","value","v"],"sources":["../src/MutableList.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;AAUA,OAAO,KAAKA,GAAG,MAAM,YAAY;AA2HjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,OAAO,MAAMC,KAAK,gBAAkBC,MAAM,CAACC,GAAG,CAAC,0BAA0B,CAAC;AAoD1E;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAMC,IAAI,GAAGA,CAAA,MAA0B;EAC5CC,IAAI,EAAEC,SAAS;EACfC,IAAI,EAAED,SAAS;EACfE,MAAM,EAAE;CACT,CAAC;AAEF,MAAMC,WAAW,GAAGA,CAAA,MAAyC;EAC3DC,KAAK,EAAE,EAAE;EACTC,OAAO,EAAE,IAAI;EACbC,MAAM,EAAE,CAAC;EACTC,IAAI,EAAEP;CACP,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,MAAMQ,MAAM,GAAGA,CAAIC,IAAoB,EAAEC,OAAU,KAAU;EAClE,IAAI,CAACD,IAAI,CAACR,IAAI,EAAE;IACdQ,IAAI,CAACV,IAAI,GAAGU,IAAI,CAACR,IAAI,GAAGE,WAAW,EAAE;EACvC,CAAC,MAAM,IAAI,CAACM,IAAI,CAACR,IAAI,CAACI,OAAO,EAAE;IAC7BI,IAAI,CAACR,IAAI,CAACM,IAAI,GAAGJ,WAAW,EAAE;IAC9BM,IAAI,CAACR,IAAI,GAAGQ,IAAI,CAACR,IAAI,CAACM,IAAI;EAC5B;EACAE,IAAI,CAACR,IAAK,CAACG,KAAK,CAACO,IAAI,CAACD,OAAO,CAAC;EAC9BD,IAAI,CAACP,MAAM,EA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oB,EAAE8B,CAAmC,KAAU;EAC3F,MAAMnC,KAAK,GAAa,EAAE;EAC1B,IAAIiB,KAAK,GAAsCZ,IAAI,CAACV,IAAI;EACxD,OAAOsB,KAAK,EAAE;IACZ,KAAK,IAAIe,CAAC,GAAGf,KAAK,CAACf,MAAM,EAAE8B,CAAC,GAAGf,KAAK,CAACjB,KAAK,CAACF,MAAM,EAAEkC,CAAC,EAAE,EAAE;MACtD,IAAIG,CAAC,CAAClB,KAAK,CAACjB,KAAK,CAACgC,CAAC,CAAC,EAAEA,CAAC,CAAC,EAAE;QACxBhC,KAAK,CAACO,IAAI,CAACU,KAAK,CAACjB,KAAK,CAACgC,CAAC,CAAC,CAAC;MAC5B;IACF;IACAf,KAAK,GAAGA,KAAK,CAACd,IAAI;EACpB;EACAE,IAAI,CAACV,IAAI,GAAGU,IAAI,CAACR,IAAI,GAAG;IACtBG,KAAK;IACLC,OAAO,EAAE,IAAI;IACbC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAEP;GACP;EACDS,IAAI,CAACP,MAAM,GAAGE,KAAK,CAACF,MAAM;AAC5B,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,OAAO,MAAMsC,MAAM,GAAGA,CAAI/B,IAAoB,EAAEgC,KAAQ,KAAWH,MAAM,CAAC7B,IAAI,EAAGiC,CAAC,IAAKA,CAAC,KAAKD,KAAK,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/MutableRef.d.ts b/.opencode/node_modules/effect/dist/MutableRef.d.ts index 7efbdcb1985de56f1cf59f538966879639e8136c..6327de4fe813d410c5979cb045b4367a16de596b 100644 --- a/.opencode/node_modules/effect/dist/MutableRef.d.ts +++ b/.opencode/node_modules/effect/dist/MutableRef.d.ts @@ -2,7 +2,20 @@ import { type Inspectable } from "./Inspectable.ts"; import type { Pipeable } from "./Pipeable.ts"; declare const TypeId = "~effect/MutableRef"; /** - * @example + * A synchronous mutable reference that stores a current value. + * + * **When to use** + * + * Use to keep local mutable state in a stable, pipeable reference. + * + * **Details** + * + * Read or write the value directly through `.current`, or use the `MutableRef` + * helpers for pipeable updates such as `get`, `set`, `update`, and + * `compareAndSet`. All operations mutate the same reference in place. + * + * **Example** (Creating and updating refs) + * * ```ts * import { MutableRef } from "effect" * @@ -33,8 +46,8 @@ declare const TypeId = "~effect/MutableRef"; * console.log(config.current.timeout) // 10000 * ``` * - * @since 2.0.0 * @category models + * @since 2.0.0 */ export interface MutableRef extends Pipeable, Inspectable { readonly [TypeId]: typeof TypeId; @@ -43,7 +56,12 @@ export interface MutableRef extends Pipeable, Inspectable { /** * Creates a new MutableRef with the specified initial value. * - * @example + * **When to use** + * + * Use to create a synchronous `MutableRef` initialized with a value. + * + * **Example** (Creating mutable refs) + * * ```ts * import { MutableRef } from "effect" * @@ -61,16 +79,22 @@ export interface MutableRef extends Pipeable, Inspectable { * console.log(MutableRef.get(status)) // "running" * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const make: (value: T) => MutableRef; /** - * Atomically sets the value to newValue if the current value equals oldValue. + * Sets the value to newValue atomically if the current value equals oldValue. * Returns true if the value was updated, false otherwise. * Uses Effect's Equal interface for value comparison. * - * @example + * **When to use** + * + * Use to replace a `MutableRef` value only when the current value still matches + * an expected value. + * + * **Example** (Comparing and setting values) + * * ```ts * import { MutableRef } from "effect" * @@ -98,16 +122,22 @@ export declare const make: (value: T) => MutableRef; * console.log(casUpdate(ref)) // true * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export declare const compareAndSet: { /** - * Atomically sets the value to newValue if the current value equals oldValue. + * Sets the value to newValue atomically if the current value equals oldValue. * Returns true if the value was updated, false otherwise. * Uses Effect's Equal interface for value comparison. * - * @example + * **When to use** + * + * Use to replace a `MutableRef` value only when the current value still matches + * an expected value. + * + * **Example** (Comparing and setting values) + * * ```ts * import { MutableRef } from "effect" * @@ -135,16 +165,22 @@ export declare const compareAndSet: { * console.log(casUpdate(ref)) // true * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ (oldValue: T, newValue: T): (self: MutableRef) => boolean; /** - * Atomically sets the value to newValue if the current value equals oldValue. + * Sets the value to newValue atomically if the current value equals oldValue. * Returns true if the value was updated, false otherwise. * Uses Effect's Equal interface for value comparison. * - * @example + * **When to use** + * + * Use to replace a `MutableRef` value only when the current value still matches + * an expected value. + * + * **Example** (Comparing and setting values) + * * ```ts * import { MutableRef } from "effect" * @@ -172,15 +208,21 @@ export declare const compareAndSet: { * console.log(casUpdate(ref)) // true * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ (self: MutableRef, oldValue: T, newValue: T): boolean; }; /** * Decrements a numeric MutableRef by 1 and returns the reference. * - * @example + * **When to use** + * + * Use when you need an in-place `MutableRef` decrement that returns the same + * `MutableRef`. + * + * **Example** (Decrementing numeric refs) + * * ```ts * import { MutableRef } from "effect" * @@ -203,14 +245,20 @@ export declare const compareAndSet: { * } * ``` * - * @since 2.0.0 * @category numeric + * @since 2.0.0 */ export declare const decrement: (self: MutableRef) => MutableRef; /** * Decrements a numeric MutableRef by 1 and returns the new value. * - * @example + * **When to use** + * + * Use to decrement a numeric `MutableRef` and immediately read the updated + * value. + * + * **Example** (Decrementing and reading refs) + * * ```ts * import { MutableRef } from "effect" * @@ -233,14 +281,19 @@ export declare const decrement: (self: MutableRef) => MutableRef * } * ``` * - * @since 2.0.0 * @category numeric + * @since 2.0.0 */ export declare const decrementAndGet: (self: MutableRef) => number; /** * Gets the current value of the MutableRef. * - * @example + * **When to use** + * + * Use to read the current `MutableRef` value without mutating it. + * + * **Example** (Reading current values) + * * ```ts * import { MutableRef } from "effect" * @@ -261,14 +314,19 @@ export declare const decrementAndGet: (self: MutableRef) => number; * console.log(value1 === value2) // true * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export declare const get: (self: MutableRef) => T; /** * Decrements a numeric MutableRef by 1 and returns the previous value. * - * @example + * **When to use** + * + * Use to read the current numeric `MutableRef` value before decrementing it. + * + * **Example** (Reading before decrementing) + * * ```ts * import { MutableRef } from "effect" * @@ -292,14 +350,19 @@ export declare const get: (self: MutableRef) => T; * console.log(`Current: ${currentIndex}, Next: ${MutableRef.get(index)}`) // "Current: 3, Next: 2" * ``` * - * @since 2.0.0 * @category numeric + * @since 2.0.0 */ export declare const getAndDecrement: (self: MutableRef) => number; /** * Increments a numeric MutableRef by 1 and returns the previous value. * - * @example + * **When to use** + * + * Use to read the current numeric `MutableRef` value before incrementing it. + * + * **Example** (Reading before incrementing) + * * ```ts * import { MutableRef } from "effect" * @@ -331,14 +394,20 @@ export declare const getAndDecrement: (self: MutableRef) => number; * } * ``` * - * @since 2.0.0 * @category numeric + * @since 2.0.0 */ export declare const getAndIncrement: (self: MutableRef) => number; /** * Sets the MutableRef to a new value and returns the previous value. * - * @example + * **When to use** + * + * Use to replace the current `MutableRef` value while keeping the previous + * value. + * + * **Example** (Reading before setting) + * * ```ts * import { MutableRef } from "effect" * @@ -366,14 +435,20 @@ export declare const getAndIncrement: (self: MutableRef) => number; * console.log(MutableRef.get(buffer)) // [] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export declare const getAndSet: { /** * Sets the MutableRef to a new value and returns the previous value. * - * @example + * **When to use** + * + * Use to replace the current `MutableRef` value while keeping the previous + * value. + * + * **Example** (Reading before setting) + * * ```ts * import { MutableRef } from "effect" * @@ -401,14 +476,20 @@ export declare const getAndSet: { * console.log(MutableRef.get(buffer)) // [] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ (value: T): (self: MutableRef) => T; /** * Sets the MutableRef to a new value and returns the previous value. * - * @example + * **When to use** + * + * Use to replace the current `MutableRef` value while keeping the previous + * value. + * + * **Example** (Reading before setting) + * * ```ts * import { MutableRef } from "effect" * @@ -436,8 +517,8 @@ export declare const getAndSet: { * console.log(MutableRef.get(buffer)) // [] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ (self: MutableRef, value: T): T; }; @@ -445,7 +526,13 @@ export declare const getAndSet: { * Updates the MutableRef with the result of applying a function to its current value, * and returns the previous value. * - * @example + * **When to use** + * + * Use to transform the current `MutableRef` value while keeping the previous + * value. + * + * **Example** (Reading before updating) + * * ```ts * import { MutableRef } from "effect" * @@ -479,15 +566,21 @@ export declare const getAndSet: { * console.log(MutableRef.get(list)) // [1, 2, 3, 4] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export declare const getAndUpdate: { /** * Updates the MutableRef with the result of applying a function to its current value, * and returns the previous value. * - * @example + * **When to use** + * + * Use to transform the current `MutableRef` value while keeping the previous + * value. + * + * **Example** (Reading before updating) + * * ```ts * import { MutableRef } from "effect" * @@ -521,15 +614,21 @@ export declare const getAndUpdate: { * console.log(MutableRef.get(list)) // [1, 2, 3, 4] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ (f: (value: T) => T): (self: MutableRef) => T; /** * Updates the MutableRef with the result of applying a function to its current value, * and returns the previous value. * - * @example + * **When to use** + * + * Use to transform the current `MutableRef` value while keeping the previous + * value. + * + * **Example** (Reading before updating) + * * ```ts * import { MutableRef } from "effect" * @@ -563,15 +662,21 @@ export declare const getAndUpdate: { * console.log(MutableRef.get(list)) // [1, 2, 3, 4] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ (self: MutableRef, f: (value: T) => T): T; }; /** * Increments a numeric MutableRef by 1 and returns the reference. * - * @example + * **When to use** + * + * Use when you need an in-place `MutableRef` increment that returns the same + * `MutableRef`. + * + * **Example** (Incrementing numeric refs) + * * ```ts * import { MutableRef } from "effect" * @@ -597,14 +702,20 @@ export declare const getAndUpdate: { * console.log(result === counter) // true * ``` * - * @since 2.0.0 * @category numeric + * @since 2.0.0 */ export declare const increment: (self: MutableRef) => MutableRef; /** * Increments a numeric MutableRef by 1 and returns the new value. * - * @example + * **When to use** + * + * Use to increment a numeric `MutableRef` and immediately read the updated + * value. + * + * **Example** (Incrementing and reading refs) + * * ```ts * import { MutableRef } from "effect" * @@ -631,14 +742,20 @@ export declare const increment: (self: MutableRef) => MutableRef * } * ``` * - * @since 2.0.0 * @category numeric + * @since 2.0.0 */ export declare const incrementAndGet: (self: MutableRef) => number; /** * Sets the MutableRef to a new value and returns the reference. * - * @example + * **When to use** + * + * Use when you need an in-place `MutableRef` replacement that returns the same + * `MutableRef`. + * + * **Example** (Setting values) + * * ```ts * import { MutableRef } from "effect" * @@ -670,14 +787,20 @@ export declare const incrementAndGet: (self: MutableRef) => number; * MutableRef.set(state, "success") * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export declare const set: { /** * Sets the MutableRef to a new value and returns the reference. * - * @example + * **When to use** + * + * Use when you need an in-place `MutableRef` replacement that returns the same + * `MutableRef`. + * + * **Example** (Setting values) + * * ```ts * import { MutableRef } from "effect" * @@ -709,14 +832,20 @@ export declare const set: { * MutableRef.set(state, "success") * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ (value: T): (self: MutableRef) => MutableRef; /** * Sets the MutableRef to a new value and returns the reference. * - * @example + * **When to use** + * + * Use when you need an in-place `MutableRef` replacement that returns the same + * `MutableRef`. + * + * **Example** (Setting values) + * * ```ts * import { MutableRef } from "effect" * @@ -748,15 +877,21 @@ export declare const set: { * MutableRef.set(state, "success") * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ (self: MutableRef, value: T): MutableRef; }; /** * Sets the MutableRef to a new value and returns the new value. * - * @example + * **When to use** + * + * Use to replace the current `MutableRef` value and immediately read the + * replacement. + * + * **Example** (Setting and reading values) + * * ```ts * import { MutableRef } from "effect" * @@ -784,14 +919,20 @@ export declare const set: { * console.log(returnedValue) // 3 * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export declare const setAndGet: { /** * Sets the MutableRef to a new value and returns the new value. * - * @example + * **When to use** + * + * Use to replace the current `MutableRef` value and immediately read the + * replacement. + * + * **Example** (Setting and reading values) + * * ```ts * import { MutableRef } from "effect" * @@ -819,14 +960,20 @@ export declare const setAndGet: { * console.log(returnedValue) // 3 * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ (value: T): (self: MutableRef) => T; /** * Sets the MutableRef to a new value and returns the new value. * - * @example + * **When to use** + * + * Use to replace the current `MutableRef` value and immediately read the + * replacement. + * + * **Example** (Setting and reading values) + * * ```ts * import { MutableRef } from "effect" * @@ -854,8 +1001,8 @@ export declare const setAndGet: { * console.log(returnedValue) // 3 * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ (self: MutableRef, value: T): T; }; @@ -863,7 +1010,13 @@ export declare const setAndGet: { * Updates the MutableRef with the result of applying a function to its current value, * and returns the reference. * - * @example + * **When to use** + * + * Use when you need an in-place `MutableRef` value transformation that returns + * the same `MutableRef`. + * + * **Example** (Updating values) + * * ```ts * import { MutableRef } from "effect" * @@ -899,15 +1052,21 @@ export declare const setAndGet: { * console.log(MutableRef.get(list)) // [1, 2, 3, 4] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export declare const update: { /** * Updates the MutableRef with the result of applying a function to its current value, * and returns the reference. * - * @example + * **When to use** + * + * Use when you need an in-place `MutableRef` value transformation that returns + * the same `MutableRef`. + * + * **Example** (Updating values) + * * ```ts * import { MutableRef } from "effect" * @@ -943,15 +1102,21 @@ export declare const update: { * console.log(MutableRef.get(list)) // [1, 2, 3, 4] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ (f: (value: T) => T): (self: MutableRef) => MutableRef; /** * Updates the MutableRef with the result of applying a function to its current value, * and returns the reference. * - * @example + * **When to use** + * + * Use when you need an in-place `MutableRef` value transformation that returns + * the same `MutableRef`. + * + * **Example** (Updating values) + * * ```ts * import { MutableRef } from "effect" * @@ -987,8 +1152,8 @@ export declare const update: { * console.log(MutableRef.get(list)) // [1, 2, 3, 4] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ (self: MutableRef, f: (value: T) => T): MutableRef; }; @@ -996,7 +1161,13 @@ export declare const update: { * Updates the MutableRef with the result of applying a function to its current value, * and returns the new value. * - * @example + * **When to use** + * + * Use to transform the current `MutableRef` value and immediately read the + * updated value. + * + * **Example** (Updating and reading values) + * * ```ts * import { MutableRef } from "effect" * @@ -1034,15 +1205,21 @@ export declare const update: { * console.log(MutableRef.get(list)) // [2, 4, 6] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export declare const updateAndGet: { /** * Updates the MutableRef with the result of applying a function to its current value, * and returns the new value. * - * @example + * **When to use** + * + * Use to transform the current `MutableRef` value and immediately read the + * updated value. + * + * **Example** (Updating and reading values) + * * ```ts * import { MutableRef } from "effect" * @@ -1080,15 +1257,21 @@ export declare const updateAndGet: { * console.log(MutableRef.get(list)) // [2, 4, 6] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ (f: (value: T) => T): (self: MutableRef) => T; /** * Updates the MutableRef with the result of applying a function to its current value, * and returns the new value. * - * @example + * **When to use** + * + * Use to transform the current `MutableRef` value and immediately read the + * updated value. + * + * **Example** (Updating and reading values) + * * ```ts * import { MutableRef } from "effect" * @@ -1126,15 +1309,22 @@ export declare const updateAndGet: { * console.log(MutableRef.get(list)) // [2, 4, 6] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ (self: MutableRef, f: (value: T) => T): T; }; /** - * Toggles a boolean MutableRef (true becomes false, false becomes true) and returns the reference. + * Switches a boolean `MutableRef` between `true` and `false`, then returns the + * reference. + * + * **When to use** + * + * Use when you need an in-place boolean `MutableRef` toggle that returns the + * same `MutableRef`. + * + * **Example** (Toggling boolean refs) * - * @example * ```ts * import { MutableRef } from "effect" * @@ -1168,8 +1358,8 @@ export declare const updateAndGet: { * console.log(result === flag) // true * ``` * - * @since 2.0.0 * @category boolean + * @since 2.0.0 */ export declare const toggle: (self: MutableRef) => MutableRef; export {}; diff --git a/.opencode/node_modules/effect/dist/MutableRef.d.ts.map b/.opencode/node_modules/effect/dist/MutableRef.d.ts.map index 39d57d3181b89970059d26f1d444e2aabd872013..6ab4e3c189e3a7305942e3602bd4544f106271d9 100644 --- a/.opencode/node_modules/effect/dist/MutableRef.d.ts.map +++ b/.opencode/node_modules/effect/dist/MutableRef.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"MutableRef.d.ts","sourceRoot":"","sources":["../src/MutableRef.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAE,KAAK,WAAW,EAAU,MAAM,kBAAkB,CAAA;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,QAAA,MAAM,MAAM,uBAAuB,CAAA;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,WAAW,UAAU,CAAC,GAAG,CAAC,CAAC,CAAE,SAAQ,QAAQ,EAAE,WAAW;IAC9D,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;IAChC,OAAO,EAAE,CAAC,CAAA;CACX;AAaD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,EAAE,OAAO,CAAC,KAAG,UAAU,CAAC,CAAC,CAI9C,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,aAAa,EAAE;IAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAA;IAC/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAA;CAU3D,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,SAAS,GAAI,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkDG;IACH,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;CAID,CAAA;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,eAAO,MAAM,MAAM,GAAI,MAAM,UAAU,CAAC,OAAO,CAAC,KAAG,UAAU,CAAC,OAAO,CAA4B,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/MutableRef.js b/.opencode/node_modules/effect/dist/MutableRef.js index e16df53ee32f88484132d998c25c84f888a99257..9485a46ee703e816c1a3a1978667d595005446f5 100644 --- a/.opencode/node_modules/effect/dist/MutableRef.js +++ b/.opencode/node_modules/effect/dist/MutableRef.js @@ -1,34 +1,13 @@ /** - * @fileoverview - * MutableRef provides a mutable reference container that allows safe mutation of values - * in functional programming contexts. It serves as a bridge between functional and imperative - * programming paradigms, offering atomic operations for state management. - * - * Unlike regular variables, MutableRef encapsulates mutable state and provides controlled - * access through a standardized API. It supports atomic compare-and-set operations for - * thread-safe updates and integrates seamlessly with Effect's ecosystem. - * - * Key Features: - * - Mutable reference semantics with functional API - * - Atomic compare-and-set operations for safe concurrent updates - * - Specialized operations for numeric and boolean values - * - Chainable operations that return the reference or the value - * - Integration with Effect's Equal interface for value comparison - * - * Common Use Cases: - * - State containers in functional applications - * - Counters and accumulators - * - Configuration that needs to be updated at runtime - * - Caching and memoization scenarios - * - Inter-module communication via shared references - * - * Performance Characteristics: - * - Get/Set: O(1) - * - Compare-and-set: O(1) - * - All operations: O(1) + * Stores synchronous mutable state in a small reference object. + * + * A `MutableRef` stores one current value and exposes it through `.current`. + * Unlike `Ref`, its operations are synchronous and update the same object in + * place. This module includes pipeable helpers for reading, setting, comparing, + * and updating the value, plus numeric increment/decrement helpers and a + * boolean toggle helper. * * @since 2.0.0 - * @category data-structures */ import * as Equal from "./Equal.js"; import * as Dual from "./Function.js"; @@ -48,7 +27,12 @@ const MutableRefProto = { /** * Creates a new MutableRef with the specified initial value. * - * @example + * **When to use** + * + * Use to create a synchronous `MutableRef` initialized with a value. + * + * **Example** (Creating mutable refs) + * * ```ts * import { MutableRef } from "effect" * @@ -66,8 +50,8 @@ const MutableRefProto = { * console.log(MutableRef.get(status)) // "running" * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const make = value => { const ref = Object.create(MutableRefProto); @@ -75,11 +59,17 @@ export const make = value => { return ref; }; /** - * Atomically sets the value to newValue if the current value equals oldValue. + * Sets the value to newValue atomically if the current value equals oldValue. * Returns true if the value was updated, false otherwise. * Uses Effect's Equal interface for value comparison. * - * @example + * **When to use** + * + * Use to replace a `MutableRef` value only when the current value still matches + * an expected value. + * + * **Example** (Comparing and setting values) + * * ```ts * import { MutableRef } from "effect" * @@ -107,8 +97,8 @@ export const make = value => { * console.log(casUpdate(ref)) // true * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export const compareAndSet = /*#__PURE__*/Dual.dual(3, (self, oldValue, newValue) => { if (Equal.equals(oldValue, self.current)) { @@ -120,7 +110,13 @@ export const compareAndSet = /*#__PURE__*/Dual.dual(3, (self, oldValue, newValue /** * Decrements a numeric MutableRef by 1 and returns the reference. * - * @example + * **When to use** + * + * Use when you need an in-place `MutableRef` decrement that returns the same + * `MutableRef`. + * + * **Example** (Decrementing numeric refs) + * * ```ts * import { MutableRef } from "effect" * @@ -143,14 +139,20 @@ export const compareAndSet = /*#__PURE__*/Dual.dual(3, (self, oldValue, newValue * } * ``` * - * @since 2.0.0 * @category numeric + * @since 2.0.0 */ export const decrement = self => update(self, n => n - 1); /** * Decrements a numeric MutableRef by 1 and returns the new value. * - * @example + * **When to use** + * + * Use to decrement a numeric `MutableRef` and immediately read the updated + * value. + * + * **Example** (Decrementing and reading refs) + * * ```ts * import { MutableRef } from "effect" * @@ -173,14 +175,19 @@ export const decrement = self => update(self, n => n - 1); * } * ``` * - * @since 2.0.0 * @category numeric + * @since 2.0.0 */ export const decrementAndGet = self => updateAndGet(self, n => n - 1); /** * Gets the current value of the MutableRef. * - * @example + * **When to use** + * + * Use to read the current `MutableRef` value without mutating it. + * + * **Example** (Reading current values) + * * ```ts * import { MutableRef } from "effect" * @@ -201,14 +208,19 @@ export const decrementAndGet = self => updateAndGet(self, n => n - 1); * console.log(value1 === value2) // true * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export const get = self => self.current; /** * Decrements a numeric MutableRef by 1 and returns the previous value. * - * @example + * **When to use** + * + * Use to read the current numeric `MutableRef` value before decrementing it. + * + * **Example** (Reading before decrementing) + * * ```ts * import { MutableRef } from "effect" * @@ -232,14 +244,19 @@ export const get = self => self.current; * console.log(`Current: ${currentIndex}, Next: ${MutableRef.get(index)}`) // "Current: 3, Next: 2" * ``` * - * @since 2.0.0 * @category numeric + * @since 2.0.0 */ export const getAndDecrement = self => getAndUpdate(self, n => n - 1); /** * Increments a numeric MutableRef by 1 and returns the previous value. * - * @example + * **When to use** + * + * Use to read the current numeric `MutableRef` value before incrementing it. + * + * **Example** (Reading before incrementing) + * * ```ts * import { MutableRef } from "effect" * @@ -271,14 +288,20 @@ export const getAndDecrement = self => getAndUpdate(self, n => n - 1); * } * ``` * - * @since 2.0.0 * @category numeric + * @since 2.0.0 */ export const getAndIncrement = self => getAndUpdate(self, n => n + 1); /** * Sets the MutableRef to a new value and returns the previous value. * - * @example + * **When to use** + * + * Use to replace the current `MutableRef` value while keeping the previous + * value. + * + * **Example** (Reading before setting) + * * ```ts * import { MutableRef } from "effect" * @@ -306,8 +329,8 @@ export const getAndIncrement = self => getAndUpdate(self, n => n + 1); * console.log(MutableRef.get(buffer)) // [] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export const getAndSet = /*#__PURE__*/Dual.dual(2, (self, value) => { const ret = self.current; @@ -318,7 +341,13 @@ export const getAndSet = /*#__PURE__*/Dual.dual(2, (self, value) => { * Updates the MutableRef with the result of applying a function to its current value, * and returns the previous value. * - * @example + * **When to use** + * + * Use to transform the current `MutableRef` value while keeping the previous + * value. + * + * **Example** (Reading before updating) + * * ```ts * import { MutableRef } from "effect" * @@ -352,14 +381,20 @@ export const getAndSet = /*#__PURE__*/Dual.dual(2, (self, value) => { * console.log(MutableRef.get(list)) // [1, 2, 3, 4] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export const getAndUpdate = /*#__PURE__*/Dual.dual(2, (self, f) => getAndSet(self, f(get(self)))); /** * Increments a numeric MutableRef by 1 and returns the reference. * - * @example + * **When to use** + * + * Use when you need an in-place `MutableRef` increment that returns the same + * `MutableRef`. + * + * **Example** (Incrementing numeric refs) + * * ```ts * import { MutableRef } from "effect" * @@ -385,14 +420,20 @@ export const getAndUpdate = /*#__PURE__*/Dual.dual(2, (self, f) => getAndSet(sel * console.log(result === counter) // true * ``` * - * @since 2.0.0 * @category numeric + * @since 2.0.0 */ export const increment = self => update(self, n => n + 1); /** * Increments a numeric MutableRef by 1 and returns the new value. * - * @example + * **When to use** + * + * Use to increment a numeric `MutableRef` and immediately read the updated + * value. + * + * **Example** (Incrementing and reading refs) + * * ```ts * import { MutableRef } from "effect" * @@ -419,14 +460,20 @@ export const increment = self => update(self, n => n + 1); * } * ``` * - * @since 2.0.0 * @category numeric + * @since 2.0.0 */ export const incrementAndGet = self => updateAndGet(self, n => n + 1); /** * Sets the MutableRef to a new value and returns the reference. * - * @example + * **When to use** + * + * Use when you need an in-place `MutableRef` replacement that returns the same + * `MutableRef`. + * + * **Example** (Setting values) + * * ```ts * import { MutableRef } from "effect" * @@ -458,8 +505,8 @@ export const incrementAndGet = self => updateAndGet(self, n => n + 1); * MutableRef.set(state, "success") * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export const set = /*#__PURE__*/Dual.dual(2, (self, value) => { self.current = value; @@ -468,7 +515,13 @@ export const set = /*#__PURE__*/Dual.dual(2, (self, value) => { /** * Sets the MutableRef to a new value and returns the new value. * - * @example + * **When to use** + * + * Use to replace the current `MutableRef` value and immediately read the + * replacement. + * + * **Example** (Setting and reading values) + * * ```ts * import { MutableRef } from "effect" * @@ -496,8 +549,8 @@ export const set = /*#__PURE__*/Dual.dual(2, (self, value) => { * console.log(returnedValue) // 3 * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export const setAndGet = /*#__PURE__*/Dual.dual(2, (self, value) => { self.current = value; @@ -507,7 +560,13 @@ export const setAndGet = /*#__PURE__*/Dual.dual(2, (self, value) => { * Updates the MutableRef with the result of applying a function to its current value, * and returns the reference. * - * @example + * **When to use** + * + * Use when you need an in-place `MutableRef` value transformation that returns + * the same `MutableRef`. + * + * **Example** (Updating values) + * * ```ts * import { MutableRef } from "effect" * @@ -543,15 +602,21 @@ export const setAndGet = /*#__PURE__*/Dual.dual(2, (self, value) => { * console.log(MutableRef.get(list)) // [1, 2, 3, 4] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export const update = /*#__PURE__*/Dual.dual(2, (self, f) => set(self, f(get(self)))); /** * Updates the MutableRef with the result of applying a function to its current value, * and returns the new value. * - * @example + * **When to use** + * + * Use to transform the current `MutableRef` value and immediately read the + * updated value. + * + * **Example** (Updating and reading values) + * * ```ts * import { MutableRef } from "effect" * @@ -589,14 +654,21 @@ export const update = /*#__PURE__*/Dual.dual(2, (self, f) => set(self, f(get(sel * console.log(MutableRef.get(list)) // [2, 4, 6] * ``` * - * @since 2.0.0 * @category general + * @since 2.0.0 */ export const updateAndGet = /*#__PURE__*/Dual.dual(2, (self, f) => setAndGet(self, f(get(self)))); /** - * Toggles a boolean MutableRef (true becomes false, false becomes true) and returns the reference. + * Switches a boolean `MutableRef` between `true` and `false`, then returns the + * reference. + * + * **When to use** + * + * Use when you need an in-place boolean `MutableRef` toggle that returns the + * same `MutableRef`. + * + * **Example** (Toggling boolean refs) * - * @example * ```ts * import { MutableRef } from "effect" * @@ -630,8 +702,8 @@ export const updateAndGet = /*#__PURE__*/Dual.dual(2, (self, f) => setAndGet(sel * console.log(result === flag) // true * ``` * - * @since 2.0.0 * @category boolean + * @since 2.0.0 */ export const toggle = self => update(self, _ => !_); //# sourceMappingURL=MutableRef.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/MutableRef.js.map b/.opencode/node_modules/effect/dist/MutableRef.js.map index cf80b714f9692d2b6c58e266b7f56869107cdec0..351ec3e537d117e5099ebe4d321aa523c7320a7d 100644 --- a/.opencode/node_modules/effect/dist/MutableRef.js.map +++ b/.opencode/node_modules/effect/dist/MutableRef.js.map @@ -1 +1 @@ -{"version":3,"file":"MutableRef.js","names":["Equal","Dual","toJson","PipeInspectableProto","TypeId","MutableRefProto","toJSON","_id","current","make","value","ref","Object","create","compareAndSet","dual","self","oldValue","newValue","equals","decrement","update","n","decrementAndGet","updateAndGet","get","getAndDecrement","getAndUpdate","getAndIncrement","getAndSet","ret","f","increment","incrementAndGet","set","setAndGet","toggle","_"],"sources":["../src/MutableRef.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,IAAI,MAAM,eAAe;AACrC,SAA2BC,MAAM,QAAQ,kBAAkB;AAC3D,SAASC,oBAAoB,QAAQ,oBAAoB;AAGzD,MAAMC,MAAM,GAAG,oBAAoB;AA0CnC,MAAMC,eAAe,GAAyC;EAC5D,CAACD,MAAM,GAAGA,MAAM;EAChB,GAAGD,oBAAoB;EACvBG,MAAMA,CAAA;IACJ,OAAO;MACLC,GAAG,EAAE,YAAY;MACjBC,OAAO,EAAEN,MAAM,CAAC,IAAI,CAACM,OAAO;KAC7B;EACH;CACD;AAED;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMC,IAAI,GAAOC,KAAQ,IAAmB;EACjD,MAAMC,GAAG,GAAGC,MAAM,CAACC,MAAM,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,OAAO,MAAMa,MAAM,gBAyFfpB,IAAI,CAACc,IAAI,CAGX,CAAC,EAAE,CAACC,IAAI,EAAEe,CAAC,KAAKG,GAAG,CAAClB,IAAI,EAAEe,CAAC,CAACN,GAAG,CAACT,IAAI,CAAC,CAAC,CAAC,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,OAAO,MAAMQ,YAAY,gBA6FrBvB,IAAI,CAACc,IAAI,CAGX,CAAC,EAAE,CAACC,IAAI,EAAEe,CAAC,KAAKI,SAAS,CAACnB,IAAI,EAAEe,CAAC,CAACN,GAAG,CAACT,IAAI,CAAC,CAAC,CAAC,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,OAAO,MAAMoB,MAAM,GAAIpB,IAAyB,IAA0BK,MAAM,CAACL,IAAI,EAAGqB,CAAC,IAAK,CAACA,CAAC,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"MutableRef.js","names":["Equal","Dual","toJson","PipeInspectableProto","TypeId","MutableRefProto","toJSON","_id","current","make","value","ref","Object","create","compareAndSet","dual","self","oldValue","newValue","equals","decrement","update","n","decrementAndGet","updateAndGet","get","getAndDecrement","getAndUpdate","getAndIncrement","getAndSet","ret","f","increment","incrementAndGet","set","setAndGet","toggle","_"],"sources":["../src/MutableRef.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAWA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,IAAI,MAAM,eAAe;AACrC,SAA2BC,MAAM,QAAQ,kBAAkB;AAC3D,SAASC,oBAAoB,QAAQ,oBAAoB;AAGzD,MAAMC,MAAM,GAAG,oBAAoB;AAuDnC,MAAMC,eAAe,GAAyC;EAC5D,CAACD,MAAM,GAAGA,MAAM;EAChB,GAAGD,oBAAoB;EACvBG,M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KAAI;EACnBM,IAAI,CAACR,OAAO,GAAGE,KAAK;EACpB,OAAOM,IAAI;AACb,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,OAAO,MAAMmB,SAAS,gBAmFlBlC,IAAI,CAACc,IAAI,CAGX,CAAC,EAAE,CAACC,IAAI,EAAEN,KAAK,KAAI;EACnBM,IAAI,CAACR,OAAO,GAAGE,KAAK;EACpB,OAAOM,IAAI,CAACR,OAAO;AACrB,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,OAAO,MAAMa,MAAM,gBAqGfpB,IAAI,CAACc,IAAI,CAGX,CAAC,EAAE,CAACC,IAAI,EAAEe,CAAC,KAAKG,GAAG,CAAClB,IAAI,EAAEe,CAAC,CAACN,GAAG,CAACT,IAAI,CAAC,CAAC,CAAC,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,OAAO,MAAMQ,YAAY,gBAyGrBvB,IAAI,CAACc,IAAI,CAGX,CAAC,EAAE,CAACC,IAAI,EAAEe,CAAC,KAAKI,SAAS,CAACnB,IAAI,EAAEe,CAAC,CAACN,GAAG,CAACT,IAAI,CAAC,CAAC,CAAC,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,OAAO,MAAMoB,MAAM,GAAIpB,IAAyB,IAA0BK,MAAM,CAACL,IAAI,EAAGqB,CAAC,IAAK,CAACA,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Newtype.d.ts b/.opencode/node_modules/effect/dist/Newtype.d.ts index 2e4c7f268f9cd75c7235ae65980edee247a4636b..62fda316ead237ad9c5e35b7600805fccc824759 100644 --- a/.opencode/node_modules/effect/dist/Newtype.d.ts +++ b/.opencode/node_modules/effect/dist/Newtype.d.ts @@ -1,65 +1,12 @@ /** - * Lightweight wrapper types that prevent accidental mixing of structurally - * identical values (e.g. `UserId` vs `OrderId`, both `string` at runtime). - * - * **Mental model** - * - * - **Newtype** — a compile-time wrapper around a **carrier** type (the - * underlying primitive or object). At runtime the value is unchanged; the - * tag exists only in the type system. - * - **Key** — a unique string literal that distinguishes one newtype from - * another (e.g. `"Label"`, `"UserId"`). - * - **Carrier** — the underlying type the newtype wraps (e.g. `string`, - * `number`). - * - **Iso** — a lossless two-way conversion between a newtype and its carrier, - * created with {@link makeIso}. Use `iso.set(carrier)` to wrap and - * `iso.get(newtype)` to unwrap. - * - * **Common tasks** - * - * - Define a newtype → declare an `interface` extending - * `Newtype.Newtype` - * - Wrap / unwrap values → {@link makeIso} (returns an `Optic.Iso`) - * - Unwrap only → {@link value} - * - Lift an `Equivalence` → {@link makeEquivalence} - * - Lift an `Order` → {@link makeOrder} - * - Lift a `Combiner` → {@link makeCombiner} - * - Lift a `Reducer` → {@link makeReducer} - * - * **Gotchas** - * - * - Newtypes are **purely compile-time**. There is zero runtime overhead; - * `value` and `makeIso` use identity casts. - * - Two newtypes sharing the same key string will be assignable to each other. - * Choose unique key strings. - * - A newtype value is **not** assignable to its carrier type without - * explicitly unwrapping via {@link value} or an iso. - * - * **Quickstart** - * - * **Example** (defining and using a newtype) + * Creates compile-time-only wrappers around existing value types. * - * ```ts - * import { Newtype } from "effect" - * - * // 1. Define a newtype - * interface Label extends Newtype.Newtype<"Label", string> {} - * - * // 2. Create an iso for wrapping/unwrapping - * const labelIso = Newtype.makeIso(data: NonEmptyIterable.NonEmptyIterable): A { - * // Safe to get the first element - guaranteed to exist - * const [first] = NonEmptyIterable.unprepend(data) - * return first - * } - * - * // Using Array.make to create non-empty arrays - * const numbers = Array.make( - * 1, - * 2, - * 3, - * 4, - * 5 - * ) as unknown as NonEmptyIterable.NonEmptyIterable - * const firstNumber = processNonEmpty(numbers) // number - * - * // Regular arrays can be asserted as NonEmptyIterable when known to be non-empty - * const values = [1, 2, 3] as unknown as NonEmptyIterable.NonEmptyIterable - * const firstValue = processNonEmpty(values) // number - * - * // Custom iterables that are guaranteed non-empty - * function* generateNumbers(): NonEmptyIterable.NonEmptyIterable { - * yield 1 - * yield 2 - * yield 3 - * } - * - * const firstGenerated = processNonEmpty(generateNumbers()) // number - * ``` - * - * ## Working with Different Iterable Types - * - * ```ts - * import { Array } from "effect" - * - * // Creating non-empty arrays - * const nonEmptyArray = Array.make( - * 1, - * 2, - * 3 - * ) as unknown as NonEmptyIterable.NonEmptyIterable + * The `NonEmptyIterable` module provides a type-level representation of any + * JavaScript `Iterable` that is known to contain at least one element. A + * `NonEmptyIterable` can be consumed anywhere an `Iterable` is expected, + * while also carrying the guarantee that reading the first element is safe. * - * // Working with strings (assert as NonEmptyIterable when known to be non-empty) - * const nonEmptyString = "hello" as unknown as NonEmptyIterable.NonEmptyIterable< - * string - * > - * const [firstChar] = NonEmptyIterable.unprepend(nonEmptyString) - * console.log(firstChar) // "h" - * - * // Working with Maps (assert when known to be non-empty) - * const nonEmptyMap = new Map([ - * ["key1", "value1"], - * ["key2", "value2"] - * ]) as unknown as NonEmptyIterable.NonEmptyIterable<[string, string]> - * const [firstEntry] = NonEmptyIterable.unprepend(nonEmptyMap) - * console.log(firstEntry) // ["key1", "value1"] - * - * // Custom generator functions - * function* fibonacci(): NonEmptyIterable.NonEmptyIterable { - * let a = 1, b = 1 - * yield a - * while (true) { - * yield b - * const next = a + b - * a = b - * b = next - * } - * } - * - * const [firstFib, restFib] = NonEmptyIterable.unprepend( - * fibonacci() as unknown as NonEmptyIterable.NonEmptyIterable - * ) - * console.log(firstFib) // 1 - * ``` - * - * ## Integration with Effect Arrays - * - * ```ts - * import { Array, pipe } from "effect" - * import type * as NonEmptyIterable from "effect/NonEmptyIterable" - * import type * as NonEmptyIterable from "effect/NonEmptyIterable" - * - * // Many Array functions work with NonEmptyIterable - * declare const nonEmptyData: NonEmptyIterable.NonEmptyIterable - * - * const processData = pipe( - * nonEmptyData, - * Array.fromIterable, - * Array.map((x) => x * 2), - * Array.filter((x) => x > 5) - * // Result is a regular array since filtering might make it empty - * ) - * - * // Safe operations that preserve non-emptiness - * const doubledData = pipe( - * nonEmptyData, - * Array.fromIterable, - * Array.map((x) => x * 2) - * // This would still be non-empty if the source was non-empty - * ) - * ``` + * @since 2.0.0 */ /** - * A unique symbol used to brand the `NonEmptyIterable` type. + * Defines the type-level symbol used to brand the `NonEmptyIterable` type. * - * This symbol ensures that `NonEmptyIterable` is a distinct type from regular - * `Iterable`, providing compile-time guarantees about non-emptiness while - * maintaining full compatibility with the JavaScript iteration protocol. + * **When to use** * - * @example - * ```ts - * import type * as NonEmptyIterable from "effect/NonEmptyIterable" + * Use as the property key for the type-level brand that marks an `Iterable` as + * non-empty. * - * // The symbol is used internally for type branding - * declare const data: NonEmptyIterable.NonEmptyIterable + * **Details** * - * // This has the nonEmpty symbol property (not accessible at runtime) - * // but is still a regular Iterable for all practical purposes - * for (const item of data) { - * console.log(item) // Works normally - * } + * `NonEmptyIterable` includes `readonly [nonEmpty]: A`, which makes it + * distinct from a plain `Iterable` at compile time while preserving the + * normal iteration shape. * - * // Can be used with any function expecting an Iterable - * const array = Array.from(data) - * const set = new Set(data) - * ``` + * @see {@link NonEmptyIterable} for the branded iterable type that uses this symbol * - * @category symbol + * @category symbols * @since 2.0.0 */ export declare const nonEmpty: unique symbol; /** * Represents an iterable that is guaranteed to contain at least one element. * + * **When to use** + * + * Use to require an iterable input that must provide at least one element. + * + * **Details** + * * `NonEmptyIterable` extends the standard `Iterable` interface with a type-level * guarantee of non-emptiness. This allows for safe operations that would otherwise * require runtime checks or could throw exceptions. @@ -167,11 +42,10 @@ export declare const nonEmpty: unique symbol; * The type is branded with a unique symbol to ensure type safety while maintaining * full compatibility with JavaScript's iteration protocol. * - * @example + * **Example** (Working with non-empty iterables) + * * ```ts - * import { Array } from "effect" - * import * as Chunk from "effect/Chunk" - * import * as NonEmptyIterable from "effect/NonEmptyIterable" + * import { Array, Chunk, NonEmptyIterable } from "effect" * * // Function that requires non-empty data * function getFirst(data: NonEmptyIterable.NonEmptyIterable): A { @@ -210,27 +84,30 @@ export declare const nonEmpty: unique symbol; * ) // 3 * ``` * - * @category model + * @category models * @since 2.0.0 */ export interface NonEmptyIterable extends Iterable { readonly [nonEmpty]: A; } /** - * Safely extracts the first element and remaining elements from a non-empty iterable. + * Extracts the first element and remaining elements from a non-empty iterable safely. + * + * **When to use** + * + * Use to split a non-empty iterable into its first element and an iterator for + * the remaining elements. + * + * **Details** * * This function provides a safe way to deconstruct a `NonEmptyIterable` into its * head (first element) and tail (remaining elements as an iterator). Since the * iterable is guaranteed to be non-empty, the first element is always available. * - * @param self - The non-empty iterable to deconstruct - * @returns A tuple containing the first element and an iterator for the remaining elements + * **Example** (Extracting first and remaining elements) * - * @example * ```ts - * import { Array } from "effect" - * import * as Chunk from "effect/Chunk" - * import * as NonEmptyIterable from "effect/NonEmptyIterable" + * import { Array, Chunk, NonEmptyIterable } from "effect" * * // Helper to make iterator iterable for Array.from * const iteratorToIterable = (iterator: Iterator): Iterable => ({ diff --git a/.opencode/node_modules/effect/dist/NonEmptyIterable.d.ts.map b/.opencode/node_modules/effect/dist/NonEmptyIterable.d.ts.map index 98500cec4d5e1ca33e92e85fd24015d9280287d3..f24607685f51134ef6b2435d2a67ae41ce2d5ad7 100644 --- a/.opencode/node_modules/effect/dist/NonEmptyIterable.d.ts.map +++ b/.opencode/node_modules/effect/dist/NonEmptyIterable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"NonEmptyIterable.d.ts","sourceRoot":"","sources":["../src/NonEmptyIterable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2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I,CAAC,EAAE,MAAM,gBAAgB,CAAC,CAAC,CAAC,KAAG,CAAC,YAAY,EAAE,CAAC,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC,CAAC,CASxG,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/NonEmptyIterable.js b/.opencode/node_modules/effect/dist/NonEmptyIterable.js index 6430938db6ac73df3561b0df3879089737f5653c..19b6d0a92766dd138f44241ad7f7e298a07bd5c7 100644 --- a/.opencode/node_modules/effect/dist/NonEmptyIterable.js +++ b/.opencode/node_modules/effect/dist/NonEmptyIterable.js @@ -1,148 +1,29 @@ /** - * @since 2.0.0 - * - * The `NonEmptyIterable` module provides types and utilities for working with iterables - * that are guaranteed to contain at least one element. This provides compile-time - * safety when working with collections that must not be empty. - * - * ## Key Features - * - * - **Type Safety**: Compile-time guarantee that the iterable contains at least one element - * - **Iterator Protocol**: Fully compatible with JavaScript's built-in iteration protocol - * - **Functional Operations**: Safe operations that preserve the non-empty property - * - **Lightweight**: Minimal overhead with maximum type safety - * - * ## Why NonEmptyIterable? - * - * Many operations require non-empty collections to be meaningful: - * - Finding the maximum or minimum value - * - Getting the first or last element - * - Reducing without an initial value - * - Operations that would otherwise need runtime checks - * - * ## Basic Usage - * - * ```ts - * import * as NonEmptyIterable from "effect/NonEmptyIterable" - * - * // NonEmptyIterable is a type that represents any iterable with at least one element - * function processNonEmpty(data: NonEmptyIterable.NonEmptyIterable): A { - * // Safe to get the first element - guaranteed to exist - * const [first] = NonEmptyIterable.unprepend(data) - * return first - * } - * - * // Using Array.make to create non-empty arrays - * const numbers = Array.make( - * 1, - * 2, - * 3, - * 4, - * 5 - * ) as unknown as NonEmptyIterable.NonEmptyIterable - * const firstNumber = processNonEmpty(numbers) // number - * - * // Regular arrays can be asserted as NonEmptyIterable when known to be non-empty - * const values = [1, 2, 3] as unknown as NonEmptyIterable.NonEmptyIterable - * const firstValue = processNonEmpty(values) // number - * - * // Custom iterables that are guaranteed non-empty - * function* generateNumbers(): NonEmptyIterable.NonEmptyIterable { - * yield 1 - * yield 2 - * yield 3 - * } - * - * const firstGenerated = processNonEmpty(generateNumbers()) // number - * ``` - * - * ## Working with Different Iterable Types - * - * ```ts - * import { Array } from "effect" + * The `NonEmptyIterable` module provides a type-level representation of any + * JavaScript `Iterable` that is known to contain at least one element. A + * `NonEmptyIterable` can be consumed anywhere an `Iterable` is expected, + * while also carrying the guarantee that reading the first element is safe. * - * // Creating non-empty arrays - * const nonEmptyArray = Array.make( - * 1, - * 2, - * 3 - * ) as unknown as NonEmptyIterable.NonEmptyIterable - * - * // Working with strings (assert as NonEmptyIterable when known to be non-empty) - * const nonEmptyString = "hello" as unknown as NonEmptyIterable.NonEmptyIterable< - * string - * > - * const [firstChar] = NonEmptyIterable.unprepend(nonEmptyString) - * console.log(firstChar) // "h" - * - * // Working with Maps (assert when known to be non-empty) - * const nonEmptyMap = new Map([ - * ["key1", "value1"], - * ["key2", "value2"] - * ]) as unknown as NonEmptyIterable.NonEmptyIterable<[string, string]> - * const [firstEntry] = NonEmptyIterable.unprepend(nonEmptyMap) - * console.log(firstEntry) // ["key1", "value1"] - * - * // Custom generator functions - * function* fibonacci(): NonEmptyIterable.NonEmptyIterable { - * let a = 1, b = 1 - * yield a - * while (true) { - * yield b - * const next = a + b - * a = b - * b = next - * } - * } + * @since 2.0.0 + */ +/** + * Extracts the first element and remaining elements from a non-empty iterable safely. * - * const [firstFib, restFib] = NonEmptyIterable.unprepend( - * fibonacci() as unknown as NonEmptyIterable.NonEmptyIterable - * ) - * console.log(firstFib) // 1 - * ``` + * **When to use** * - * ## Integration with Effect Arrays + * Use to split a non-empty iterable into its first element and an iterator for + * the remaining elements. * - * ```ts - * import { Array, pipe } from "effect" - * import type * as NonEmptyIterable from "effect/NonEmptyIterable" - * import type * as NonEmptyIterable from "effect/NonEmptyIterable" - * - * // Many Array functions work with NonEmptyIterable - * declare const nonEmptyData: NonEmptyIterable.NonEmptyIterable - * - * const processData = pipe( - * nonEmptyData, - * Array.fromIterable, - * Array.map((x) => x * 2), - * Array.filter((x) => x > 5) - * // Result is a regular array since filtering might make it empty - * ) - * - * // Safe operations that preserve non-emptiness - * const doubledData = pipe( - * nonEmptyData, - * Array.fromIterable, - * Array.map((x) => x * 2) - * // This would still be non-empty if the source was non-empty - * ) - * ``` - */ -/** - * Safely extracts the first element and remaining elements from a non-empty iterable. + * **Details** * * This function provides a safe way to deconstruct a `NonEmptyIterable` into its * head (first element) and tail (remaining elements as an iterator). Since the * iterable is guaranteed to be non-empty, the first element is always available. * - * @param self - The non-empty iterable to deconstruct - * @returns A tuple containing the first element and an iterator for the remaining elements + * **Example** (Extracting first and remaining elements) * - * @example * ```ts - * import { Array } from "effect" - * import * as Chunk from "effect/Chunk" - * import * as NonEmptyIterable from "effect/NonEmptyIterable" + * import { Array, Chunk, NonEmptyIterable } from "effect" * * // Helper to make iterator iterable for Array.from * const iteratorToIterable = (iterator: Iterator): Iterable => ({ diff --git a/.opencode/node_modules/effect/dist/NonEmptyIterable.js.map b/.opencode/node_modules/effect/dist/NonEmptyIterable.js.map index 73d2993959a397b3d251c50d52122b39bcd96d59..424b03b183f8b9994e7be1937f1dceb023c6cf47 100644 --- a/.opencode/node_modules/effect/dist/NonEmptyIterable.js.map +++ b/.opencode/node_modules/effect/dist/NonEmptyIterable.js.map @@ -1 +1 @@ -{"version":3,"file":"NonEmptyIterable.js","names":["unprepend","self","iterator","Symbol","next","done","Error","value"],"sources":["../src/NonEmptyIterable.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6NA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiHA,OAAO,MAAMA,SAAS,GAAOC,IAAyB,IAAuD;EAC3G,MAAMC,QAAQ,GAAGD,IAAI,CAACE,MAAM,CAACD,QAAQ,CAAC,EAAE;EACxC,MAAME,IAAI,GAAGF,QAAQ,CAACE,IAAI,EAAE;EAC5B,IAAIA,IAAI,CAACC,IAAI,EAAE;IACb,MAAM,IAAIC,KAAK,CACb,kHAAkH,CACnH;EACH;EACA,OAAO,CAACF,IAAI,CAACG,KAAK,EAAEL,QAAQ,CAAC;AAC/B,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"NonEmptyIterable.js","names":["unprepend","self","iterator","Symbol","next","done","Error","value"],"sources":["../src/NonEmptyIterable.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;AA+FA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoHA,OAAO,MAAMA,SAAS,GAAOC,IAAyB,IAAuD;EAC3G,MAAMC,QAAQ,GAAGD,IAAI,CAACE,MAAM,CAACD,QAAQ,CAAC,EAAE;EACxC,MAAME,IAAI,GAAGF,QAAQ,CAACE,IAAI,EAAE;EAC5B,IAAIA,IAAI,CAACC,IAAI,EAAE;IACb,MAAM,IAAIC,KAAK,CACb,kHAAkH,CACnH;EACH;EACA,OAAO,CAACF,IAAI,CAACG,KAAK,EAAEL,QAAQ,CAAC;AAC/B,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Number.d.ts b/.opencode/node_modules/effect/dist/Number.d.ts index 7ae4a74938a13657b45a46a1cbfbbce63de0d9f2..df14aa634ce04f627ffe2ab2769bde5cc3edc506 100644 --- a/.opencode/node_modules/effect/dist/Number.d.ts +++ b/.opencode/node_modules/effect/dist/Number.d.ts @@ -1,6 +1,9 @@ /** - * This module provides utility functions and type class instances for working with the `number` type in TypeScript. - * It includes functions for basic arithmetic operations. + * Works with TypeScript `number` values. + * + * This module exposes the native `Number` constructor together with helpers for + * checking, parsing, arithmetic, safe division, comparison, range checks, + * clamping, rounding, ordering, equivalence, and numeric aggregation. * * @since 2.0.0 */ @@ -10,11 +13,24 @@ import * as order from "./Order.ts"; import type { Ordering } from "./Ordering.ts"; import * as Reducer from "./Reducer.ts"; /** - * The global `Number` constructor. + * Exposes the global number constructor. + * + * **When to use** + * + * Use to access native JavaScript numeric coercion from the Effect module + * namespace. + * + * **Gotchas** + * + * This follows native `Number` coercion rules, including empty strings + * becoming `0` and invalid numeric strings becoming `NaN`. + * + * @see {@link parse} for parsing strings into an `Option` + * + * **Example** (Coercing values to numbers) * - * @example * ```ts - * import * as N from "effect/Number" + * import { Number as N } from "effect" * * const num = N.Number("42") * console.log(num) // 42 @@ -28,15 +44,20 @@ import * as Reducer from "./Reducer.ts"; */ export declare const Number: NumberConstructor; /** - * Tests if a value is a `number`. + * Checks whether a value is a `number`. + * + * **When to use** + * + * Use to validate unknown input and narrow it to `number`. + * + * **Example** (Checking for numbers) * - * @example * ```ts - * import { isNumber } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isNumber(2), true) - * assert.deepStrictEqual(isNumber("2"), false) + * assert.deepStrictEqual(Number.isNumber(2), true) + * assert.deepStrictEqual(Number.isNumber("2"), false) * ``` * * @category guards @@ -46,14 +67,21 @@ export declare const isNumber: (input: unknown) => input is number; /** * Provides an addition operation on `number`s. * - * @example + * **When to use** + * + * Use to add two numbers. + * + * **Example** (Adding numbers) + * * ```ts - * import { sum } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(sum(2, 3), 5) + * assert.deepStrictEqual(Number.sum(2, 3), 5) * ``` * + * @see {@link sumAll} for summing an iterable of numbers + * * @category math * @since 2.0.0 */ @@ -61,14 +89,21 @@ export declare const sum: { /** * Provides an addition operation on `number`s. * - * @example + * **When to use** + * + * Use to add two numbers. + * + * **Example** (Adding numbers) + * * ```ts - * import { sum } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(sum(2, 3), 5) + * assert.deepStrictEqual(Number.sum(2, 3), 5) * ``` * + * @see {@link sumAll} for summing an iterable of numbers + * * @category math * @since 2.0.0 */ @@ -76,14 +111,21 @@ export declare const sum: { /** * Provides an addition operation on `number`s. * - * @example + * **When to use** + * + * Use to add two numbers. + * + * **Example** (Adding numbers) + * * ```ts - * import { sum } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(sum(2, 3), 5) + * assert.deepStrictEqual(Number.sum(2, 3), 5) * ``` * + * @see {@link sumAll} for summing an iterable of numbers + * * @category math * @since 2.0.0 */ @@ -92,14 +134,21 @@ export declare const sum: { /** * Provides a multiplication operation on `number`s. * - * @example + * **When to use** + * + * Use to multiply two numbers. + * + * **Example** (Multiplying numbers) + * * ```ts - * import { multiply } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(multiply(2, 3), 6) + * assert.deepStrictEqual(Number.multiply(2, 3), 6) * ``` * + * @see {@link multiplyAll} for multiplying an iterable of numbers + * * @category math * @since 2.0.0 */ @@ -107,14 +156,21 @@ export declare const multiply: { /** * Provides a multiplication operation on `number`s. * - * @example + * **When to use** + * + * Use to multiply two numbers. + * + * **Example** (Multiplying numbers) + * * ```ts - * import { multiply } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(multiply(2, 3), 6) + * assert.deepStrictEqual(Number.multiply(2, 3), 6) * ``` * + * @see {@link multiplyAll} for multiplying an iterable of numbers + * * @category math * @since 2.0.0 */ @@ -122,14 +178,21 @@ export declare const multiply: { /** * Provides a multiplication operation on `number`s. * - * @example + * **When to use** + * + * Use to multiply two numbers. + * + * **Example** (Multiplying numbers) + * * ```ts - * import { multiply } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(multiply(2, 3), 6) + * assert.deepStrictEqual(Number.multiply(2, 3), 6) * ``` * + * @see {@link multiplyAll} for multiplying an iterable of numbers + * * @category math * @since 2.0.0 */ @@ -138,12 +201,17 @@ export declare const multiply: { /** * Provides a subtraction operation on `number`s. * - * @example + * **When to use** + * + * Use to subtract one number from another. + * + * **Example** (Subtracting numbers) + * * ```ts - * import { subtract } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(subtract(2, 3), -1) + * assert.deepStrictEqual(Number.subtract(2, 3), -1) * ``` * * @category math @@ -153,12 +221,17 @@ export declare const subtract: { /** * Provides a subtraction operation on `number`s. * - * @example + * **When to use** + * + * Use to subtract one number from another. + * + * **Example** (Subtracting numbers) + * * ```ts - * import { subtract } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(subtract(2, 3), -1) + * assert.deepStrictEqual(Number.subtract(2, 3), -1) * ``` * * @category math @@ -168,12 +241,17 @@ export declare const subtract: { /** * Provides a subtraction operation on `number`s. * - * @example + * **When to use** + * + * Use to subtract one number from another. + * + * **Example** (Subtracting numbers) + * * ```ts - * import { subtract } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(subtract(2, 3), -1) + * assert.deepStrictEqual(Number.subtract(2, 3), -1) * ``` * * @category math @@ -182,11 +260,13 @@ export declare const subtract: { (self: number, that: number): number; }; /** - * Provides a division operation on `number`s. + * Divides `number`s safely, returning `Option.none()` if the divisor is `0`. + * + * **When to use** * - * Returns `Option.none()` if the divisor is `0`. + * Use to divide numbers while representing division by zero as `Option.none`. * - * **Example** + * **Example** (Dividing numbers safely) * * ```ts * import { Number } from "effect" @@ -195,16 +275,21 @@ export declare const subtract: { * Number.divide(6, 0) // Option.none() * ``` * + * @see {@link divideUnsafe} for division that throws when the divisor is zero + * @see {@link remainder} for the numeric remainder operation + * * @category math * @since 2.0.0 */ export declare const divide: { /** - * Provides a division operation on `number`s. + * Divides `number`s safely, returning `Option.none()` if the divisor is `0`. + * + * **When to use** * - * Returns `Option.none()` if the divisor is `0`. + * Use to divide numbers while representing division by zero as `Option.none`. * - * **Example** + * **Example** (Dividing numbers safely) * * ```ts * import { Number } from "effect" @@ -213,16 +298,21 @@ export declare const divide: { * Number.divide(6, 0) // Option.none() * ``` * + * @see {@link divideUnsafe} for division that throws when the divisor is zero + * @see {@link remainder} for the numeric remainder operation + * * @category math * @since 2.0.0 */ (that: number): (self: number) => Option.Option; /** - * Provides a division operation on `number`s. + * Divides `number`s safely, returning `Option.none()` if the divisor is `0`. + * + * **When to use** * - * Returns `Option.none()` if the divisor is `0`. + * Use to divide numbers while representing division by zero as `Option.none`. * - * **Example** + * **Example** (Dividing numbers safely) * * ```ts * import { Number } from "effect" @@ -231,75 +321,113 @@ export declare const divide: { * Number.divide(6, 0) // Option.none() * ``` * + * @see {@link divideUnsafe} for division that throws when the divisor is zero + * @see {@link remainder} for the numeric remainder operation + * * @category math * @since 2.0.0 */ (self: number, that: number): Option.Option; }; /** - * Provides an unsafe division operation on `number`s. + * Divides two `number` values without returning an `Option`. + * + * **When to use** + * + * Use to divide `number` values where the divisor is known to be non-zero and + * a plain `number` result is preferred over handling `Option.none`. + * + * **Gotchas** * * Throws a `RangeError` if the divisor is `0`. * - * **Example** + * **Example** (Dividing numbers unsafely) * * ```ts * import { Number } from "effect" * - * Number.divideUnsafe(6, 3) // 2 - * Number.divideUnsafe(6, 0) // throws RangeError("Division by zero") + * console.log(Number.divideUnsafe(6, 3)) // 2 + * + * // Passing 0 as the divisor throws a RangeError("Division by zero"). * ``` * + * @see {@link divide} for division that returns `Option.none` when the divisor is zero + * * @category math - * @since 2.0.0 + * @since 4.0.0 */ export declare const divideUnsafe: { /** - * Provides an unsafe division operation on `number`s. + * Divides two `number` values without returning an `Option`. + * + * **When to use** + * + * Use to divide `number` values where the divisor is known to be non-zero and + * a plain `number` result is preferred over handling `Option.none`. + * + * **Gotchas** * * Throws a `RangeError` if the divisor is `0`. * - * **Example** + * **Example** (Dividing numbers unsafely) * * ```ts * import { Number } from "effect" * - * Number.divideUnsafe(6, 3) // 2 - * Number.divideUnsafe(6, 0) // throws RangeError("Division by zero") + * console.log(Number.divideUnsafe(6, 3)) // 2 + * + * // Passing 0 as the divisor throws a RangeError("Division by zero"). * ``` * + * @see {@link divide} for division that returns `Option.none` when the divisor is zero + * * @category math - * @since 2.0.0 + * @since 4.0.0 */ (that: number): (self: number) => number; /** - * Provides an unsafe division operation on `number`s. + * Divides two `number` values without returning an `Option`. + * + * **When to use** + * + * Use to divide `number` values where the divisor is known to be non-zero and + * a plain `number` result is preferred over handling `Option.none`. + * + * **Gotchas** * * Throws a `RangeError` if the divisor is `0`. * - * **Example** + * **Example** (Dividing numbers unsafely) * * ```ts * import { Number } from "effect" * - * Number.divideUnsafe(6, 3) // 2 - * Number.divideUnsafe(6, 0) // throws RangeError("Division by zero") + * console.log(Number.divideUnsafe(6, 3)) // 2 + * + * // Passing 0 as the divisor throws a RangeError("Division by zero"). * ``` * + * @see {@link divide} for division that returns `Option.none` when the divisor is zero + * * @category math - * @since 2.0.0 + * @since 4.0.0 */ (self: number, that: number): number; }; /** * Returns the result of adding `1` to a given number. * - * @example + * **When to use** + * + * Use to increment a numeric counter by one. + * + * **Example** (Incrementing a number) + * * ```ts - * import { increment } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(increment(2), 3) + * assert.deepStrictEqual(Number.increment(2), 3) * ``` * * @category math @@ -309,12 +437,17 @@ export declare const increment: (n: number) => number; /** * Decrements a number by `1`. * - * @example + * **When to use** + * + * Use to decrement a numeric counter by one. + * + * **Example** (Decrementing a number) + * * ```ts - * import { decrement } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(decrement(3), 2) + * assert.deepStrictEqual(Number.decrement(3), 2) * ``` * * @category math @@ -322,11 +455,17 @@ export declare const increment: (n: number) => number; */ export declare const decrement: (n: number) => number; /** - * An `Order` instance for `number` values. + * Order instance for `number` values. + * + * **When to use** + * + * Use when you need to sort or compare numbers through APIs that accept an + * ordering instance. + * + * **Example** (Comparing numbers) * - * @example * ```ts - * import * as Number from "effect/Number" + * import { Number } from "effect" * * console.log(Number.Order(1, 2)) // -1 * console.log(Number.Order(2, 1)) // 1 @@ -338,11 +477,15 @@ export declare const decrement: (n: number) => number; */ export declare const Order: order.Order; /** - * An `Equivalence` instance for numbers. + * Equivalence instance for numbers where `NaN` is considered equal to `NaN`. + * + * **When to use** * - * `NaN` is considered equal to `NaN`. + * Use when checking numeric equality through APIs that accept an equivalence + * relation. + * + * **Example** (Comparing numbers for equivalence) * - * @example * ```ts * import { Number } from "effect" * @@ -352,223 +495,288 @@ export declare const Order: order.Order; * ``` * * @category instances - * @since 4.0.0 + * @since 2.0.0 */ export declare const Equivalence: Equ.Equivalence; /** * Returns `true` if the first argument is less than the second, otherwise `false`. * - * @example + * **When to use** + * + * Use to test whether one number is strictly less than another. + * + * **Example** (Checking less-than comparisons) + * * ```ts - * import { isLessThan } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isLessThan(2, 3), true) - * assert.deepStrictEqual(isLessThan(3, 3), false) - * assert.deepStrictEqual(isLessThan(4, 3), false) + * assert.deepStrictEqual(Number.isLessThan(2, 3), true) + * assert.deepStrictEqual(Number.isLessThan(3, 3), false) + * assert.deepStrictEqual(Number.isLessThan(4, 3), false) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export declare const isLessThan: { /** * Returns `true` if the first argument is less than the second, otherwise `false`. * - * @example + * **When to use** + * + * Use to test whether one number is strictly less than another. + * + * **Example** (Checking less-than comparisons) + * * ```ts - * import { isLessThan } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isLessThan(2, 3), true) - * assert.deepStrictEqual(isLessThan(3, 3), false) - * assert.deepStrictEqual(isLessThan(4, 3), false) + * assert.deepStrictEqual(Number.isLessThan(2, 3), true) + * assert.deepStrictEqual(Number.isLessThan(3, 3), false) + * assert.deepStrictEqual(Number.isLessThan(4, 3), false) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ (that: number): (self: number) => boolean; /** * Returns `true` if the first argument is less than the second, otherwise `false`. * - * @example + * **When to use** + * + * Use to test whether one number is strictly less than another. + * + * **Example** (Checking less-than comparisons) + * * ```ts - * import { isLessThan } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isLessThan(2, 3), true) - * assert.deepStrictEqual(isLessThan(3, 3), false) - * assert.deepStrictEqual(isLessThan(4, 3), false) + * assert.deepStrictEqual(Number.isLessThan(2, 3), true) + * assert.deepStrictEqual(Number.isLessThan(3, 3), false) + * assert.deepStrictEqual(Number.isLessThan(4, 3), false) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ (self: number, that: number): boolean; }; /** * Returns a function that checks if a given `number` is less than or equal to the provided one. * - * @example + * **When to use** + * + * Use to test whether one number is less than or equal to another. + * + * **Example** (Checking less-than-or-equal comparisons) + * * ```ts - * import { isLessThanOrEqualTo } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isLessThanOrEqualTo(2, 3), true) - * assert.deepStrictEqual(isLessThanOrEqualTo(3, 3), true) - * assert.deepStrictEqual(isLessThanOrEqualTo(4, 3), false) + * assert.deepStrictEqual(Number.isLessThanOrEqualTo(2, 3), true) + * assert.deepStrictEqual(Number.isLessThanOrEqualTo(3, 3), true) + * assert.deepStrictEqual(Number.isLessThanOrEqualTo(4, 3), false) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export declare const isLessThanOrEqualTo: { /** * Returns a function that checks if a given `number` is less than or equal to the provided one. * - * @example + * **When to use** + * + * Use to test whether one number is less than or equal to another. + * + * **Example** (Checking less-than-or-equal comparisons) + * * ```ts - * import { isLessThanOrEqualTo } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isLessThanOrEqualTo(2, 3), true) - * assert.deepStrictEqual(isLessThanOrEqualTo(3, 3), true) - * assert.deepStrictEqual(isLessThanOrEqualTo(4, 3), false) + * assert.deepStrictEqual(Number.isLessThanOrEqualTo(2, 3), true) + * assert.deepStrictEqual(Number.isLessThanOrEqualTo(3, 3), true) + * assert.deepStrictEqual(Number.isLessThanOrEqualTo(4, 3), false) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ (that: number): (self: number) => boolean; /** * Returns a function that checks if a given `number` is less than or equal to the provided one. * - * @example + * **When to use** + * + * Use to test whether one number is less than or equal to another. + * + * **Example** (Checking less-than-or-equal comparisons) + * * ```ts - * import { isLessThanOrEqualTo } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isLessThanOrEqualTo(2, 3), true) - * assert.deepStrictEqual(isLessThanOrEqualTo(3, 3), true) - * assert.deepStrictEqual(isLessThanOrEqualTo(4, 3), false) + * assert.deepStrictEqual(Number.isLessThanOrEqualTo(2, 3), true) + * assert.deepStrictEqual(Number.isLessThanOrEqualTo(3, 3), true) + * assert.deepStrictEqual(Number.isLessThanOrEqualTo(4, 3), false) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ (self: number, that: number): boolean; }; /** * Returns `true` if the first argument is greater than the second, otherwise `false`. * - * @example + * **When to use** + * + * Use to test whether one number is strictly greater than another. + * + * **Example** (Checking greater-than comparisons) + * * ```ts - * import { isGreaterThan } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isGreaterThan(2, 3), false) - * assert.deepStrictEqual(isGreaterThan(3, 3), false) - * assert.deepStrictEqual(isGreaterThan(4, 3), true) + * assert.deepStrictEqual(Number.isGreaterThan(2, 3), false) + * assert.deepStrictEqual(Number.isGreaterThan(3, 3), false) + * assert.deepStrictEqual(Number.isGreaterThan(4, 3), true) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export declare const isGreaterThan: { /** * Returns `true` if the first argument is greater than the second, otherwise `false`. * - * @example + * **When to use** + * + * Use to test whether one number is strictly greater than another. + * + * **Example** (Checking greater-than comparisons) + * * ```ts - * import { isGreaterThan } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isGreaterThan(2, 3), false) - * assert.deepStrictEqual(isGreaterThan(3, 3), false) - * assert.deepStrictEqual(isGreaterThan(4, 3), true) + * assert.deepStrictEqual(Number.isGreaterThan(2, 3), false) + * assert.deepStrictEqual(Number.isGreaterThan(3, 3), false) + * assert.deepStrictEqual(Number.isGreaterThan(4, 3), true) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ (that: number): (self: number) => boolean; /** * Returns `true` if the first argument is greater than the second, otherwise `false`. * - * @example + * **When to use** + * + * Use to test whether one number is strictly greater than another. + * + * **Example** (Checking greater-than comparisons) + * * ```ts - * import { isGreaterThan } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isGreaterThan(2, 3), false) - * assert.deepStrictEqual(isGreaterThan(3, 3), false) - * assert.deepStrictEqual(isGreaterThan(4, 3), true) + * assert.deepStrictEqual(Number.isGreaterThan(2, 3), false) + * assert.deepStrictEqual(Number.isGreaterThan(3, 3), false) + * assert.deepStrictEqual(Number.isGreaterThan(4, 3), true) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ (self: number, that: number): boolean; }; /** * Returns a function that checks if a given `number` is greater than or equal to the provided one. * - * @example + * **When to use** + * + * Use to test whether one number is greater than or equal to another. + * + * **Example** (Checking greater-than-or-equal comparisons) + * * ```ts - * import { isGreaterThanOrEqualTo } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isGreaterThanOrEqualTo(2, 3), false) - * assert.deepStrictEqual(isGreaterThanOrEqualTo(3, 3), true) - * assert.deepStrictEqual(isGreaterThanOrEqualTo(4, 3), true) + * assert.deepStrictEqual(Number.isGreaterThanOrEqualTo(2, 3), false) + * assert.deepStrictEqual(Number.isGreaterThanOrEqualTo(3, 3), true) + * assert.deepStrictEqual(Number.isGreaterThanOrEqualTo(4, 3), true) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export declare const isGreaterThanOrEqualTo: { /** * Returns a function that checks if a given `number` is greater than or equal to the provided one. * - * @example + * **When to use** + * + * Use to test whether one number is greater than or equal to another. + * + * **Example** (Checking greater-than-or-equal comparisons) + * * ```ts - * import { isGreaterThanOrEqualTo } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isGreaterThanOrEqualTo(2, 3), false) - * assert.deepStrictEqual(isGreaterThanOrEqualTo(3, 3), true) - * assert.deepStrictEqual(isGreaterThanOrEqualTo(4, 3), true) + * assert.deepStrictEqual(Number.isGreaterThanOrEqualTo(2, 3), false) + * assert.deepStrictEqual(Number.isGreaterThanOrEqualTo(3, 3), true) + * assert.deepStrictEqual(Number.isGreaterThanOrEqualTo(4, 3), true) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ (that: number): (self: number) => boolean; /** * Returns a function that checks if a given `number` is greater than or equal to the provided one. * - * @example + * **When to use** + * + * Use to test whether one number is greater than or equal to another. + * + * **Example** (Checking greater-than-or-equal comparisons) + * * ```ts - * import { isGreaterThanOrEqualTo } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isGreaterThanOrEqualTo(2, 3), false) - * assert.deepStrictEqual(isGreaterThanOrEqualTo(3, 3), true) - * assert.deepStrictEqual(isGreaterThanOrEqualTo(4, 3), true) + * assert.deepStrictEqual(Number.isGreaterThanOrEqualTo(2, 3), false) + * assert.deepStrictEqual(Number.isGreaterThanOrEqualTo(3, 3), true) + * assert.deepStrictEqual(Number.isGreaterThanOrEqualTo(4, 3), true) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ (self: number, that: number): boolean; }; /** - * Checks if a `number` is between a `minimum` and `maximum` value (inclusive). + * Checks whether a `number` is between a `minimum` and `maximum` value (inclusive). + * + * **When to use** + * + * Use to test whether a number falls inside an inclusive range. + * + * **Example** (Checking inclusive ranges) * - * @example * ```ts - * import * as Number from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * * const between = Number.between({ minimum: 0, maximum: 5 }) @@ -578,16 +786,23 @@ export declare const isGreaterThanOrEqualTo: { * assert.deepStrictEqual(between(6), false) * ``` * + * @see {@link clamp} for forcing a number into an inclusive range + * * @category predicates * @since 2.0.0 */ export declare const between: { /** - * Checks if a `number` is between a `minimum` and `maximum` value (inclusive). + * Checks whether a `number` is between a `minimum` and `maximum` value (inclusive). + * + * **When to use** + * + * Use to test whether a number falls inside an inclusive range. + * + * **Example** (Checking inclusive ranges) * - * @example * ```ts - * import * as Number from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * * const between = Number.between({ minimum: 0, maximum: 5 }) @@ -597,6 +812,8 @@ export declare const between: { * assert.deepStrictEqual(between(6), false) * ``` * + * @see {@link clamp} for forcing a number into an inclusive range + * * @category predicates * @since 2.0.0 */ @@ -605,11 +822,16 @@ export declare const between: { maximum: number; }): (self: number) => boolean; /** - * Checks if a `number` is between a `minimum` and `maximum` value (inclusive). + * Checks whether a `number` is between a `minimum` and `maximum` value (inclusive). + * + * **When to use** + * + * Use to test whether a number falls inside an inclusive range. + * + * **Example** (Checking inclusive ranges) * - * @example * ```ts - * import * as Number from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * * const between = Number.between({ minimum: 0, maximum: 5 }) @@ -619,6 +841,8 @@ export declare const between: { * assert.deepStrictEqual(between(6), false) * ``` * + * @see {@link clamp} for forcing a number into an inclusive range + * * @category predicates * @since 2.0.0 */ @@ -630,13 +854,20 @@ export declare const between: { /** * Restricts the given `number` to be within the range specified by the `minimum` and `maximum` values. * + * **When to use** + * + * Use to force a number into an inclusive range. + * + * **Details** + * * - If the `number` is less than the `minimum` value, the function returns the `minimum` value. * - If the `number` is greater than the `maximum` value, the function returns the `maximum` value. * - Otherwise, it returns the original `number`. * - * @example + * **Example** (Clamping to a range) + * * ```ts - * import * as Number from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * * const clamp = Number.clamp({ minimum: 1, maximum: 5 }) @@ -646,6 +877,8 @@ export declare const between: { * assert.equal(clamp(6), 5) * ``` * + * @see {@link between} for checking whether a number is already inside a range + * * @category math * @since 2.0.0 */ @@ -653,13 +886,20 @@ export declare const clamp: { /** * Restricts the given `number` to be within the range specified by the `minimum` and `maximum` values. * + * **When to use** + * + * Use to force a number into an inclusive range. + * + * **Details** + * * - If the `number` is less than the `minimum` value, the function returns the `minimum` value. * - If the `number` is greater than the `maximum` value, the function returns the `maximum` value. * - Otherwise, it returns the original `number`. * - * @example + * **Example** (Clamping to a range) + * * ```ts - * import * as Number from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * * const clamp = Number.clamp({ minimum: 1, maximum: 5 }) @@ -669,6 +909,8 @@ export declare const clamp: { * assert.equal(clamp(6), 5) * ``` * + * @see {@link between} for checking whether a number is already inside a range + * * @category math * @since 2.0.0 */ @@ -679,13 +921,20 @@ export declare const clamp: { /** * Restricts the given `number` to be within the range specified by the `minimum` and `maximum` values. * + * **When to use** + * + * Use to force a number into an inclusive range. + * + * **Details** + * * - If the `number` is less than the `minimum` value, the function returns the `minimum` value. * - If the `number` is greater than the `maximum` value, the function returns the `maximum` value. * - Otherwise, it returns the original `number`. * - * @example + * **Example** (Clamping to a range) + * * ```ts - * import * as Number from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * * const clamp = Number.clamp({ minimum: 1, maximum: 5 }) @@ -695,6 +944,8 @@ export declare const clamp: { * assert.equal(clamp(6), 5) * ``` * + * @see {@link between} for checking whether a number is already inside a range + * * @category math * @since 2.0.0 */ @@ -706,14 +957,21 @@ export declare const clamp: { /** * Returns the minimum between two `number`s. * - * @example + * **When to use** + * + * Use to select the smaller of two numbers. + * + * **Example** (Finding the minimum) + * * ```ts - * import { min } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(min(2, 3), 2) + * assert.deepStrictEqual(Number.min(2, 3), 2) * ``` * + * @see {@link max} for selecting the larger value + * * @category math * @since 2.0.0 */ @@ -721,14 +979,21 @@ export declare const min: { /** * Returns the minimum between two `number`s. * - * @example + * **When to use** + * + * Use to select the smaller of two numbers. + * + * **Example** (Finding the minimum) + * * ```ts - * import { min } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(min(2, 3), 2) + * assert.deepStrictEqual(Number.min(2, 3), 2) * ``` * + * @see {@link max} for selecting the larger value + * * @category math * @since 2.0.0 */ @@ -736,14 +1001,21 @@ export declare const min: { /** * Returns the minimum between two `number`s. * - * @example + * **When to use** + * + * Use to select the smaller of two numbers. + * + * **Example** (Finding the minimum) + * * ```ts - * import { min } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(min(2, 3), 2) + * assert.deepStrictEqual(Number.min(2, 3), 2) * ``` * + * @see {@link max} for selecting the larger value + * * @category math * @since 2.0.0 */ @@ -752,14 +1024,21 @@ export declare const min: { /** * Returns the maximum between two `number`s. * - * @example + * **When to use** + * + * Use to select the larger of two numbers. + * + * **Example** (Finding the maximum) + * * ```ts - * import { max } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(max(2, 3), 3) + * assert.deepStrictEqual(Number.max(2, 3), 3) * ``` * + * @see {@link min} for selecting the smaller value + * * @category math * @since 2.0.0 */ @@ -767,14 +1046,21 @@ export declare const max: { /** * Returns the maximum between two `number`s. * - * @example + * **When to use** + * + * Use to select the larger of two numbers. + * + * **Example** (Finding the maximum) + * * ```ts - * import { max } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(max(2, 3), 3) + * assert.deepStrictEqual(Number.max(2, 3), 3) * ``` * + * @see {@link min} for selecting the smaller value + * * @category math * @since 2.0.0 */ @@ -782,14 +1068,21 @@ export declare const max: { /** * Returns the maximum between two `number`s. * - * @example + * **When to use** + * + * Use to select the larger of two numbers. + * + * **Example** (Finding the maximum) + * * ```ts - * import { max } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(max(2, 3), 3) + * assert.deepStrictEqual(Number.max(2, 3), 3) * ``` * + * @see {@link min} for selecting the smaller value + * * @category math * @since 2.0.0 */ @@ -798,14 +1091,19 @@ export declare const max: { /** * Determines the sign of a given `number`. * - * @example + * **When to use** + * + * Use to classify a number as negative, zero, or positive. + * + * **Example** (Determining the sign) + * * ```ts - * import { sign } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(sign(-5), -1) - * assert.deepStrictEqual(sign(0), 0) - * assert.deepStrictEqual(sign(5), 1) + * assert.deepStrictEqual(Number.sign(-5), -1) + * assert.deepStrictEqual(Number.sign(0), 0) + * assert.deepStrictEqual(Number.sign(5), 1) * ``` * * @category math @@ -815,14 +1113,22 @@ export declare const sign: (n: number) => Ordering; /** * Takes an `Iterable` of `number`s and returns their sum as a single `number`. * - * @example + * **When to use** + * + * Use to sum all numbers in an iterable. + * + * **Example** (Summing an iterable) + * * ```ts - * import { sumAll } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(sumAll([2, 3, 4]), 9) + * assert.deepStrictEqual(Number.sumAll([2, 3, 4]), 9) * ``` * + * @see {@link sum} for adding two numbers + * @see {@link ReducerSum} for summing through APIs that consume a `Reducer` + * * @category math * @since 2.0.0 */ @@ -830,71 +1136,97 @@ export declare const sumAll: (collection: Iterable) => number; /** * Takes an `Iterable` of `number`s and returns their multiplication as a single `number`. * - * @example + * **When to use** + * + * Use to multiply all numbers in an iterable. + * + * **Example** (Multiplying an iterable) + * * ```ts - * import { multiplyAll } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(multiplyAll([2, 3, 4]), 24) + * assert.deepStrictEqual(Number.multiplyAll([2, 3, 4]), 24) * ``` * + * @see {@link multiply} for multiplying two numbers + * @see {@link ReducerMultiply} for multiplying through APIs that consume a `Reducer` + * * @category math * @since 2.0.0 */ export declare const multiplyAll: (collection: Iterable) => number; /** - * Returns the remainder left over when one operand is divided by a second operand. + * Returns the remainder left over when one operand is divided by a second operand, always taking the sign of the dividend. + * + * **When to use** + * + * Use to compute a numeric remainder while preserving decimal precision better + * than direct JavaScript `%` for decimal operands. * - * It always takes the sign of the dividend. + * **Example** (Calculating remainders) * - * @example * ```ts - * import { remainder } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(remainder(2, 2), 0) - * assert.deepStrictEqual(remainder(3, 2), 1) - * assert.deepStrictEqual(remainder(-4, 2), -0) + * assert.deepStrictEqual(Number.remainder(2, 2), 0) + * assert.deepStrictEqual(Number.remainder(3, 2), 1) + * assert.deepStrictEqual(Number.remainder(-4, 2), -0) * ``` * + * @see {@link divide} for quotient calculation with division-by-zero represented as `Option.none` + * * @category math * @since 2.0.0 */ export declare const remainder: { /** - * Returns the remainder left over when one operand is divided by a second operand. + * Returns the remainder left over when one operand is divided by a second operand, always taking the sign of the dividend. + * + * **When to use** + * + * Use to compute a numeric remainder while preserving decimal precision better + * than direct JavaScript `%` for decimal operands. * - * It always takes the sign of the dividend. + * **Example** (Calculating remainders) * - * @example * ```ts - * import { remainder } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(remainder(2, 2), 0) - * assert.deepStrictEqual(remainder(3, 2), 1) - * assert.deepStrictEqual(remainder(-4, 2), -0) + * assert.deepStrictEqual(Number.remainder(2, 2), 0) + * assert.deepStrictEqual(Number.remainder(3, 2), 1) + * assert.deepStrictEqual(Number.remainder(-4, 2), -0) * ``` * + * @see {@link divide} for quotient calculation with division-by-zero represented as `Option.none` + * * @category math * @since 2.0.0 */ (divisor: number): (self: number) => number; /** - * Returns the remainder left over when one operand is divided by a second operand. + * Returns the remainder left over when one operand is divided by a second operand, always taking the sign of the dividend. + * + * **When to use** * - * It always takes the sign of the dividend. + * Use to compute a numeric remainder while preserving decimal precision better + * than direct JavaScript `%` for decimal operands. + * + * **Example** (Calculating remainders) * - * @example * ```ts - * import { remainder } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(remainder(2, 2), 0) - * assert.deepStrictEqual(remainder(3, 2), 1) - * assert.deepStrictEqual(remainder(-4, 2), -0) + * assert.deepStrictEqual(Number.remainder(2, 2), 0) + * assert.deepStrictEqual(Number.remainder(3, 2), 1) + * assert.deepStrictEqual(Number.remainder(-4, 2), -0) * ``` * + * @see {@link divide} for quotient calculation with division-by-zero represented as `Option.none` + * * @category math * @since 2.0.0 */ @@ -903,13 +1235,18 @@ export declare const remainder: { /** * Returns the next power of 2 from the given number. * - * @example + * **When to use** + * + * Use to round a number up to the next power of two. + * + * **Example** (Finding the next power of two) + * * ```ts - * import { nextPow2 } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(nextPow2(5), 8) - * assert.deepStrictEqual(nextPow2(17), 32) + * assert.deepStrictEqual(Number.nextPow2(5), 8) + * assert.deepStrictEqual(Number.nextPow2(17), 32) * ``` * * @category math @@ -917,10 +1254,14 @@ export declare const remainder: { */ export declare const nextPow2: (n: number) => number; /** - * Tries to parse a `number` from a `string` using the `Number()` function. + * Parses a `number` from a `string` safely using the `Number()` function. * The following special string values are supported: "NaN", "Infinity", "-Infinity". * - * **Example** + * **When to use** + * + * Use to parse numeric text without throwing on invalid input. + * + * **Example** (Parsing numbers from strings) * * ```ts * import { Number } from "effect" @@ -933,6 +1274,8 @@ export declare const nextPow2: (n: number) => number; * Number.parse("not a number") // Option.none() * ``` * + * @see {@link Number} for native constructor coercion + * * @category constructors * @since 2.0.0 */ @@ -940,13 +1283,18 @@ export declare const parse: (s: string) => Option.Option; /** * Returns the number rounded with the given precision. * - * @example + * **When to use** + * + * Use to round a number to a fixed number of decimal places. + * + * **Example** (Rounding with precision) + * * ```ts - * import { round } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(round(1.1234, 2), 1.12) - * assert.deepStrictEqual(round(1.567, 2), 1.57) + * assert.deepStrictEqual(Number.round(1.1234, 2), 1.12) + * assert.deepStrictEqual(Number.round(1.567, 2), 1.57) * ``` * * @category math @@ -956,13 +1304,18 @@ export declare const round: { /** * Returns the number rounded with the given precision. * - * @example + * **When to use** + * + * Use to round a number to a fixed number of decimal places. + * + * **Example** (Rounding with precision) + * * ```ts - * import { round } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(round(1.1234, 2), 1.12) - * assert.deepStrictEqual(round(1.567, 2), 1.57) + * assert.deepStrictEqual(Number.round(1.1234, 2), 1.12) + * assert.deepStrictEqual(Number.round(1.567, 2), 1.57) * ``` * * @category math @@ -972,13 +1325,18 @@ export declare const round: { /** * Returns the number rounded with the given precision. * - * @example + * **When to use** + * + * Use to round a number to a fixed number of decimal places. + * + * **Example** (Rounding with precision) + * * ```ts - * import { round } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(round(1.1234, 2), 1.12) - * assert.deepStrictEqual(round(1.567, 2), 1.57) + * assert.deepStrictEqual(Number.round(1.1234, 2), 1.12) + * assert.deepStrictEqual(Number.round(1.567, 2), 1.57) * ``` * * @category math @@ -987,26 +1345,88 @@ export declare const round: { (self: number, precision: number): number; }; /** - * A `Reducer` for combining `number`s using addition. + * Reducer for combining `number`s using addition. + * + * **When to use** + * + * Use to sum many numbers through APIs that consume a `Reducer`. + * + * **Details** * + * The reducer starts from `0`, so `combineAll([])` returns `0`. + * + * @see {@link sumAll} for summing an iterable directly + * @see {@link ReducerMultiply} for multiplying number values + * + * @category math * @since 4.0.0 */ export declare const ReducerSum: Reducer.Reducer; /** - * A `Reducer` for combining `number`s using multiplication. + * Reducer for combining `number`s using multiplication. + * + * **When to use** + * + * Use to multiply many numbers through APIs that consume a `Reducer`. + * + * **Details** + * + * The reducer starts from `1`, so reducing an empty collection returns `1`. + * + * **Gotchas** + * + * Reducing an iterable short-circuits when it sees `0`, so later elements are + * not consumed. * + * @see {@link multiplyAll} for multiplying an iterable directly + * + * @category math * @since 4.0.0 */ export declare const ReducerMultiply: Reducer.Reducer; /** - * A `Combiner` that returns the maximum `number`. + * Reducer for reducing `number`s by keeping the maximum value. + * + * **When to use** + * + * Use to keep the largest number through APIs that consume a `Reducer`. + * + * **Details** + * + * The reducer starts from `-Infinity`, so reducing an empty collection returns + * `-Infinity`. + * + * **Gotchas** + * + * `NaN` values propagate through `Math.max`. + * + * @see {@link ReducerMin} for keeping the smallest number + * @see {@link max} for comparing two numbers directly * + * @category math * @since 4.0.0 */ export declare const ReducerMax: Reducer.Reducer; /** - * A `Combiner` that returns the minimum `number`. + * Reducer for reducing `number`s by keeping the minimum value. + * + * **When to use** + * + * Use to keep the smallest number through APIs that consume a `Reducer`. + * + * **Details** + * + * The reducer starts from `Infinity`, so reducing an empty collection returns + * `Infinity`. * + * **Gotchas** + * + * `NaN` values propagate through `Math.min`. + * + * @see {@link ReducerMax} for keeping the largest number + * @see {@link min} for comparing two numbers directly + * + * @category math * @since 4.0.0 */ export declare const ReducerMin: Reducer.Reducer; diff --git a/.opencode/node_modules/effect/dist/Number.d.ts.map b/.opencode/node_modules/effect/dist/Number.d.ts.map index babad037fa43298490a9651309538c301fc14192..f6c47237aef86441ade0174f95153e22932f44c5 100644 --- a/.opencode/node_modules/effect/dist/Number.d.ts.map +++ b/.opencode/node_modules/effect/dist/Number.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Number.d.ts","sourceRoot":"","sources":["../src/Number.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAA;A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AC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;CAIzC,CAAA;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAoC,CAAA;AAEnF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,eAAe,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAOlD,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAqD,CAAA;AAEpG;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAoD,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Number.js b/.opencode/node_modules/effect/dist/Number.js index 3eb00212d380cf4d06ea9a1221e3421141b9f5f0..a8ea21b855ded37df10fcbdfb421bdac12f63577 100644 --- a/.opencode/node_modules/effect/dist/Number.js +++ b/.opencode/node_modules/effect/dist/Number.js @@ -1,6 +1,9 @@ /** - * This module provides utility functions and type class instances for working with the `number` type in TypeScript. - * It includes functions for basic arithmetic operations. + * Works with TypeScript `number` values. + * + * This module exposes the native `Number` constructor together with helpers for + * checking, parsing, arithmetic, safe division, comparison, range checks, + * clamping, rounding, ordering, equivalence, and numeric aggregation. * * @since 2.0.0 */ @@ -11,11 +14,24 @@ import * as order from "./Order.js"; import * as predicate from "./Predicate.js"; import * as Reducer from "./Reducer.js"; /** - * The global `Number` constructor. + * Exposes the global number constructor. + * + * **When to use** + * + * Use to access native JavaScript numeric coercion from the Effect module + * namespace. + * + * **Gotchas** + * + * This follows native `Number` coercion rules, including empty strings + * becoming `0` and invalid numeric strings becoming `NaN`. + * + * @see {@link parse} for parsing strings into an `Option` + * + * **Example** (Coercing values to numbers) * - * @example * ```ts - * import * as N from "effect/Number" + * import { Number as N } from "effect" * * const num = N.Number("42") * console.log(num) // 42 @@ -29,15 +45,20 @@ import * as Reducer from "./Reducer.js"; */ export const Number = globalThis.Number; /** - * Tests if a value is a `number`. + * Checks whether a value is a `number`. + * + * **When to use** + * + * Use to validate unknown input and narrow it to `number`. + * + * **Example** (Checking for numbers) * - * @example * ```ts - * import { isNumber } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isNumber(2), true) - * assert.deepStrictEqual(isNumber("2"), false) + * assert.deepStrictEqual(Number.isNumber(2), true) + * assert.deepStrictEqual(Number.isNumber("2"), false) * ``` * * @category guards @@ -47,14 +68,21 @@ export const isNumber = predicate.isNumber; /** * Provides an addition operation on `number`s. * - * @example + * **When to use** + * + * Use to add two numbers. + * + * **Example** (Adding numbers) + * * ```ts - * import { sum } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(sum(2, 3), 5) + * assert.deepStrictEqual(Number.sum(2, 3), 5) * ``` * + * @see {@link sumAll} for summing an iterable of numbers + * * @category math * @since 2.0.0 */ @@ -62,14 +90,21 @@ export const sum = /*#__PURE__*/dual(2, (self, that) => self + that); /** * Provides a multiplication operation on `number`s. * - * @example + * **When to use** + * + * Use to multiply two numbers. + * + * **Example** (Multiplying numbers) + * * ```ts - * import { multiply } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(multiply(2, 3), 6) + * assert.deepStrictEqual(Number.multiply(2, 3), 6) * ``` * + * @see {@link multiplyAll} for multiplying an iterable of numbers + * * @category math * @since 2.0.0 */ @@ -77,12 +112,17 @@ export const multiply = /*#__PURE__*/dual(2, (self, that) => self * that); /** * Provides a subtraction operation on `number`s. * - * @example + * **When to use** + * + * Use to subtract one number from another. + * + * **Example** (Subtracting numbers) + * * ```ts - * import { subtract } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(subtract(2, 3), -1) + * assert.deepStrictEqual(Number.subtract(2, 3), -1) * ``` * * @category math @@ -90,11 +130,13 @@ export const multiply = /*#__PURE__*/dual(2, (self, that) => self * that); */ export const subtract = /*#__PURE__*/dual(2, (self, that) => self - that); /** - * Provides a division operation on `number`s. + * Divides `number`s safely, returning `Option.none()` if the divisor is `0`. * - * Returns `Option.none()` if the divisor is `0`. + * **When to use** * - * **Example** + * Use to divide numbers while representing division by zero as `Option.none`. + * + * **Example** (Dividing numbers safely) * * ```ts * import { Number } from "effect" @@ -103,37 +145,55 @@ export const subtract = /*#__PURE__*/dual(2, (self, that) => self - that); * Number.divide(6, 0) // Option.none() * ``` * + * @see {@link divideUnsafe} for division that throws when the divisor is zero + * @see {@link remainder} for the numeric remainder operation + * * @category math * @since 2.0.0 */ export const divide = /*#__PURE__*/dual(2, (self, that) => that === 0 ? Option.none() : Option.some(self / that)); /** - * Provides an unsafe division operation on `number`s. + * Divides two `number` values without returning an `Option`. + * + * **When to use** + * + * Use to divide `number` values where the divisor is known to be non-zero and + * a plain `number` result is preferred over handling `Option.none`. + * + * **Gotchas** * * Throws a `RangeError` if the divisor is `0`. * - * **Example** + * **Example** (Dividing numbers unsafely) * * ```ts * import { Number } from "effect" * - * Number.divideUnsafe(6, 3) // 2 - * Number.divideUnsafe(6, 0) // throws RangeError("Division by zero") + * console.log(Number.divideUnsafe(6, 3)) // 2 + * + * // Passing 0 as the divisor throws a RangeError("Division by zero"). * ``` * + * @see {@link divide} for division that returns `Option.none` when the divisor is zero + * * @category math - * @since 2.0.0 + * @since 4.0.0 */ export const divideUnsafe = /*#__PURE__*/dual(2, (self, that) => Option.getOrThrowWith(divide(self, that), () => new RangeError("Division by zero"))); /** * Returns the result of adding `1` to a given number. * - * @example + * **When to use** + * + * Use to increment a numeric counter by one. + * + * **Example** (Incrementing a number) + * * ```ts - * import { increment } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(increment(2), 3) + * assert.deepStrictEqual(Number.increment(2), 3) * ``` * * @category math @@ -143,12 +203,17 @@ export const increment = n => n + 1; /** * Decrements a number by `1`. * - * @example + * **When to use** + * + * Use to decrement a numeric counter by one. + * + * **Example** (Decrementing a number) + * * ```ts - * import { decrement } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(decrement(3), 2) + * assert.deepStrictEqual(Number.decrement(3), 2) * ``` * * @category math @@ -156,11 +221,17 @@ export const increment = n => n + 1; */ export const decrement = n => n - 1; /** - * An `Order` instance for `number` values. + * Order instance for `number` values. + * + * **When to use** + * + * Use when you need to sort or compare numbers through APIs that accept an + * ordering instance. + * + * **Example** (Comparing numbers) * - * @example * ```ts - * import * as Number from "effect/Number" + * import { Number } from "effect" * * console.log(Number.Order(1, 2)) // -1 * console.log(Number.Order(2, 1)) // 1 @@ -172,11 +243,15 @@ export const decrement = n => n - 1; */ export const Order = order.Number; /** - * An `Equivalence` instance for numbers. + * Equivalence instance for numbers where `NaN` is considered equal to `NaN`. + * + * **When to use** * - * `NaN` is considered equal to `NaN`. + * Use when checking numeric equality through APIs that accept an equivalence + * relation. + * + * **Example** (Comparing numbers for equivalence) * - * @example * ```ts * import { Number } from "effect" * @@ -186,83 +261,108 @@ export const Order = order.Number; * ``` * * @category instances - * @since 4.0.0 + * @since 2.0.0 */ export const Equivalence = Equ.Number; /** * Returns `true` if the first argument is less than the second, otherwise `false`. * - * @example + * **When to use** + * + * Use to test whether one number is strictly less than another. + * + * **Example** (Checking less-than comparisons) + * * ```ts - * import { isLessThan } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isLessThan(2, 3), true) - * assert.deepStrictEqual(isLessThan(3, 3), false) - * assert.deepStrictEqual(isLessThan(4, 3), false) + * assert.deepStrictEqual(Number.isLessThan(2, 3), true) + * assert.deepStrictEqual(Number.isLessThan(3, 3), false) + * assert.deepStrictEqual(Number.isLessThan(4, 3), false) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export const isLessThan = /*#__PURE__*/order.isLessThan(Order); /** * Returns a function that checks if a given `number` is less than or equal to the provided one. * - * @example + * **When to use** + * + * Use to test whether one number is less than or equal to another. + * + * **Example** (Checking less-than-or-equal comparisons) + * * ```ts - * import { isLessThanOrEqualTo } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isLessThanOrEqualTo(2, 3), true) - * assert.deepStrictEqual(isLessThanOrEqualTo(3, 3), true) - * assert.deepStrictEqual(isLessThanOrEqualTo(4, 3), false) + * assert.deepStrictEqual(Number.isLessThanOrEqualTo(2, 3), true) + * assert.deepStrictEqual(Number.isLessThanOrEqualTo(3, 3), true) + * assert.deepStrictEqual(Number.isLessThanOrEqualTo(4, 3), false) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export const isLessThanOrEqualTo = /*#__PURE__*/order.isLessThanOrEqualTo(Order); /** * Returns `true` if the first argument is greater than the second, otherwise `false`. * - * @example + * **When to use** + * + * Use to test whether one number is strictly greater than another. + * + * **Example** (Checking greater-than comparisons) + * * ```ts - * import { isGreaterThan } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isGreaterThan(2, 3), false) - * assert.deepStrictEqual(isGreaterThan(3, 3), false) - * assert.deepStrictEqual(isGreaterThan(4, 3), true) + * assert.deepStrictEqual(Number.isGreaterThan(2, 3), false) + * assert.deepStrictEqual(Number.isGreaterThan(3, 3), false) + * assert.deepStrictEqual(Number.isGreaterThan(4, 3), true) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export const isGreaterThan = /*#__PURE__*/order.isGreaterThan(Order); /** * Returns a function that checks if a given `number` is greater than or equal to the provided one. * - * @example + * **When to use** + * + * Use to test whether one number is greater than or equal to another. + * + * **Example** (Checking greater-than-or-equal comparisons) + * * ```ts - * import { isGreaterThanOrEqualTo } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(isGreaterThanOrEqualTo(2, 3), false) - * assert.deepStrictEqual(isGreaterThanOrEqualTo(3, 3), true) - * assert.deepStrictEqual(isGreaterThanOrEqualTo(4, 3), true) + * assert.deepStrictEqual(Number.isGreaterThanOrEqualTo(2, 3), false) + * assert.deepStrictEqual(Number.isGreaterThanOrEqualTo(3, 3), true) + * assert.deepStrictEqual(Number.isGreaterThanOrEqualTo(4, 3), true) * ``` * * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export const isGreaterThanOrEqualTo = /*#__PURE__*/order.isGreaterThanOrEqualTo(Order); /** - * Checks if a `number` is between a `minimum` and `maximum` value (inclusive). + * Checks whether a `number` is between a `minimum` and `maximum` value (inclusive). + * + * **When to use** + * + * Use to test whether a number falls inside an inclusive range. + * + * **Example** (Checking inclusive ranges) * - * @example * ```ts - * import * as Number from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * * const between = Number.between({ minimum: 0, maximum: 5 }) @@ -272,6 +372,8 @@ export const isGreaterThanOrEqualTo = /*#__PURE__*/order.isGreaterThanOrEqualTo( * assert.deepStrictEqual(between(6), false) * ``` * + * @see {@link clamp} for forcing a number into an inclusive range + * * @category predicates * @since 2.0.0 */ @@ -279,13 +381,20 @@ export const between = /*#__PURE__*/order.isBetween(Order); /** * Restricts the given `number` to be within the range specified by the `minimum` and `maximum` values. * + * **When to use** + * + * Use to force a number into an inclusive range. + * + * **Details** + * * - If the `number` is less than the `minimum` value, the function returns the `minimum` value. * - If the `number` is greater than the `maximum` value, the function returns the `maximum` value. * - Otherwise, it returns the original `number`. * - * @example + * **Example** (Clamping to a range) + * * ```ts - * import * as Number from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * * const clamp = Number.clamp({ minimum: 1, maximum: 5 }) @@ -295,6 +404,8 @@ export const between = /*#__PURE__*/order.isBetween(Order); * assert.equal(clamp(6), 5) * ``` * + * @see {@link between} for checking whether a number is already inside a range + * * @category math * @since 2.0.0 */ @@ -302,14 +413,21 @@ export const clamp = /*#__PURE__*/order.clamp(Order); /** * Returns the minimum between two `number`s. * - * @example + * **When to use** + * + * Use to select the smaller of two numbers. + * + * **Example** (Finding the minimum) + * * ```ts - * import { min } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(min(2, 3), 2) + * assert.deepStrictEqual(Number.min(2, 3), 2) * ``` * + * @see {@link max} for selecting the larger value + * * @category math * @since 2.0.0 */ @@ -317,14 +435,21 @@ export const min = /*#__PURE__*/order.min(Order); /** * Returns the maximum between two `number`s. * - * @example + * **When to use** + * + * Use to select the larger of two numbers. + * + * **Example** (Finding the maximum) + * * ```ts - * import { max } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(max(2, 3), 3) + * assert.deepStrictEqual(Number.max(2, 3), 3) * ``` * + * @see {@link min} for selecting the smaller value + * * @category math * @since 2.0.0 */ @@ -332,14 +457,19 @@ export const max = /*#__PURE__*/order.max(Order); /** * Determines the sign of a given `number`. * - * @example + * **When to use** + * + * Use to classify a number as negative, zero, or positive. + * + * **Example** (Determining the sign) + * * ```ts - * import { sign } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(sign(-5), -1) - * assert.deepStrictEqual(sign(0), 0) - * assert.deepStrictEqual(sign(5), 1) + * assert.deepStrictEqual(Number.sign(-5), -1) + * assert.deepStrictEqual(Number.sign(0), 0) + * assert.deepStrictEqual(Number.sign(5), 1) * ``` * * @category math @@ -349,14 +479,22 @@ export const sign = n => Order(n, 0); /** * Takes an `Iterable` of `number`s and returns their sum as a single `number`. * - * @example + * **When to use** + * + * Use to sum all numbers in an iterable. + * + * **Example** (Summing an iterable) + * * ```ts - * import { sumAll } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(sumAll([2, 3, 4]), 9) + * assert.deepStrictEqual(Number.sumAll([2, 3, 4]), 9) * ``` * + * @see {@link sum} for adding two numbers + * @see {@link ReducerSum} for summing through APIs that consume a `Reducer` + * * @category math * @since 2.0.0 */ @@ -370,14 +508,22 @@ export const sumAll = collection => { /** * Takes an `Iterable` of `number`s and returns their multiplication as a single `number`. * - * @example + * **When to use** + * + * Use to multiply all numbers in an iterable. + * + * **Example** (Multiplying an iterable) + * * ```ts - * import { multiplyAll } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(multiplyAll([2, 3, 4]), 24) + * assert.deepStrictEqual(Number.multiplyAll([2, 3, 4]), 24) * ``` * + * @see {@link multiply} for multiplying two numbers + * @see {@link ReducerMultiply} for multiplying through APIs that consume a `Reducer` + * * @category math * @since 2.0.0 */ @@ -392,20 +538,26 @@ export const multiplyAll = collection => { return out; }; /** - * Returns the remainder left over when one operand is divided by a second operand. + * Returns the remainder left over when one operand is divided by a second operand, always taking the sign of the dividend. + * + * **When to use** * - * It always takes the sign of the dividend. + * Use to compute a numeric remainder while preserving decimal precision better + * than direct JavaScript `%` for decimal operands. + * + * **Example** (Calculating remainders) * - * @example * ```ts - * import { remainder } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(remainder(2, 2), 0) - * assert.deepStrictEqual(remainder(3, 2), 1) - * assert.deepStrictEqual(remainder(-4, 2), -0) + * assert.deepStrictEqual(Number.remainder(2, 2), 0) + * assert.deepStrictEqual(Number.remainder(3, 2), 1) + * assert.deepStrictEqual(Number.remainder(-4, 2), -0) * ``` * + * @see {@link divide} for quotient calculation with division-by-zero represented as `Option.none` + * * @category math * @since 2.0.0 */ @@ -430,13 +582,18 @@ function decimalCount(n) { /** * Returns the next power of 2 from the given number. * - * @example + * **When to use** + * + * Use to round a number up to the next power of two. + * + * **Example** (Finding the next power of two) + * * ```ts - * import { nextPow2 } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(nextPow2(5), 8) - * assert.deepStrictEqual(nextPow2(17), 32) + * assert.deepStrictEqual(Number.nextPow2(5), 8) + * assert.deepStrictEqual(Number.nextPow2(17), 32) * ``` * * @category math @@ -447,10 +604,14 @@ export const nextPow2 = n => { return Math.max(Math.pow(2, nextPow), 2); }; /** - * Tries to parse a `number` from a `string` using the `Number()` function. + * Parses a `number` from a `string` safely using the `Number()` function. * The following special string values are supported: "NaN", "Infinity", "-Infinity". * - * **Example** + * **When to use** + * + * Use to parse numeric text without throwing on invalid input. + * + * **Example** (Parsing numbers from strings) * * ```ts * import { Number } from "effect" @@ -463,6 +624,8 @@ export const nextPow2 = n => { * Number.parse("not a number") // Option.none() * ``` * + * @see {@link Number} for native constructor coercion + * * @category constructors * @since 2.0.0 */ @@ -485,13 +648,18 @@ export const parse = s => { /** * Returns the number rounded with the given precision. * - * @example + * **When to use** + * + * Use to round a number to a fixed number of decimal places. + * + * **Example** (Rounding with precision) + * * ```ts - * import { round } from "effect/Number" + * import { Number } from "effect" * import * as assert from "node:assert" * - * assert.deepStrictEqual(round(1.1234, 2), 1.12) - * assert.deepStrictEqual(round(1.567, 2), 1.57) + * assert.deepStrictEqual(Number.round(1.1234, 2), 1.12) + * assert.deepStrictEqual(Number.round(1.567, 2), 1.57) * ``` * * @category math @@ -502,14 +670,42 @@ export const round = /*#__PURE__*/dual(2, (self, precision) => { return Math.round(self * factor) / factor; }); /** - * A `Reducer` for combining `number`s using addition. + * Reducer for combining `number`s using addition. + * + * **When to use** + * + * Use to sum many numbers through APIs that consume a `Reducer`. * + * **Details** + * + * The reducer starts from `0`, so `combineAll([])` returns `0`. + * + * @see {@link sumAll} for summing an iterable directly + * @see {@link ReducerMultiply} for multiplying number values + * + * @category math * @since 4.0.0 */ export const ReducerSum = /*#__PURE__*/Reducer.make((a, b) => a + b, 0); /** - * A `Reducer` for combining `number`s using multiplication. + * Reducer for combining `number`s using multiplication. + * + * **When to use** + * + * Use to multiply many numbers through APIs that consume a `Reducer`. + * + * **Details** + * + * The reducer starts from `1`, so reducing an empty collection returns `1`. + * + * **Gotchas** * + * Reducing an iterable short-circuits when it sees `0`, so later elements are + * not consumed. + * + * @see {@link multiplyAll} for multiplying an iterable directly + * + * @category math * @since 4.0.0 */ export const ReducerMultiply = /*#__PURE__*/Reducer.make((a, b) => a * b, 1, collection => { @@ -521,14 +717,48 @@ export const ReducerMultiply = /*#__PURE__*/Reducer.make((a, b) => a * b, 1, col return acc; }); /** - * A `Combiner` that returns the maximum `number`. + * Reducer for reducing `number`s by keeping the maximum value. + * + * **When to use** + * + * Use to keep the largest number through APIs that consume a `Reducer`. + * + * **Details** + * + * The reducer starts from `-Infinity`, so reducing an empty collection returns + * `-Infinity`. + * + * **Gotchas** + * + * `NaN` values propagate through `Math.max`. + * + * @see {@link ReducerMin} for keeping the smallest number + * @see {@link max} for comparing two numbers directly * + * @category math * @since 4.0.0 */ export const ReducerMax = /*#__PURE__*/Reducer.make((a, b) => Math.max(a, b), -Infinity); /** - * A `Combiner` that returns the minimum `number`. + * Reducer for reducing `number`s by keeping the minimum value. + * + * **When to use** + * + * Use to keep the smallest number through APIs that consume a `Reducer`. + * + * **Details** + * + * The reducer starts from `Infinity`, so reducing an empty collection returns + * `Infinity`. * + * **Gotchas** + * + * `NaN` values propagate through `Math.min`. + * + * @see {@link ReducerMax} for keeping the largest number + * @see {@link min} for comparing two numbers directly + * + * @category math * @since 4.0.0 */ export const ReducerMin = /*#__PURE__*/Reducer.make((a, b) => Math.min(a, b), Infinity); diff --git a/.opencode/node_modules/effect/dist/Number.js.map b/.opencode/node_modules/effect/dist/Number.js.map index 6a7cef30a469b3f33380fd64637db6bacd5fb4d3..7b51c7252c2d110e1b6ec941695f4f9fd57ddcf5 100644 --- a/.opencode/node_modules/effect/dist/Number.js.map +++ b/.opencode/node_modules/effect/dist/Number.js.map @@ -1 +1 @@ -{"version":3,"file":"Number.js","names":["Equ","dual","Option","order","predicate","Reducer","Number","globalThis","isNumber","sum","self","that","multiply","subtract","divide","none","some","divideUnsafe","getOrThrowWith","RangeError","increment","n","decrement","Order","Equivalence","isLessThan","isLessThanOrEqualTo","isGreaterThan","isGreaterThanOrEqualTo","between","isBetween","clamp","min","max","sign","sumAll","collection","out","multiplyAll","remainder","divisor","selfDecCount","decimalCount","divisorDecCount","decCount","selfInt","parseInt","toFixed","replace","divisorInt","Math","pow","s","toString","eIndex","indexOf","exp","slice","mantissaDecimals","split","length","nextPow2","nextPow","ceil","log","parse","NaN","Infinity","trim","isNaN","round","precision","factor","ReducerSum","make","a","b","ReducerMultiply","acc","ReducerMax","ReducerMin"],"sources":["../src/Number.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;AAMA,OAAO,KAAKA,GAAG,MAAM,kBAAkB;AACvC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMC,MAAM,GAAGC,UAAU,CAACD,MAAM;AAEvC;;;;;;;;;;;;;;;AAeA,OAAO,MAAME,QAAQ,GAAwCJ,SAAS,CAACI,QAAQ;AAE/E;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,GAAG,gBA+BZR,IAAI,CAAC,CAAC,EAAE,CAACS,IAAY,EAAEC,IAAY,KAAaD,IAAI,GAAGC,IAAI,CAAC;AAEhE;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,QAAQ,gBA+BjBX,IAAI,CAAC,CAAC,EAAE,CAACS,IAAY,EAAEC,IAAY,KAAaD,IAAI,GAAGC,IAAI,CAAC;AAEhE;;;;;;;;;;;;;;AAcA,OAAO,MAAME,QAAQ,gBA+BjBZ,IAAI,CAAC,CAAC,EAAE,CAACS,IAAY,EAAEC,IAAY,KAAaD,IAAI,GAAGC,IAAI,CAAC;AAEhE;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMG,MAAM,gBAqCfb,IAAI,CACN,CAAC,EACD,CAACS,IAAY,EAA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C,UAAU,IAAI;EACtG,IAAI0C,GAAG,GAAG,CAAC;EACX,KAAK,MAAMzD,CAAC,IAAIe,UAAU,EAAE;IAC1B,IAAIf,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACrByD,GAAG,IAAIzD,CAAC;EACV;EACA,OAAOyD,GAAG;AACZ,CAAC,CAAC;AAEF;;;;;AAKA,OAAO,MAAMC,UAAU,gBAA4B1E,OAAO,CAACqE,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAK1B,IAAI,CAACjB,GAAG,CAAC0C,CAAC,EAAEC,CAAC,CAAC,EAAE,CAACT,QAAQ,CAAC;AAEpG;;;;;AAKA,OAAO,MAAMa,UAAU,gBAA4B3E,OAAO,CAACqE,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAK1B,IAAI,CAAClB,GAAG,CAAC2C,CAAC,EAAEC,CAAC,CAAC,EAAET,QAAQ,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Number.js","names":["Equ","dual","Option","order","predicate","Reducer","Number","globalThis","isNumber","sum","self","that","multiply","subtract","divide","none","some","divideUnsafe","getOrThrowWith","RangeError","increment","n","decrement","Order","Equivalence","isLessThan","isLessThanOrEqualTo","isGreaterThan","isGreaterThanOrEqualTo","between","isBetween","clamp","min","max","sign","sumAll","collection","out","multiplyAll","remainder","divisor","selfDecCount","decimalCount","divisorDecCount","decCount","selfInt","parseInt","toFixed","replace","divisorInt","Math","pow","s","toString","eIndex","indexOf","exp","slice","mantissaDecimals","split","length","nextPow2","nextPow","ceil","log","parse","NaN","Infinity","trim","isNaN","round","precision","factor","ReducerSum","make","a","b","ReducerMultiply","acc","ReducerMax","ReducerMin"],"sources":["../src/Number.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;AASA,OAAO,KAAKA,GAAG,MAAM,kBAAkB;AACvC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK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AAC;AAEF;;;;;;;;;;;;;;;;;;;;;;AAsBA,OAAO,MAAMC,UAAU,gBAA4B1E,OAAO,CAACqE,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAK1B,IAAI,CAACjB,GAAG,CAAC0C,CAAC,EAAEC,CAAC,CAAC,EAAE,CAACT,QAAQ,CAAC;AAEpG;;;;;;;;;;;;;;;;;;;;;;AAsBA,OAAO,MAAMa,UAAU,gBAA4B3E,OAAO,CAACqE,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAK1B,IAAI,CAAClB,GAAG,CAAC2C,CAAC,EAAEC,CAAC,CAAC,EAAET,QAAQ,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Optic.d.ts b/.opencode/node_modules/effect/dist/Optic.d.ts index 2d91e480e74cfe762a183c88da6d27581d261fb6..525888e6c3bee2af4eab3431b0508edf4989a74a 100644 --- a/.opencode/node_modules/effect/dist/Optic.d.ts +++ b/.opencode/node_modules/effect/dist/Optic.d.ts @@ -1,113 +1,32 @@ /** - * Composable, immutable accessors for reading and updating nested data - * structures without mutation. - * - * **Mental model** - * - * - **Optic** — a first-class reference to a piece inside a larger structure. - * Compose optics to reach deeply nested values. - * - **Iso** — lossless two-way conversion (`get`/`set`) between `S` and `A`. - * Extends both {@link Lens} and {@link Prism}. - * - **Lens** — focuses on exactly one part of `S`. `get` always succeeds; - * `replace` needs the original `S` to produce the updated whole. - * - **Prism** — focuses on a part that may not be present (e.g. a union - * variant). `getResult` can fail; `set` builds a new `S` from `A` alone. - * - **Optional** — the most general optic: both reading and writing can fail. - * - **Traversal** — focuses on zero or more elements of an array-like - * structure. Technically `Optional>`. - * - **Hierarchy** (strongest → weakest): - * `Iso > Lens | Prism > Optional`. Composing a weaker optic with any other - * produces the weaker kind. - * - * **Common tasks** - * - * - Start a chain → {@link id} (identity iso) - * - Drill into a struct key → `.key("name")` / `.optionalKey("name")` - * - Drill into a key that may not exist → `.at("name")` - * - Narrow a tagged union → `.tag("MyVariant")` - * - Narrow by type guard → `.refine(guard)` - * - Add validation → `.check(Schema.isGreaterThan(0))` - * - Filter out `undefined` → `.notUndefined()` - * - Pick/omit struct keys → `.pick(["a","b"])` / `.omit(["c"])` - * - Traverse array elements → `.forEach(el => el.key("field"))` - * - Build an iso → {@link makeIso} - * - Build a lens → {@link makeLens} - * - Build a prism → {@link makePrism}, {@link fromChecks} - * - Build an optional → {@link makeOptional} - * - Focus into `Option.Some` → {@link some} - * - Focus into `Result.Success`/`Failure` → {@link success}, {@link failure} - * - Convert record ↔ entries → {@link entries} - * - Extract all traversal elements → {@link getAll} - * - * **Gotchas** - * - * - Updates are structurally persistent: only nodes on the path are cloned. - * Unrelated branches keep referential identity. However, **no-op updates - * may still allocate** a new root — do not rely on reference identity to - * detect no-ops. - * - `replace` silently returns the original `S` when the optic cannot focus - * (e.g. wrong tag). Use `replaceResult` for explicit failure. - * - `modify` also returns the original `S` on focus failure — it never throws. - * - `.key()` and `.optionalKey()` do not work on union types (compile error). - * - Only plain objects (`Object.prototype` or `null` prototype) and arrays can - * be cloned. Class instances cause a runtime error on `replace`/`modify`. - * - * **Quickstart** - * - * **Example** (reading and updating nested state) + * Reads and updates focused parts of values without mutating the original + * value. * - * ```ts - * import { Optic } from "effect" - * - * type State = { user: { name: string; age: number } } - * - * const _age = Optic.id().key("user").key("age") - * - * const s1: State = { user: { name: "Alice", age: 30 } } - * - * // Read - * console.log(_age.get(s1)) - * // Output: 30 - * - * // Update immutably - * const s2 = _age.replace(31, s1) - * console.log(s2) - * // Output: { user: { name: "Alice", age: 31 } } - * - * // Modify with a function - * const s3 = _age.modify((n) => n + 1)(s1) - * console.log(s3) - * // Output: { user: { name: "Alice", age: 31 } } - * - * // Referential identity is preserved for unrelated branches - * console.log(s2.user !== s1.user) - * // Output: true (on the path) - * ``` - * - * **See also** - * - * - {@link id} — entry point for optic chains - * - {@link Lens} / {@link Prism} / {@link Optional} — core optic types - * - {@link Traversal} / {@link getAll} — multi-focus optics - * - {@link some} / {@link success} / {@link failure} — built-in prisms + * An optic describes where to look inside a value, such as a record field, a + * union variant, an optional value, or several values in a collection. Different + * optic types describe different kinds of focus: some always find a value, + * some may not, and some can find many. This module includes the optic types, + * constructors, focusing helpers, and operations for replacing, modifying, or + * collecting focused values. * * @since 4.0.0 - * @module */ import * as Option from "./Option.ts"; import * as Result from "./Result.ts"; import type * as Schema from "./Schema.ts"; -import * as AST from "./SchemaAST.ts"; +import * as SchemaAST from "./SchemaAST.ts"; import type { IsUnion } from "./Types.ts"; /** * A lossless, reversible conversion between types `S` and `A`. * - * When to use: - * - You have a pair of functions that convert back and forth without losing + * **When to use** + * + * Use when you have a pair of functions that convert back and forth without losing * information (e.g. `Record ↔ entries`, `Celsius ↔ Fahrenheit`). * - You want the strongest optic that can be composed with any other. * - * Behavior: + * **Details** + * * - `get(s)` always succeeds and returns an `A`. * - `set(a)` always succeeds and returns an `S`. * - `get(set(a)) === a` and `set(get(s))` equals `s` (round-trip laws). @@ -142,13 +61,14 @@ export interface Iso extends Lens, Prism { /** * Creates an {@link Iso} from a pair of conversion functions. * - * When to use: - * - You have two pure functions that form a lossless round-trip between `S` - * and `A`. + * **When to use** + * + * Use when you have two pure conversion functions that preserve all information + * between `S` and `A`. * - * Behavior: - * - Does not mutate inputs. - * - The returned optic can be composed with any other optic. + * **Details** + * + * The returned optic can be composed with any other optic. * * **Example** (wrapping/unwrapping a branded type) * @@ -171,19 +91,20 @@ export interface Iso extends Lens, Prism { * @see {@link Iso} — the type this function returns * @see {@link id} — identity iso (no conversion) * - * @category Constructors + * @category constructors * @since 4.0.0 */ export declare function makeIso(get: (s: S) => A, set: (a: A) => S): Iso; /** * Focuses on exactly one part `A` inside a whole `S`. * - * When to use: - * - You always have a value to read (the part exists unconditionally). - * - You need the original `S` to produce the updated whole (unlike - * {@link Iso}). + * **When to use** + * + * Use when you always have a value to read and need the original `S` to produce + * the updated whole, unlike `Iso`. + * + * **Details** * - * Behavior: * - `get(s)` always succeeds and returns `A`. * - `replace(a, s)` returns a new `S` with the focused part replaced. * - Extends {@link Optional}. @@ -216,12 +137,13 @@ export interface Lens extends Optional { /** * Creates a {@link Lens} from a getter and a replacer. * - * When to use: - * - You can always extract `A` from `S` and produce a new `S` by + * **When to use** + * + * Use when you can always extract `A` from `S` and produce a new `S` by * substituting a new `A`. * - * Behavior: - * - Does not mutate inputs. + * **Details** + * * - `replace(a, s)` should return a structurally new `S` with `a` in place * of the old focus. * @@ -245,7 +167,7 @@ export interface Lens extends Optional { * @see {@link Lens} — the type this function returns * @see {@link makeIso} — when no original `S` is needed for `set` * - * @category Constructors + * @category constructors * @since 4.0.0 */ export declare function makeLens(get: (s: S) => A, replace: (a: A, s: S) => S): Lens; @@ -253,12 +175,14 @@ export declare function makeLens(get: (s: S) => A, replace: (a: A, s: S) = * Focuses on a part `A` of `S` that may not be present (e.g. a union * variant or a validated subset). * - * When to use: - * - The focus is conditional — reading can fail (wrong variant, failed + * **When to use** + * + * Use when the focus is conditional — reading can fail (wrong variant, failed * validation). * - Building a new `S` from `A` does **not** require the original `S`. * - * Behavior: + * **Details** + * * - `getResult(s)` returns `Result.Success` when the focus matches, or * `Result.Failure` with an error message. * - `set(a)` always succeeds and returns a new `S`. @@ -297,12 +221,13 @@ export interface Prism extends Optional { /** * Creates a {@link Prism} from a fallible getter and an infallible setter. * - * When to use: - * - Reading can fail (the part may not exist in `S`), but building `S` + * **When to use** + * + * Use when reading can fail (the part may not exist in `S`), but building `S` * from `A` always succeeds. * - * Behavior: - * - Does not mutate inputs. + * **Details** + * * - `getResult` should return `Result.fail(message)` on mismatch. * * **Example** (parsing a string to a number) @@ -328,23 +253,24 @@ export interface Prism extends Optional { * @see {@link Prism} — the type this function returns * @see {@link fromChecks} — build from `Schema` checks instead * - * @category Constructors + * @category constructors * @since 4.0.0 */ export declare function makePrism(getResult: (s: S) => Result.Result, set: (a: A) => S): Prism; /** * Creates a {@link Prism} from one or more `Schema` validation checks. * - * When to use: - * - You want to narrow `T` to the subset that passes certain validation + * **When to use** + * + * Use when you want to narrow `T` to the subset that passes certain validation * rules (e.g. positive integer). * - You already have `Schema.isGreaterThan`, `Schema.isInt`, etc. * - * Behavior: + * **Details** + * * - `getResult` runs all checks; fails with a combined error message when * any check fails. * - `set` is identity — the value passes through unchanged. - * - Does not mutate inputs. * * **Example** (positive integer prism) * @@ -366,10 +292,10 @@ export declare function makePrism(getResult: (s: S) => Result.Result(...checks: readonly [AST.Check, ...Array>]): Prism; +export declare function fromChecks(...checks: readonly [SchemaAST.Check, ...Array>]): Prism; type Node = IdentityNode | IsoNode | LensNode | PrismNode | OptionalNode | PathNode | CheckNode | CompositionNode; declare class IdentityNode { readonly _tag = "IdentityNode"; @@ -410,20 +336,22 @@ declare class PathNode { } declare class CheckNode { readonly _tag = "CheckNode"; - readonly checks: readonly [AST.Check, ...Array>]; - constructor(checks: readonly [AST.Check, ...Array>]); + readonly checks: readonly [SchemaAST.Check, ...Array>]; + constructor(checks: readonly [SchemaAST.Check, ...Array>]); } type ForbidUnion = IsUnion extends true ? [Message] : []; /** * The most general optic — both reading and writing can fail. * - * When to use: - * - The focus may not exist in `S` **and** writing a new `A` back may also - * fail (e.g. the source no longer matches the expected shape). - * - As the base type: every optic ({@link Iso}, {@link Lens}, {@link Prism}, - * {@link Traversal}) extends `Optional`. + * **When to use** + * + * Use when the focus may not exist in `S` and writing a new `A` back may also + * fail, for example when the source no longer matches the expected shape. This + * is the base type extended by {@link Iso}, {@link Lens}, {@link Prism}, and + * {@link Traversal}. + * + * **Details** * - * Behavior: * - `getResult(s)` returns `Result.Success` or `Result.Failure`. * - `replaceResult(a, s)` returns `Result.Success` or * `Result.Failure`. @@ -460,9 +388,8 @@ type ForbidUnion = IsUnion extends true ? [Message export interface Optional { readonly node: Node; /** - * Attempts to read the focus `A` from the whole `S`. - * - * Returns `Result.Success` when the focus exists, or + * Attempts to read the focus `A` from the whole `S`. Returns + * `Result.Success` when the focus exists, or * `Result.Failure` with a descriptive error otherwise. */ readonly getResult: (s: S) => Result.Result; @@ -518,6 +445,8 @@ export interface Optional { /** * Focuses on a property of the current struct/tuple focus. * + * **Details** + * * - On a {@link Lens}, returns a Lens. * - On an {@link Optional}, returns an Optional. * - Does **not** work on union types (compile error). @@ -540,6 +469,8 @@ export interface Optional { * Focuses on a key where setting `undefined` **removes** the key from the * struct (or splices the element from an array/tuple). * + * **Details** + * * - The focus type becomes `A[Key] | undefined`. * - Does **not** work on union types (compile error). * @@ -564,6 +495,8 @@ export interface Optional { * Adds one or more `Schema` validation checks to the optic chain. * `getResult` fails when any check fails; `set` passes through unchanged. * + * **Details** + * * - On a {@link Prism}, returns a Prism. * - On an {@link Optional}, returns an Optional. * @@ -583,11 +516,13 @@ export interface Optional { * * @see {@link fromChecks} — standalone prism from checks */ - check(this: Prism, ...checks: readonly [AST.Check, ...Array>]): Prism; - check(this: Optional, ...checks: readonly [AST.Check, ...Array>]): Optional; + check(this: Prism, ...checks: readonly [SchemaAST.Check, ...Array>]): Prism; + check(this: Optional, ...checks: readonly [SchemaAST.Check, ...Array>]): Optional; /** * Narrows the focus to a subtype `B` using a type guard. * + * **Details** + * * - On a {@link Prism}, returns a Prism. * - On an {@link Optional}, returns an Optional. * - Pass optional `annotations` to customize the error message. @@ -617,6 +552,8 @@ export interface Optional { * Narrows the focus to the variant of a tagged union with the given * `_tag` value. * + * **Details** + * * - On a {@link Prism}, returns a Prism. * - On an {@link Optional}, returns an Optional. * - Shorthand for `.refine(s => s._tag === tag)`. @@ -642,12 +579,12 @@ export interface Optional { * @see `.refine()` — for arbitrary type guards */ tag(this: Prism, tag: Tag): Prism>; tag(this: Optional, tag: Tag): Optional>; @@ -655,6 +592,8 @@ export interface Optional { * Focuses on a key only if it exists (`Object.hasOwn`). Both * `getResult` and `replaceResult` fail when the key is absent. * + * **Details** + * * Unlike `.key()`, which always succeeds on the read side, `.at()` is * useful for Records or arrays where the key/index may not be present. * @@ -682,6 +621,8 @@ export interface Optional { /** * Focuses on a subset of keys of the current struct focus. * + * **Details** + * * - On a {@link Lens}, returns a Lens. * - On an {@link Optional}, returns an Optional. * - Does **not** work on union types (compile error). @@ -706,6 +647,8 @@ export interface Optional { /** * Focuses on all keys **except** the specified ones. * + * **Details** + * * - On a {@link Lens}, returns a Lens. * - On an {@link Optional}, returns an Optional. * - Does **not** work on union types (compile error). @@ -725,13 +668,12 @@ export interface Optional { * * @see `.pick()` — the inverse operation * - * @since 1.0.0 + * @since 4.0.0 */ omit>(this: Lens, keys: Keys, ..._err: ForbidUnion): Lens>; omit>(this: Optional, keys: Keys, ..._err: ForbidUnion): Optional>; /** * Filters out `undefined` from the focus, producing a {@link Prism}. - * * `getResult` fails when the focus is `undefined`. * * **Example** (filtering undefined) @@ -755,12 +697,12 @@ export interface Optional { /** * Focuses **all elements** of an array-like focus and optionally narrows * to a subset using an element-level optic. - * * Available only on {@link Traversal} (i.e. when `A` is * `ReadonlyArray`). Returns a new Traversal focused on the * selected elements. * - * Behavior: + * **Details** + * * - **getResult** collects the values focused by `f(id())` for each * element. Non-focusable elements are skipped. * - **replaceResult** expects exactly as many values as were collected by @@ -797,6 +739,8 @@ export interface Optional { /** * Applies a function to **every** element focused by the traversal. * + * **Details** + * * Available only on {@link Traversal}. Returns a function `(s: S) => S`. * If the traversal cannot focus, the original `s` is returned unchanged. * @@ -828,11 +772,13 @@ export interface Optional { /** * Creates an {@link Optional} from a fallible getter and a fallible setter. * - * When to use: - * - Both reading and writing can fail. + * **When to use** + * + * Use when you need an optic for a focus that may be missing on read and may + * reject updates on write. + * + * **Details** * - * Behavior: - * - Does not mutate inputs. * - `getResult` should return `Result.fail(message)` on mismatch. * - `set` should return `Result.fail(message)` when the update cannot be * applied. @@ -862,18 +808,20 @@ export interface Optional { * @see {@link makeLens} — when reading always succeeds * @see {@link makePrism} — when writing always succeeds * - * @category Constructors + * @category constructors * @since 4.0.0 */ export declare function makeOptional(getResult: (s: S) => Result.Result, set: (a: A, s: S) => Result.Result): Optional; /** * An optic that focuses on **zero or more** elements of type `A` inside `S`. * - * When to use: - * - You want to read/update multiple elements at once (e.g. all items in + * **When to use** + * + * Use when you want to read/update multiple elements at once (e.g. all items in * an array, or a filtered subset). * - * Behavior: + * **Details** + * * - Technically `Optional>` — the focused value is an * array of all matched elements. * - Use `.forEach()` to add per-element sub-optics (filtering, drilling @@ -910,14 +858,15 @@ export interface Traversal extends Optional` for further + * **When to use** + * + * Use when you need the focused values as a simple `Array` for further * processing. * - * Behavior: + * **Details** + * * - Returns an empty array when the traversal cannot focus. * - Always returns a fresh array (safe to mutate). - * - Does not mutate the source. * * **Example** (collecting positive numbers) * @@ -946,13 +895,14 @@ export interface Traversal extends Optional(traversal: Traversal): (s: S) => Array; /** - * The identity {@link Iso}. Focuses on the whole value unchanged. + * Iso that focuses on the whole value unchanged. + * + * **When to use** * - * When to use: - * - As the starting point of an optic chain: `Optic.id().key("x")...` - * - Anywhere an `Iso` is needed. + * Use when you need to start an optic chain with a focus on the whole value. + * + * **Details** * - * Behavior: * - `get(s)` returns `s`. * - `set(a)` returns `a`. * - Singleton — every call returns the same instance. @@ -977,14 +927,16 @@ export declare function getAll(traversal: Traversal): (s: S) => Arra */ export declare function id(): Iso; /** - * An {@link Iso} that converts a `Record` to an array of + * Iso that converts a `Record` to an array of * `[key, value]` entries and back. * - * When to use: - * - You want to traverse or manipulate record entries as an array (e.g. + * **When to use** + * + * Use when you want to traverse or manipulate record entries as an array (e.g. * with `.forEach()`). * - * Behavior: + * **Details** + * * - `get` uses `Object.entries`. * - `set` uses `Object.fromEntries`. * - Round-trip is lossless for `Record`. @@ -1011,13 +963,15 @@ export declare function id(): Iso; */ export declare function entries(): Iso, ReadonlyArray>; /** - * A {@link Prism} that focuses on the value inside `Option.Some`. + * Prism that focuses on the value inside `Option.Some`. + * + * **When to use** * - * When to use: - * - You have an `Option` and want to read/update the inner value only + * Use when you have an `Option` and want to read/update the inner value only * when it is `Some`. * - * Behavior: + * **Details** + * * - `getResult` fails with an error message when the option is `None`. * - `set(a)` wraps `a` in `Option.some(a)`. * @@ -1046,12 +1000,14 @@ export declare function entries(): Iso, ReadonlyArray(): Prism, A>; /** - * A {@link Prism} that focuses on `Option.None`, exposing `undefined`. + * Prism that focuses on `Option.None`, exposing `undefined`. + * + * **When to use** * - * When to use: - * - You want to match or construct `None` values within an optic chain. + * Use when you want to match or construct `None` values within an optic chain. + * + * **Details** * - * Behavior: * - `getResult` succeeds with `undefined` when the option is `None`. * - `getResult` fails when the option is `Some`. * - `set(undefined)` produces `Option.none()`. @@ -1078,13 +1034,15 @@ export declare function some(): Prism, A>; */ export declare function none(): Prism, undefined>; /** - * A {@link Prism} that focuses on the success value of a `Result`. + * Prism that focuses on the success value of a `Result`. + * + * **When to use** * - * When to use: - * - You have a `Result` and want to read/update `A` only when it + * Use when you have a `Result` and want to read/update `A` only when it * is a `Success`. * - * Behavior: + * **Details** + * * - `getResult` fails when the result is a `Failure`. * - `set(a)` produces `Result.succeed(a)`. * @@ -1110,13 +1068,15 @@ export declare function none(): Prism, undefined>; */ export declare function success(): Prism, A>; /** - * A {@link Prism} that focuses on the failure value of a `Result`. + * Prism that focuses on the failure value of a `Result`. + * + * **When to use** * - * When to use: - * - You have a `Result` and want to read/update `E` only when it + * Use when you have a `Result` and want to read/update `E` only when it * is a `Failure`. * - * Behavior: + * **Details** + * * - `getResult` fails when the result is a `Success`. * - `set(e)` produces `Result.fail(e)`. * diff --git a/.opencode/node_modules/effect/dist/Optic.d.ts.map b/.opencode/node_modules/effect/dist/Optic.d.ts.map index 0e94083e92e10a58b52de1603e27e2fd3287ba72..ba0153407b8488d1ec71151928e312d47d61a0fc 100644 --- a/.opencode/node_modules/effect/dist/Optic.d.ts.map +++ b/.opencode/node_modules/effect/dist/Optic.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Optic.d.ts","sourceRoot":"","sources":["../src/Optic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAU7D"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Optic.js b/.opencode/node_modules/effect/dist/Optic.js index 9d2ac9fb34ae3e046699e16f878f08d00c333d1e..9c66a7d9d12cbdbbfbac1d634310aadbb6450da7 100644 --- a/.opencode/node_modules/effect/dist/Optic.js +++ b/.opencode/node_modules/effect/dist/Optic.js @@ -1,116 +1,34 @@ /** - * Composable, immutable accessors for reading and updating nested data - * structures without mutation. - * - * **Mental model** - * - * - **Optic** — a first-class reference to a piece inside a larger structure. - * Compose optics to reach deeply nested values. - * - **Iso** — lossless two-way conversion (`get`/`set`) between `S` and `A`. - * Extends both {@link Lens} and {@link Prism}. - * - **Lens** — focuses on exactly one part of `S`. `get` always succeeds; - * `replace` needs the original `S` to produce the updated whole. - * - **Prism** — focuses on a part that may not be present (e.g. a union - * variant). `getResult` can fail; `set` builds a new `S` from `A` alone. - * - **Optional** — the most general optic: both reading and writing can fail. - * - **Traversal** — focuses on zero or more elements of an array-like - * structure. Technically `Optional>`. - * - **Hierarchy** (strongest → weakest): - * `Iso > Lens | Prism > Optional`. Composing a weaker optic with any other - * produces the weaker kind. - * - * **Common tasks** - * - * - Start a chain → {@link id} (identity iso) - * - Drill into a struct key → `.key("name")` / `.optionalKey("name")` - * - Drill into a key that may not exist → `.at("name")` - * - Narrow a tagged union → `.tag("MyVariant")` - * - Narrow by type guard → `.refine(guard)` - * - Add validation → `.check(Schema.isGreaterThan(0))` - * - Filter out `undefined` → `.notUndefined()` - * - Pick/omit struct keys → `.pick(["a","b"])` / `.omit(["c"])` - * - Traverse array elements → `.forEach(el => el.key("field"))` - * - Build an iso → {@link makeIso} - * - Build a lens → {@link makeLens} - * - Build a prism → {@link makePrism}, {@link fromChecks} - * - Build an optional → {@link makeOptional} - * - Focus into `Option.Some` → {@link some} - * - Focus into `Result.Success`/`Failure` → {@link success}, {@link failure} - * - Convert record ↔ entries → {@link entries} - * - Extract all traversal elements → {@link getAll} - * - * **Gotchas** - * - * - Updates are structurally persistent: only nodes on the path are cloned. - * Unrelated branches keep referential identity. However, **no-op updates - * may still allocate** a new root — do not rely on reference identity to - * detect no-ops. - * - `replace` silently returns the original `S` when the optic cannot focus - * (e.g. wrong tag). Use `replaceResult` for explicit failure. - * - `modify` also returns the original `S` on focus failure — it never throws. - * - `.key()` and `.optionalKey()` do not work on union types (compile error). - * - Only plain objects (`Object.prototype` or `null` prototype) and arrays can - * be cloned. Class instances cause a runtime error on `replace`/`modify`. - * - * **Quickstart** - * - * **Example** (reading and updating nested state) + * Reads and updates focused parts of values without mutating the original + * value. * - * ```ts - * import { Optic } from "effect" - * - * type State = { user: { name: string; age: number } } - * - * const _age = Optic.id().key("user").key("age") - * - * const s1: State = { user: { name: "Alice", age: 30 } } - * - * // Read - * console.log(_age.get(s1)) - * // Output: 30 - * - * // Update immutably - * const s2 = _age.replace(31, s1) - * console.log(s2) - * // Output: { user: { name: "Alice", age: 31 } } - * - * // Modify with a function - * const s3 = _age.modify((n) => n + 1)(s1) - * console.log(s3) - * // Output: { user: { name: "Alice", age: 31 } } - * - * // Referential identity is preserved for unrelated branches - * console.log(s2.user !== s1.user) - * // Output: true (on the path) - * ``` - * - * **See also** - * - * - {@link id} — entry point for optic chains - * - {@link Lens} / {@link Prism} / {@link Optional} — core optic types - * - {@link Traversal} / {@link getAll} — multi-focus optics - * - {@link some} / {@link success} / {@link failure} — built-in prisms + * An optic describes where to look inside a value, such as a record field, a + * union variant, an optional value, or several values in a collection. Different + * optic types describe different kinds of focus: some always find a value, + * some may not, and some can find many. This module includes the optic types, + * constructors, focusing helpers, and operations for replacing, modifying, or + * collecting focused values. * * @since 4.0.0 - * @module */ import { format } from "./Formatter.js"; import { identity, memoize } from "./Function.js"; import * as Option from "./Option.js"; import * as Predicate from "./Predicate.js"; import * as Result from "./Result.js"; -import * as AST from "./SchemaAST.js"; +import * as SchemaAST from "./SchemaAST.js"; import * as Struct from "./Struct.js"; /** * Creates an {@link Iso} from a pair of conversion functions. * - * When to use: - * - You have two pure functions that form a lossless round-trip between `S` - * and `A`. + * **When to use** + * + * Use when you have two pure conversion functions that preserve all information + * between `S` and `A`. + * + * **Details** * - * Behavior: - * - Does not mutate inputs. - * - The returned optic can be composed with any other optic. + * The returned optic can be composed with any other optic. * * **Example** (wrapping/unwrapping a branded type) * @@ -133,7 +51,7 @@ import * as Struct from "./Struct.js"; * @see {@link Iso} — the type this function returns * @see {@link id} — identity iso (no conversion) * - * @category Constructors + * @category constructors * @since 4.0.0 */ export function makeIso(get, set) { @@ -142,12 +60,13 @@ export function makeIso(get, set) { /** * Creates a {@link Lens} from a getter and a replacer. * - * When to use: - * - You can always extract `A` from `S` and produce a new `S` by + * **When to use** + * + * Use when you can always extract `A` from `S` and produce a new `S` by * substituting a new `A`. * - * Behavior: - * - Does not mutate inputs. + * **Details** + * * - `replace(a, s)` should return a structurally new `S` with `a` in place * of the old focus. * @@ -171,7 +90,7 @@ export function makeIso(get, set) { * @see {@link Lens} — the type this function returns * @see {@link makeIso} — when no original `S` is needed for `set` * - * @category Constructors + * @category constructors * @since 4.0.0 */ export function makeLens(get, replace) { @@ -180,12 +99,13 @@ export function makeLens(get, replace) { /** * Creates a {@link Prism} from a fallible getter and an infallible setter. * - * When to use: - * - Reading can fail (the part may not exist in `S`), but building `S` + * **When to use** + * + * Use when reading can fail (the part may not exist in `S`), but building `S` * from `A` always succeeds. * - * Behavior: - * - Does not mutate inputs. + * **Details** + * * - `getResult` should return `Result.fail(message)` on mismatch. * * **Example** (parsing a string to a number) @@ -211,7 +131,7 @@ export function makeLens(get, replace) { * @see {@link Prism} — the type this function returns * @see {@link fromChecks} — build from `Schema` checks instead * - * @category Constructors + * @category constructors * @since 4.0.0 */ export function makePrism(getResult, set) { @@ -220,16 +140,17 @@ export function makePrism(getResult, set) { /** * Creates a {@link Prism} from one or more `Schema` validation checks. * - * When to use: - * - You want to narrow `T` to the subset that passes certain validation + * **When to use** + * + * Use when you want to narrow `T` to the subset that passes certain validation * rules (e.g. positive integer). * - You already have `Schema.isGreaterThan`, `Schema.isInt`, etc. * - * Behavior: + * **Details** + * * - `getResult` runs all checks; fails with a combined error message when * any check fails. * - `set` is identity — the value passes through unchanged. - * - Does not mutate inputs. * * **Example** (positive integer prism) * @@ -251,7 +172,7 @@ export function makePrism(getResult, set) { * @see {@link makePrism} — constructor with custom getter/setter * @see {@link Prism} — the type this function returns * - * @category Constructors + * @category constructors * @since 4.0.0 */ export function fromChecks(...checks) { @@ -362,11 +283,13 @@ function compose(a, b) { /** * Creates an {@link Optional} from a fallible getter and a fallible setter. * - * When to use: - * - Both reading and writing can fail. + * **When to use** + * + * Use when you need an optic for a focus that may be missing on read and may + * reject updates on write. + * + * **Details** * - * Behavior: - * - Does not mutate inputs. * - `getResult` should return `Result.fail(message)` on mismatch. * - `set` should return `Result.fail(message)` when the update cannot be * applied. @@ -396,7 +319,7 @@ function compose(a, b) { * @see {@link makeLens} — when reading always succeeds * @see {@link makePrism} — when writing always succeeds * - * @category Constructors + * @category constructors * @since 4.0.0 */ export function makeOptional(getResult, set) { @@ -442,7 +365,7 @@ class OptionalImpl { return make(compose(this.node, new CheckNode(checks))); } refine(refinement, annotations) { - return make(compose(this.node, new CheckNode([AST.makeFilterByGuard(refinement, annotations)]))); + return make(compose(this.node, new CheckNode([SchemaAST.makeFilterByGuard(refinement, annotations)]))); } tag(tag) { return make(compose(this.node, new PrismNode(s => s._tag === tag ? Result.succeed(s) : Result.fail(`Expected ${format(tag)} tag, got ${format(s._tag)}`), identity))); @@ -629,7 +552,7 @@ const recur = /*#__PURE__*/memoize(node => { case "CheckNode": return { _tag: "PrismNode", - get: s => Result.mapError(AST.runChecks(node.checks, s), String), + get: s => Result.mapError(SchemaAST.runChecks(node.checks, s), String), set: identity }; case "CompositionNode": @@ -716,14 +639,15 @@ function getCompositionTag(a, b) { * Returns a function that extracts all elements focused by a * {@link Traversal} as a plain mutable array. * - * When to use: - * - You need the focused values as a simple `Array` for further + * **When to use** + * + * Use when you need the focused values as a simple `Array` for further * processing. * - * Behavior: + * **Details** + * * - Returns an empty array when the traversal cannot focus. * - Always returns a fresh array (safe to mutate). - * - Does not mutate the source. * * **Example** (collecting positive numbers) * @@ -761,13 +685,14 @@ export function getAll(traversal) { // --------------------------------------------- const identityIso = /*#__PURE__*/make(identityNode); /** - * The identity {@link Iso}. Focuses on the whole value unchanged. + * Iso that focuses on the whole value unchanged. + * + * **When to use** * - * When to use: - * - As the starting point of an optic chain: `Optic.id().key("x")...` - * - Anywhere an `Iso` is needed. + * Use when you need to start an optic chain with a focus on the whole value. + * + * **Details** * - * Behavior: * - `get(s)` returns `s`. * - `set(a)` returns `a`. * - Singleton — every call returns the same instance. @@ -794,14 +719,16 @@ export function id() { return identityIso; } /** - * An {@link Iso} that converts a `Record` to an array of + * Iso that converts a `Record` to an array of * `[key, value]` entries and back. * - * When to use: - * - You want to traverse or manipulate record entries as an array (e.g. + * **When to use** + * + * Use when you want to traverse or manipulate record entries as an array (e.g. * with `.forEach()`). * - * Behavior: + * **Details** + * * - `get` uses `Object.entries`. * - `set` uses `Object.fromEntries`. * - Round-trip is lossless for `Record`. @@ -830,13 +757,15 @@ export function entries() { return make(new IsoNode(Object.entries, Object.fromEntries)); } /** - * A {@link Prism} that focuses on the value inside `Option.Some`. + * Prism that focuses on the value inside `Option.Some`. + * + * **When to use** * - * When to use: - * - You have an `Option` and want to read/update the inner value only + * Use when you have an `Option` and want to read/update the inner value only * when it is `Some`. * - * Behavior: + * **Details** + * * - `getResult` fails with an error message when the option is `None`. * - `set(a)` wraps `a` in `Option.some(a)`. * @@ -873,12 +802,14 @@ export function some() { }), Option.some); } /** - * A {@link Prism} that focuses on `Option.None`, exposing `undefined`. + * Prism that focuses on `Option.None`, exposing `undefined`. + * + * **When to use** + * + * Use when you want to match or construct `None` values within an optic chain. * - * When to use: - * - You want to match or construct `None` values within an optic chain. + * **Details** * - * Behavior: * - `getResult` succeeds with `undefined` when the option is `None`. * - `getResult` fails when the option is `Some`. * - `set(undefined)` produces `Option.none()`. @@ -913,13 +844,15 @@ export function none() { }), () => Option.none()); } /** - * A {@link Prism} that focuses on the success value of a `Result`. + * Prism that focuses on the success value of a `Result`. * - * When to use: - * - You have a `Result` and want to read/update `A` only when it + * **When to use** + * + * Use when you have a `Result` and want to read/update `A` only when it * is a `Success`. * - * Behavior: + * **Details** + * * - `getResult` fails when the result is a `Failure`. * - `set(a)` produces `Result.succeed(a)`. * @@ -953,13 +886,15 @@ export function success() { }), Result.succeed); } /** - * A {@link Prism} that focuses on the failure value of a `Result`. + * Prism that focuses on the failure value of a `Result`. * - * When to use: - * - You have a `Result` and want to read/update `E` only when it + * **When to use** + * + * Use when you have a `Result` and want to read/update `E` only when it * is a `Failure`. * - * Behavior: + * **Details** + * * - `getResult` fails when the result is a `Success`. * - `set(e)` produces `Result.fail(e)`. * @@ -993,6 +928,6 @@ export function failure() { }), Result.fail); } function runRefinement(refinement, annotations) { - return e => AST.runChecks([AST.makeFilterByGuard(refinement, annotations)], e); + return e => SchemaAST.runChecks([SchemaAST.makeFilterByGuard(refinement, annotations)], e); } //# sourceMappingURL=Optic.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Optic.js.map b/.opencode/node_modules/effect/dist/Optic.js.map index 11f39cc21ada9b0c17c76c48fe3c2b8376800e03..e7750f9bcdf2d2ddb3de0b3a091862e3013d82bf 100644 --- a/.opencode/node_modules/effect/dist/Optic.js.map +++ b/.opencode/node_modules/effect/dist/Optic.js.map @@ -1 +1 @@ -{"version":3,"file":"Optic.js","names":["format","identity","memoize","Option","Predicate","Result","AST","Struct","makeIso","get","set","make","IsoNode","makeLens","replace","LensNode","makePrism","getResult","PrismNode","fromChecks","checks","CheckNode","IdentityNode","_tag","identityNode","CompositionNode","nodes","constructor","OptionalNode","PathNode","path","pushNormalized","acc","node","last","length","push","collect","i","compose","a","b","makeOptional","OptionalImpl","replaceResult","s","getOrElse","modify","f","flatMap","that","key","optionalKey","copy","cloneShallow","undefined","Array","isArray","splice","check","refine","refinement","annotations","makeFilterByGuard","tag","succeed","fail","at","_rest","err","Object","hasOwn","pick","keys","p","omit","o","notUndefined","isNotUndefined","expected","forEach","inner","id","map","as","bs","r","isSuccess","success","idxs","out","slice","k","isFailure","modifyAll","IsoImpl","_","LensImpl","PrismImpl","op","recur","pojo","proto","getPrototypeOf","prototype","Error","n","current","finalKey","mapError","runChecks","String","ops","reduce","getCompositionTag","result","hasFailingGet","source","len","ss","hasSet","getAll","traversal","match","onFailure","onSuccess","identityIso","entries","fromEntries","some","run","runRefinement","isSome","mapBoth","value","none","isNone","failure","e"],"sources":["../src/Optic.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGA,SAASA,MAAM,QAAQ,gBAAgB;AACvC,SAASC,QAAQ,EAAEC,OAAO,QAAQ,eAAe;AACjD,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,OAAO,KAAKC,GAAG,MAAM,gBAAgB;AAErC,OAAO,KAAKC,MAAM,MAAM,aAAa;AA2CrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAM,SAAUC,OAAOA,CAAOC,GAAgB,EAAEC,GAAgB;EAC9D,OAAOC,IAAI,CAAC,IAAIC,OAAO,CAACH,GAAG,EAAEC,GAAG,CAAC,CAAC;AACpC;AAyCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAM,SAAUG,QAAQA,CAAOJ,GAAgB,EAAEK,OAA0B;EACzE,OAAOH,IAAI,CAAC,IAAII,QAAQ,CAACN,GAAG,EAAEK,OAAO,CAAC,CAAC;AACzC;A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AAM;IACjBc,SAAS,EAAGhF,CAAC,IAAKA,CAAC,CAAC2C;GACrB,CAAC,EACJnF,MAAM,CAAC4D,OAAO,CACf;AACH;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAM,SAAUwE,OAAOA,CAAA;EACrB,MAAMP,GAAG,GAAGC,aAAa,CAAC9H,MAAM,CAACwF,SAAS,EAAE;IAAEd,QAAQ,EAAE;EAAwB,CAAE,CAAC;EACnF,OAAO/D,SAAS,CACb6B,CAAC,IACAxC,MAAM,CAACgI,OAAO,CAACH,GAAG,CAACrF,CAAC,CAAC,EAAE;IACrB+E,SAAS,EAAEb,MAAM;IACjBc,SAAS,EAAGhF,CAAC,IAAKA,CAAC,CAAC4F;GACrB,CAAC,EACJpI,MAAM,CAAC6D,IAAI,CACZ;AACH;AAEA,SAASiE,aAAaA,CACpBtE,UAA4B,EAC5BC,WAAuC;EAEvC,OAAQ4E,CAAC,IAAKpI,GAAG,CAACwG,SAAS,CAAC,CAACxG,GAAG,CAACyD,iBAAiB,CAACF,UAAU,EAAEC,WAAW,CAAC,CAAC,EAAE4E,CAAC,CAAQ;AACzF","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Optic.js","names":["format","identity","memoize","Option","Predicate","Result","SchemaAST","Struct","makeIso","get","set","make","IsoNode","makeLens","replace","LensNode","makePrism","getResult","PrismNode","fromChecks","checks","CheckNode","IdentityNode","_tag","identityNode","CompositionNode","nodes","constructor","OptionalNode","PathNode","path","pushNormalized","acc","node","last","length","push","collect","i","compose","a","b","makeOptional","OptionalImpl","replaceResult","s","getOrElse","modify","f","flatMap","that","key","optionalKey","copy","cloneShallow","undefined","Array","isArray","splice","check","refine","refinement","annotations","makeFilterByGuard","tag","succeed","fail","at","_rest","err","Object","hasOwn","pick","keys","p","omit","o","notUndefined","isNotUndefined","expected","forEach","inner","id","map","as","bs","r","isSuccess","success","idxs","out","slice","k","isFailure","modifyAll","IsoImpl","_","LensImpl","PrismImpl","op","recur","pojo","proto","getPrototypeOf","prototype","Error","n","current","finalKey","mapError","runChecks","String","ops","reduce","getCompositionTag","result","hasFailingGet","source","len","ss","hasSet","getAll","traversal","match","onFailure","onSuccess","identityIso","entries","fromEntries","some","run","runRefinement","isSome","mapBoth","value","none","isNone","failure","e"],"sources":["../src/Optic.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;AAcA,SAASA,MAAM,QAAQ,gBAAgB;AACvC,SAASC,QAAQ,EAAEC,OAAO,QAAQ,eAAe;AACjD,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C,OAAO,KAAKC,MAAM,MAAM,aAAa;AA6CrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,OAAM,SAAUC,OAAOA,CAAOC,GAAgB,EAAEC,GAAgB;EAC9D,OAAOC,IAAI,CAAC,IAAIC,OAAO,CAACH,GAAG,EAAEC,GAAG,CAAC,CAAC;AACpC;AA0CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,OAAM,SAAUG,QAAQA,CAAOJ,GAAgB,EAAEK,OAA0B;EACzE,OAAOH,IAAI,CAAC,IAAII,QAAQ,CAACN,GAAG,EAAEK,OAAO,CAAC,CAAC;AACzC;AAkDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,OAAM,SAAUE,SAASA,CAAOC,SAA6C,EAAEP,GAAgB;EAC7F,OAAOC,IAAI,CAAC,IAAIO,SAAS,CAACD,SAAS,EAAEP,GAAG,CAAC,CAAC;AAC5C;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,OAAM,SAAUS,UAAUA,CAAI,GAAGC,MAAmE;EAClG,OAAOT,IAAI,CAAC,IAAIU,SAAS,CAACD,MAAM,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AAC,IACAxC,MAAM,CAACgI,OAAO,CAACH,GAAG,CAACrF,CAAC,CAAC,EAAE;IACrB+E,SAAS,EAAEb,MAAM;IACjBc,SAAS,EAAGhF,CAAC,IAAKA,CAAC,CAAC4F;GACrB,CAAC,EACJpI,MAAM,CAAC6D,IAAI,CACZ;AACH;AAEA,SAASiE,aAAaA,CACpBtE,UAA4B,EAC5BC,WAAuC;EAEvC,OAAQ4E,CAAC,IAAKpI,SAAS,CAACwG,SAAS,CAAC,CAACxG,SAAS,CAACyD,iBAAiB,CAACF,UAAU,EAAEC,WAAW,CAAC,CAAC,EAAE4E,CAAC,CAAQ;AACrG","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Option.d.ts b/.opencode/node_modules/effect/dist/Option.d.ts index ab5bb5b10aa4898b89b023ae426a2cc326ed4359..ef11ac606fe5cb2d5fd1ccf25ade5aa2d48b588f 100644 --- a/.opencode/node_modules/effect/dist/Option.d.ts +++ b/.opencode/node_modules/effect/dist/Option.d.ts @@ -1,80 +1,16 @@ /** - * The `Option` module provides a type-safe way to represent values that may or - * may not exist. An `Option` is either `Some` (containing a value) or - * `None` (representing absence). - * - * **Mental model** - * - * - `Option` is a discriminated union: `None | Some` - * - `None` represents the absence of a value (like `null`/`undefined`, but type-safe) - * - `Some` wraps a present value of type `A`, accessed via `.value` - * - `Option` is a monad: chain operations with {@link flatMap}, compose pipelines with `pipe` - * - All operations are pure and return new `Option` values; the input is never mutated - * - `Option` is yieldable in `Effect.gen`, producing the inner value or short-circuiting with `NoSuchElementError` - * - * **Common tasks** - * - * - Create from a value: {@link some}, {@link none} - * - Create from nullable: {@link fromNullishOr}, {@link fromNullOr}, {@link fromUndefinedOr} - * - Create from iterable: {@link fromIterable} - * - Create from Result: {@link getSuccess}, {@link getFailure} - * - Transform: {@link map}, {@link flatMap}, {@link andThen} - * - Unwrap: {@link getOrElse}, {@link getOrNull}, {@link getOrUndefined}, {@link getOrThrow} - * - Pattern match: {@link match} - * - Fallbacks: {@link orElse}, {@link orElseSome}, {@link firstSomeOf} - * - Filter: {@link filter}, {@link filterMap} - * - Combine multiple: {@link all}, {@link zipWith}, {@link product} - * - Generator syntax: {@link gen} - * - Do notation: {@link Do}, {@link bind}, {@link let_ let} - * - Check contents: {@link isSome}, {@link isNone}, {@link contains}, {@link exists} - * - * **Gotchas** - * - * - `Option.some(null)` is a valid `Some`; use {@link fromNullishOr} to treat `null`/`undefined` as `None` - * - {@link filterMap} uses a `Filter` callback that returns `Result` - * - {@link getOrThrow} throws a generic `Error`; prefer {@link getOrThrowWith} for custom errors - * - `None` is a singleton; compare with {@link isNone}, not `===` - * - When yielded in `Effect.gen`, a `None` becomes a `NoSuchElementError` defect - * - * **Quickstart** - * - * **Example** (Working with optional values) + * Models a value that may be present or absent. * - * ```ts - * import { Option } from "effect" - * - * const name = Option.some("Alice") - * const age = Option.none() - * - * // Transform - * const upper = Option.map(name, (s) => s.toUpperCase()) - * - * // Unwrap with fallback - * console.log(Option.getOrElse(upper, () => "unknown")) - * // Output: "ALICE" - * - * console.log(Option.getOrElse(age, () => 0)) - * // Output: 0 - * - * // Combine multiple options - * const both = Option.all({ name, age }) - * console.log(Option.isNone(both)) - * // Output: true - * ``` - * - * **See also** - * - * - {@link some} / {@link none} for creating values - * - {@link map} / {@link flatMap} for transforming values - * - {@link match} for pattern matching - * - {@link gen} for generator-based syntax + * An `Option` is `Some` when a value is available and `None` when it is + * not. This lets code handle missing values explicitly instead of relying on + * `null` or `undefined`. The module includes helpers for creating, checking, + * transforming, combining, and extracting optional values, plus conversions to + * and from common nullable or result-like shapes. It also includes `Option.gen` + * for writing small generator-based computations that stop at the first `None`. * * @since 2.0.0 - * @module */ -import type { NoSuchElementError } from "./Cause.ts"; import * as Combiner from "./Combiner.ts"; -import type { EffectIterator, Yieldable } from "./Effect.ts"; import * as Equivalence from "./Equivalence.ts"; import type * as Filter from "./Filter.ts"; import type { LazyArg } from "./Function.ts"; @@ -95,32 +31,15 @@ declare const TypeId = "~effect/data/Option"; * * **When to use** * - * - Representing initial values that may not yet exist + * Use to represent initial values that may not yet exist * - Returning from partial functions (not defined for all inputs) * - Managing optional fields in data structures * - * **Example** (Creating and matching Options) - * - * ```ts - * import { Option } from "effect" - * - * const someValue: Option.Option = Option.some(42) - * const noneValue: Option.Option = Option.none() - * - * const result = Option.match(someValue, { - * onNone: () => "No value", - * onSome: (value) => `Value is ${value}` - * }) - * - * console.log(result) - * // Output: "Value is 42" - * ``` - * * @see {@link some} for creating a `Some` * @see {@link none} for creating a `None` * @see {@link match} for pattern matching * - * @category Models + * @category models * @since 2.0.0 */ export type Option = None | Some; @@ -129,53 +48,69 @@ export type Option = None | Some; * * **When to use** * - * - Use as a type guard target when narrowing via {@link isNone} + * Use as a type guard target when narrowing via {@link isNone} * - * **Behavior** + * **Details** * * - `_tag` is always `"None"` - * - Yieldable in `Effect.gen` — yields `NoSuchElementError` * - Implements `Pipeable`, `Inspectable`, and structural equality * * @see {@link isNone} to check if an `Option` is `None` * @see {@link none} to construct a `None` * - * @category Models + * @category models * @since 2.0.0 */ -export interface None extends Pipeable, Inspectable, Yieldable, A, NoSuchElementError> { +export interface None extends Pipeable, Inspectable { readonly _tag: "None"; readonly _op: "None"; readonly valueOrUndefined: undefined; readonly [TypeId]: { readonly _A: Covariant; }; + [Symbol.iterator](): OptionIterator>; [Unify.typeSymbol]?: unknown; [Unify.unifySymbol]?: OptionUnify; [Unify.ignoreSymbol]?: OptionUnifyIgnore; } +/** + * Iterator protocol used to yield an `Option` inside {@link gen}, returning the + * contained value type back to the generator. + * + * **When to use** + * + * Use when defining or typing `[Symbol.iterator]()` for `Option` values so + * `yield*` can pass the contained value type back into `Option.gen`. + * + * @see {@link gen} for writing generator-based `Option` code that consumes this iterator protocol + * + * @category generators + * @since 4.0.0 + */ +export interface OptionIterator> { + next(...args: ReadonlyArray): IteratorResult>; +} /** * Represents the presence of a value within an {@link Option}. * * **When to use** * - * - Use as a type guard target when narrowing via {@link isSome} + * Use as a type guard target when narrowing via {@link isSome} * - Access the inner value via `.value` * - * **Behavior** + * **Details** * * - `_tag` is always `"Some"` * - `.value` holds the contained value of type `A` - * - Yieldable in `Effect.gen` — yields the inner value * - Implements `Pipeable`, `Inspectable`, and structural equality * * @see {@link isSome} to check if an `Option` is `Some` * @see {@link some} to construct a `Some` * - * @category Models + * @category models * @since 2.0.0 */ -export interface Some extends Pipeable, Inspectable, Yieldable, A, NoSuchElementError> { +export interface Some extends Pipeable, Inspectable { readonly _tag: "Some"; readonly _op: "Some"; readonly value: A; @@ -183,16 +118,25 @@ export interface Some extends Pipeable, Inspectable, Yieldable, readonly [TypeId]: { readonly _A: Covariant; }; - [Symbol.iterator](): EffectIterator>; + [Symbol.iterator](): OptionIterator>; [Unify.typeSymbol]?: unknown; [Unify.unifySymbol]?: OptionUnify; [Unify.ignoreSymbol]?: OptionUnifyIgnore; } /** - * Internal unification interface for `Option` types. Used by the Effect - * library's type system for type-level operations. + * Type-level unification support for `Option` values. + * + * **When to use** + * + * Use when extending Effect's type-level unification support for `Option`. + * + * **Details** * - * @category Models + * This is used by Effect's `Unify` machinery to preserve the contained value + * type when generic code returns or combines `Option` values. Users normally + * do not need to reference this interface directly. + * + * @category models * @since 2.0.0 */ export interface OptionUnify + * **When to use** * - * // ┌─── string - * // ▼ - * type MyType = Option.Option.Value - * ``` + * Use to access type-level helpers associated with `Option`. * - * @category Namespaces * @since 2.0.0 */ export declare namespace Option { /** * Extracts the type of the value contained in an `Option`. * + * **When to use** + * + * Use to infer the inner value type from an existing `Option` type. + * * **Example** (Extracting the value type) * * ```ts @@ -234,15 +173,24 @@ export declare namespace Option { * type MyType = Option.Option.Value * ``` * - * @since 2.0.0 * @category Type-level Utils + * @since 2.0.0 */ type Value> = [T] extends [Option] ? _A : never; } /** - * Internal interface for type unification ignore behavior. + * Marker interface used by Effect's `Unify` machinery for `Option` values. * - * @category Models + * **When to use** + * + * Use when marking generic code so `Option` unification should be ignored. + * + * **Details** + * + * This supports type-level unification behavior for `Option`. Users normally + * do not need to reference this interface directly. + * + * @category models * @since 2.0.0 */ export interface OptionUnifyIgnore { @@ -250,7 +198,12 @@ export interface OptionUnifyIgnore { /** * Type lambda interface for higher-kinded type encodings with `Option`. * - * @category Type Lambdas + * **When to use** + * + * Use when defining higher-kinded abstractions that must accept optional-value + * types as one of their type-lambda inputs. + * + * @category type lambdas * @since 2.0.0 */ export interface OptionTypeLambda extends TypeLambda { @@ -261,10 +214,10 @@ export interface OptionTypeLambda extends TypeLambda { * * **When to use** * - * - Representing a missing or uninitialized value - * - Returning "no result" from a function + * Use to represent a missing or uninitialized value, such as returning "no + * result" from a function. * - * **Behavior** + * **Details** * * - Returns `Option`, which is a subtype of `Option` for any `A` * - Always returns the same singleton instance @@ -284,7 +237,7 @@ export interface OptionTypeLambda extends TypeLambda { * * @see {@link some} for the opposite operation. * - * @category Constructors + * @category constructors * @since 2.0.0 */ export declare const none: () => Option; @@ -293,10 +246,10 @@ export declare const none: () => Option; * * **When to use** * - * - Wrapping a known-present value as `Option` + * Use to wrap a known present value as `Option` * - Returning a successful result from a partial function * - * **Behavior** + * **Details** * * - Always returns `Some` * - Does not filter `null` or `undefined`; use {@link fromNullishOr} for that @@ -316,7 +269,7 @@ export declare const none: () => Option; * * @see {@link none} for the opposite operation. * - * @category Constructors + * @category constructors * @since 2.0.0 */ export declare const some: (value: A) => Option; @@ -325,10 +278,10 @@ export declare const some: (value: A) => Option; * * **When to use** * - * - Validating unknown values at runtime boundaries - * - Type-narrowing in union types + * Use to validate unknown values at runtime boundaries, such as type-narrowing + * in union types. * - * **Behavior** + * **Details** * * - Returns `true` for both `Some` and `None` instances * - Acts as a type guard, narrowing the input to `Option` @@ -351,7 +304,7 @@ export declare const some: (value: A) => Option; * @see {@link isNone} to check for `None` specifically * @see {@link isSome} to check for `Some` specifically * - * @category Guards + * @category guards * @since 2.0.0 */ export declare const isOption: (input: unknown) => input is Option; @@ -360,9 +313,9 @@ export declare const isOption: (input: unknown) => input is Option; * * **When to use** * - * - Branching on absence before accessing `.value` + * Use when you need to branch on an absent `Option` before accessing `.value`. * - * **Behavior** + * **Details** * * - Acts as a type guard, narrowing to `None` * @@ -380,7 +333,7 @@ export declare const isOption: (input: unknown) => input is Option; * * @see {@link isSome} for the opposite check. * - * @category Guards + * @category guards * @since 2.0.0 */ export declare const isNone: (self: Option) => self is None; @@ -389,9 +342,9 @@ export declare const isNone: (self: Option) => self is None; * * **When to use** * - * - Branching on presence before accessing `.value` + * Use when you need to branch on a present `Option` before accessing `.value`. * - * **Behavior** + * **Details** * * - Acts as a type guard, narrowing to `Some` * @@ -409,7 +362,7 @@ export declare const isNone: (self: Option) => self is None; * * @see {@link isNone} for the opposite check. * - * @category Guards + * @category guards * @since 2.0.0 */ export declare const isSome: (self: Option) => self is Some; @@ -418,10 +371,10 @@ export declare const isSome: (self: Option) => self is Some; * * **When to use** * - * - Exhaustively handling both branches in one expression - * - Transforming an `Option` into a plain value + * Use when you need to handle both `Some` and `None` in one expression and + * transform an `Option` into a plain value. * - * **Behavior** + * **Details** * * - If `None`, calls `onNone` and returns its result * - If `Some`, calls `onSome` with the value and returns its result @@ -443,7 +396,7 @@ export declare const isSome: (self: Option) => self is Some; * * @see {@link getOrElse} for unwrapping with a default * - * @category Pattern matching + * @category pattern matching * @since 2.0.0 */ export declare const match: { @@ -452,10 +405,10 @@ export declare const match: { * * **When to use** * - * - Exhaustively handling both branches in one expression - * - Transforming an `Option` into a plain value + * Use when you need to handle both `Some` and `None` in one expression and + * transform an `Option` into a plain value. * - * **Behavior** + * **Details** * * - If `None`, calls `onNone` and returns its result * - If `Some`, calls `onSome` with the value and returns its result @@ -477,7 +430,7 @@ export declare const match: { * * @see {@link getOrElse} for unwrapping with a default * - * @category Pattern matching + * @category pattern matching * @since 2.0.0 */ (options: { @@ -489,10 +442,10 @@ export declare const match: { * * **When to use** * - * - Exhaustively handling both branches in one expression - * - Transforming an `Option` into a plain value + * Use when you need to handle both `Some` and `None` in one expression and + * transform an `Option` into a plain value. * - * **Behavior** + * **Details** * * - If `None`, calls `onNone` and returns its result * - If `Some`, calls `onSome` with the value and returns its result @@ -514,7 +467,7 @@ export declare const match: { * * @see {@link getOrElse} for unwrapping with a default * - * @category Pattern matching + * @category pattern matching * @since 2.0.0 */ (self: Option, options: { @@ -527,10 +480,10 @@ export declare const match: { * * **When to use** * - * - Turning a parsing function into a type-narrowing predicate - * - Filtering arrays with `Array.prototype.filter` + * Use when you need to turn an `Option`-returning parser into a type-narrowing + * predicate, such as for `Array.prototype.filter`. * - * **Behavior** + * **Details** * * - Returns `true` when the original function returns `Some` * - Returns `false` when the original function returns `None` @@ -559,7 +512,7 @@ export declare const match: { * * @see {@link liftPredicate} for the reverse direction * - * @category Conversions + * @category converting * @since 2.0.0 */ export declare const toRefinement: (f: (a: A) => Option) => (a: A) => a is B; @@ -569,10 +522,10 @@ export declare const toRefinement: (f: (a: A) => Option) => ( * * **When to use** * - * - Safely extracting the head of a collection - * - Working with generators or lazy iterables + * Use when you need to safely extract the head of a collection, including + * generators or lazy iterables. * - * **Behavior** + * **Details** * * - Only consumes the first element; does not iterate the rest * - Returns `None` for empty iterables @@ -591,7 +544,7 @@ export declare const toRefinement: (f: (a: A) => Option) => ( * * @see {@link toArray} for the inverse direction * - * @category Constructors + * @category constructors * @since 2.0.0 */ export declare const fromIterable: (collection: Iterable) => Option; @@ -600,12 +553,13 @@ export declare const fromIterable: (collection: Iterable) => Option; * * **When to use** * - * - Discarding the error channel when you only care about success + * Use when you need to discard a `Result` failure and keep only the success + * value as an `Option`. * - * **Behavior** + * **Details** * - * - `Ok` → `Some` with the success value - * - `Err` → `None` (error is discarded) + * - `Success` becomes `Some` with the success value + * - `Failure` becomes `None` and the failure value is discarded * * **Example** (Extracting the success side) * @@ -621,21 +575,22 @@ export declare const fromIterable: (collection: Iterable) => Option; * * @see {@link getFailure} for the opposite operation. * - * @category Conversions - * @since 2.0.0 + * @category converting + * @since 4.0.0 */ export declare const getSuccess: (self: Result) => Option; /** - * Converts a `Result` into an `Option`, keeping only the error value. + * Converts a `Result` into an `Option`, keeping only the failure value. * * **When to use** * - * - Extracting the error when you don't need the success channel + * Use when you need to discard a `Result` success and keep only the failure + * value as an `Option`. * - * **Behavior** + * **Details** * - * - `Err` → `Some` with the error value - * - `Ok` → `None` (success value is discarded) + * - `Failure` becomes `Some` with the failure value + * - `Success` becomes `None` and the success value is discarded * * **Example** (Extracting the failure side) * @@ -651,8 +606,8 @@ export declare const getSuccess: (self: Result) => Option; * * @see {@link getSuccess} for the opposite operation. * - * @category Conversions - * @since 2.0.0 + * @category converting + * @since 4.0.0 */ export declare const getFailure: (self: Result) => Option; /** @@ -660,10 +615,10 @@ export declare const getFailure: (self: Result) => Option; * * **When to use** * - * - Providing a default value for an absent `Option` + * Use when providing a default value for an absent `Option` * - Unwrapping with lazy evaluation of the fallback * - * **Behavior** + * **Details** * * - `Some` → returns the inner value * - `None` → calls `onNone()` and returns its result @@ -685,7 +640,7 @@ export declare const getFailure: (self: Result) => Option; * @see {@link getOrUndefined} to fall back to `undefined` * @see {@link getOrThrow} to throw on `None` * - * @category Getters + * @category getters * @since 2.0.0 */ export declare const getOrElse: { @@ -694,10 +649,10 @@ export declare const getOrElse: { * * **When to use** * - * - Providing a default value for an absent `Option` + * Use when providing a default value for an absent `Option` * - Unwrapping with lazy evaluation of the fallback * - * **Behavior** + * **Details** * * - `Some` → returns the inner value * - `None` → calls `onNone()` and returns its result @@ -719,7 +674,7 @@ export declare const getOrElse: { * @see {@link getOrUndefined} to fall back to `undefined` * @see {@link getOrThrow} to throw on `None` * - * @category Getters + * @category getters * @since 2.0.0 */ (onNone: LazyArg): (self: Option) => B | A; @@ -728,10 +683,10 @@ export declare const getOrElse: { * * **When to use** * - * - Providing a default value for an absent `Option` + * Use when providing a default value for an absent `Option` * - Unwrapping with lazy evaluation of the fallback * - * **Behavior** + * **Details** * * - `Some` → returns the inner value * - `None` → calls `onNone()` and returns its result @@ -753,7 +708,7 @@ export declare const getOrElse: { * @see {@link getOrUndefined} to fall back to `undefined` * @see {@link getOrThrow} to throw on `None` * - * @category Getters + * @category getters * @since 2.0.0 */ (self: Option, onNone: LazyArg): A | B; @@ -763,10 +718,10 @@ export declare const getOrElse: { * * **When to use** * - * - Chaining fallback `Option` computations - * - Building priority chains of optional values + * Use when you need a lazy fallback `Option`, such as when building priority + * chains of optional values. * - * **Behavior** + * **Details** * * - `Some` → returns `self` unchanged * - `None` → evaluates and returns `that()` @@ -787,7 +742,7 @@ export declare const getOrElse: { * @see {@link orElseSome} to wrap the fallback value in `Some` automatically * @see {@link firstSomeOf} to pick the first `Some` from a collection * - * @category Error handling + * @category error handling * @since 2.0.0 */ export declare const orElse: { @@ -796,10 +751,10 @@ export declare const orElse: { * * **When to use** * - * - Chaining fallback `Option` computations - * - Building priority chains of optional values + * Use when you need a lazy fallback `Option`, such as when building priority + * chains of optional values. * - * **Behavior** + * **Details** * * - `Some` → returns `self` unchanged * - `None` → evaluates and returns `that()` @@ -820,7 +775,7 @@ export declare const orElse: { * @see {@link orElseSome} to wrap the fallback value in `Some` automatically * @see {@link firstSomeOf} to pick the first `Some` from a collection * - * @category Error handling + * @category error handling * @since 2.0.0 */ (that: LazyArg>): (self: Option) => Option; @@ -829,10 +784,10 @@ export declare const orElse: { * * **When to use** * - * - Chaining fallback `Option` computations - * - Building priority chains of optional values + * Use when you need a lazy fallback `Option`, such as when building priority + * chains of optional values. * - * **Behavior** + * **Details** * * - `Some` → returns `self` unchanged * - `None` → evaluates and returns `that()` @@ -853,7 +808,7 @@ export declare const orElse: { * @see {@link orElseSome} to wrap the fallback value in `Some` automatically * @see {@link firstSomeOf} to pick the first `Some` from a collection * - * @category Error handling + * @category error handling * @since 2.0.0 */ (self: Option, that: LazyArg>): Option; @@ -864,9 +819,9 @@ export declare const orElse: { * * **When to use** * - * - Providing a default plain value (not an `Option`) as fallback + * Use when providing a default plain value (not an `Option`) as fallback * - * **Behavior** + * **Details** * * - `Some` → returns `self` unchanged * - `None` → calls `onNone()`, wraps result in `Some`, and returns it @@ -885,7 +840,7 @@ export declare const orElse: { * * @see {@link orElse} when the fallback is itself an `Option` * - * @category Error handling + * @category error handling * @since 2.0.0 */ export declare const orElseSome: { @@ -895,9 +850,9 @@ export declare const orElseSome: { * * **When to use** * - * - Providing a default plain value (not an `Option`) as fallback + * Use when providing a default plain value (not an `Option`) as fallback * - * **Behavior** + * **Details** * * - `Some` → returns `self` unchanged * - `None` → calls `onNone()`, wraps result in `Some`, and returns it @@ -916,7 +871,7 @@ export declare const orElseSome: { * * @see {@link orElse} when the fallback is itself an `Option` * - * @category Error handling + * @category error handling * @since 2.0.0 */ (onNone: LazyArg): (self: Option) => Option; @@ -926,9 +881,9 @@ export declare const orElseSome: { * * **When to use** * - * - Providing a default plain value (not an `Option`) as fallback + * Use when providing a default plain value (not an `Option`) as fallback * - * **Behavior** + * **Details** * * - `Some` → returns `self` unchanged * - `None` → calls `onNone()`, wraps result in `Some`, and returns it @@ -947,20 +902,20 @@ export declare const orElseSome: { * * @see {@link orElse} when the fallback is itself an `Option` * - * @category Error handling + * @category error handling * @since 2.0.0 */ (self: Option, onNone: LazyArg): Option; }; /** - * Like {@link orElse}, but wraps the result in a `Result` to indicate the - * source of the value. + * Returns the first available value and marks whether it came from the fallback. * * **When to use** * - * - Distinguishing whether a value came from the primary or fallback `Option` + * Use when you need to know whether a present value came from the primary or + * fallback `Option`. * - * **Behavior** + * **Details** * * - `self` is `Some` → `Some(Result.fail(value))` (value from primary) * - `self` is `None`, `that()` is `Some` → `Some(Result.succeed(value))` (value from fallback) @@ -980,19 +935,19 @@ export declare const orElseSome: { * * @see {@link orElse} for the simpler variant without source tracking * - * @category Error handling - * @since 2.0.0 + * @category error handling + * @since 4.0.0 */ export declare const orElseResult: { /** - * Like {@link orElse}, but wraps the result in a `Result` to indicate the - * source of the value. + * Returns the first available value and marks whether it came from the fallback. * * **When to use** * - * - Distinguishing whether a value came from the primary or fallback `Option` + * Use when you need to know whether a present value came from the primary or + * fallback `Option`. * - * **Behavior** + * **Details** * * - `self` is `Some` → `Some(Result.fail(value))` (value from primary) * - `self` is `None`, `that()` is `Some` → `Some(Result.succeed(value))` (value from fallback) @@ -1012,19 +967,19 @@ export declare const orElseResult: { * * @see {@link orElse} for the simpler variant without source tracking * - * @category Error handling - * @since 2.0.0 + * @category error handling + * @since 4.0.0 */ (that: LazyArg>): (self: Option) => Option>; /** - * Like {@link orElse}, but wraps the result in a `Result` to indicate the - * source of the value. + * Returns the first available value and marks whether it came from the fallback. * * **When to use** * - * - Distinguishing whether a value came from the primary or fallback `Option` + * Use when you need to know whether a present value came from the primary or + * fallback `Option`. * - * **Behavior** + * **Details** * * - `self` is `Some` → `Some(Result.fail(value))` (value from primary) * - `self` is `None`, `that()` is `Some` → `Some(Result.succeed(value))` (value from fallback) @@ -1044,8 +999,8 @@ export declare const orElseResult: { * * @see {@link orElse} for the simpler variant without source tracking * - * @category Error handling - * @since 2.0.0 + * @category error handling + * @since 4.0.0 */ (self: Option, that: LazyArg>): Option>; }; @@ -1055,9 +1010,9 @@ export declare const orElseResult: { * * **When to use** * - * - Searching for the first available value in a priority list + * Use when you need the first available `Some` value from a priority list. * - * **Behavior** + * **Details** * * - Short-circuits on the first `Some` * - Returns `None` only when every element is `None` @@ -1077,7 +1032,7 @@ export declare const orElseResult: { * * @see {@link orElse} for a two-option fallback * - * @category Error handling + * @category error handling * @since 2.0.0 */ export declare const firstSomeOf: > = Iterable>>(collection: C) => [C] extends [Iterable>] ? Option : never; @@ -1086,10 +1041,10 @@ export declare const firstSomeOf: > = Iterable`) @@ -1113,8 +1068,8 @@ export declare const firstSomeOf: > = Iterable(a: A) => Option>; /** @@ -1123,9 +1078,10 @@ export declare const fromNullishOr: (a: A) => Option>; * * **When to use** * - * - When `null` is a meaningful value but `undefined` means absent + * Use when you want to treat only `undefined` as absent while preserving `null` + * as a meaningful value. * - * **Behavior** + * **Details** * * - `undefined` → `None` * - Any other value (including `null`) → `Some` @@ -1148,7 +1104,7 @@ export declare const fromNullishOr: (a: A) => Option>; * @see {@link fromNullishOr} to treat both `null` and `undefined` as absent * @see {@link fromNullOr} to only treat `null` as absent * - * @category Conversions + * @category converting * @since 4.0.0 */ export declare const fromUndefinedOr: (a: A) => Option>; @@ -1158,9 +1114,10 @@ export declare const fromUndefinedOr: (a: A) => Option> * * **When to use** * - * - When `undefined` is a meaningful value but `null` means absent + * Use when you want to treat only `null` as absent while preserving + * `undefined` as a meaningful value. * - * **Behavior** + * **Details** * * - `null` → `None` * - Any other value (including `undefined`) → `Some` @@ -1183,7 +1140,7 @@ export declare const fromUndefinedOr: (a: A) => Option> * @see {@link fromNullishOr} to treat both `null` and `undefined` as absent * @see {@link fromUndefinedOr} to only treat `undefined` as absent * - * @category Conversions + * @category converting * @since 4.0.0 */ export declare const fromNullOr: (a: A) => Option>; @@ -1193,9 +1150,9 @@ export declare const fromNullOr: (a: A) => Option>; * * **When to use** * - * - Wrapping existing nullable-returning functions for use in `Option` pipelines + * Use to wrap existing nullable-returning functions for use in `Option` pipelines * - * **Behavior** + * **Details** * * - Calls the original function with the given arguments * - Wraps the result via {@link fromNullishOr} @@ -1222,8 +1179,8 @@ export declare const fromNullOr: (a: A) => Option>; * @see {@link fromNullishOr} for converting a single value * @see {@link liftThrowable} for functions that throw instead * - * @category Conversions - * @since 2.0.0 + * @category converting + * @since 4.0.0 */ export declare const liftNullishOr: , B>(f: (...a: A) => B) => (...a: A) => Option>; /** @@ -1231,9 +1188,9 @@ export declare const liftNullishOr: , B>(f: (.. * * **When to use** * - * - Interoping with APIs that use `null` for missing values + * Use when you need to pass absent `Option` values to APIs that expect `null`. * - * **Behavior** + * **Details** * * - `Some` → the inner value * - `None` → `null` @@ -1253,7 +1210,7 @@ export declare const liftNullishOr: , B>(f: (.. * @see {@link getOrUndefined} to return `undefined` instead * @see {@link getOrElse} for a custom fallback * - * @category Getters + * @category getters * @since 2.0.0 */ export declare const getOrNull: (self: Option) => A | null; @@ -1262,9 +1219,10 @@ export declare const getOrNull: (self: Option) => A | null; * * **When to use** * - * - Interoping with APIs that use `undefined` for missing values + * Use when you need to pass absent `Option` values to APIs that expect + * `undefined`. * - * **Behavior** + * **Details** * * - `Some` → the inner value * - `None` → `undefined` @@ -1284,7 +1242,7 @@ export declare const getOrNull: (self: Option) => A | null; * @see {@link getOrNull} to return `null` instead * @see {@link getOrElse} for a custom fallback * - * @category Getters + * @category getters * @since 2.0.0 */ export declare const getOrUndefined: (self: Option) => A | undefined; @@ -1293,9 +1251,9 @@ export declare const getOrUndefined: (self: Option) => A | undefined; * * **When to use** * - * - Wrapping exception-throwing APIs (e.g. `JSON.parse`) for safe usage + * Use to wrap exception-throwing APIs (e.g. `JSON.parse`) for safe usage * - * **Behavior** + * **Details** * * - If the function returns normally → `Some` with the result * - If the function throws → `None` (exception is swallowed) @@ -1316,7 +1274,7 @@ export declare const getOrUndefined: (self: Option) => A | undefined; * * @see {@link liftNullishOr} for nullable-returning functions * - * @category Conversions + * @category converting * @since 2.0.0 */ export declare const liftThrowable: , B>(f: (...a: A) => B) => (...a: A) => Option; @@ -1325,10 +1283,10 @@ export declare const liftThrowable: , B>(f: (.. * * **When to use** * - * - Fail-fast unwrapping when absence is unexpected - * - Providing a descriptive error for debugging + * Use when you need fail-fast unwrapping of an `Option` for unexpected absence + * and want to provide a descriptive debugging error. * - * **Behavior** + * **Details** * * - `Some` → returns the inner value * - `None` → throws the value returned by `onNone()` @@ -1348,7 +1306,7 @@ export declare const liftThrowable: , B>(f: (.. * @see {@link getOrThrow} for a version with a default error * @see {@link getOrElse} for a non-throwing alternative * - * @category Conversions + * @category converting * @since 2.0.0 */ export declare const getOrThrowWith: { @@ -1357,10 +1315,10 @@ export declare const getOrThrowWith: { * * **When to use** * - * - Fail-fast unwrapping when absence is unexpected - * - Providing a descriptive error for debugging + * Use when you need fail-fast unwrapping of an `Option` for unexpected absence + * and want to provide a descriptive debugging error. * - * **Behavior** + * **Details** * * - `Some` → returns the inner value * - `None` → throws the value returned by `onNone()` @@ -1380,7 +1338,7 @@ export declare const getOrThrowWith: { * @see {@link getOrThrow} for a version with a default error * @see {@link getOrElse} for a non-throwing alternative * - * @category Conversions + * @category converting * @since 2.0.0 */ (onNone: () => unknown): (self: Option) => A; @@ -1389,10 +1347,10 @@ export declare const getOrThrowWith: { * * **When to use** * - * - Fail-fast unwrapping when absence is unexpected - * - Providing a descriptive error for debugging + * Use when you need fail-fast unwrapping of an `Option` for unexpected absence + * and want to provide a descriptive debugging error. * - * **Behavior** + * **Details** * * - `Some` → returns the inner value * - `None` → throws the value returned by `onNone()` @@ -1412,7 +1370,7 @@ export declare const getOrThrowWith: { * @see {@link getOrThrow} for a version with a default error * @see {@link getOrElse} for a non-throwing alternative * - * @category Conversions + * @category converting * @since 2.0.0 */ (self: Option, onNone: () => unknown): A; @@ -1422,9 +1380,10 @@ export declare const getOrThrowWith: { * * **When to use** * - * - Quick fail-fast unwrapping when a generic error is acceptable + * Use when you need quick fail-fast unwrapping of an `Option` and a generic + * error is acceptable. * - * **Behavior** + * **Details** * * - `Some` → returns the inner value * - `None` → throws `new Error("getOrThrow called on a None")` @@ -1444,7 +1403,7 @@ export declare const getOrThrowWith: { * @see {@link getOrThrowWith} for a custom error * @see {@link getOrElse} for a non-throwing alternative * - * @category Conversions + * @category converting * @since 2.0.0 */ export declare const getOrThrow: (self: Option) => A; @@ -1454,14 +1413,13 @@ export declare const getOrThrow: (self: Option) => A; * * **When to use** * - * - Applying a pure transformation to an optional value - * - Chaining transformations in a pipeline + * Use to apply a pure transformation to an `Option`'s present value, especially + * when chaining transformations in a pipeline. * - * **Behavior** + * **Details** * * - `Some` → applies `f` and wraps the result in a new `Some` * - `None` → returns `None` unchanged - * - Does not mutate the input * * **Example** (Mapping over an Option) * @@ -1478,7 +1436,7 @@ export declare const getOrThrow: (self: Option) => A; * @see {@link flatMap} when `f` returns an `Option` * @see {@link as} to replace the value with a constant * - * @category Mapping + * @category mapping * @since 2.0.0 */ export declare const map: { @@ -1488,14 +1446,13 @@ export declare const map: { * * **When to use** * - * - Applying a pure transformation to an optional value - * - Chaining transformations in a pipeline + * Use to apply a pure transformation to an `Option`'s present value, especially + * when chaining transformations in a pipeline. * - * **Behavior** + * **Details** * * - `Some` → applies `f` and wraps the result in a new `Some` * - `None` → returns `None` unchanged - * - Does not mutate the input * * **Example** (Mapping over an Option) * @@ -1512,7 +1469,7 @@ export declare const map: { * @see {@link flatMap} when `f` returns an `Option` * @see {@link as} to replace the value with a constant * - * @category Mapping + * @category mapping * @since 2.0.0 */ (f: (a: A) => B): (self: Option) => Option; @@ -1522,14 +1479,13 @@ export declare const map: { * * **When to use** * - * - Applying a pure transformation to an optional value - * - Chaining transformations in a pipeline + * Use to apply a pure transformation to an `Option`'s present value, especially + * when chaining transformations in a pipeline. * - * **Behavior** + * **Details** * * - `Some` → applies `f` and wraps the result in a new `Some` * - `None` → returns `None` unchanged - * - Does not mutate the input * * **Example** (Mapping over an Option) * @@ -1546,7 +1502,7 @@ export declare const map: { * @see {@link flatMap} when `f` returns an `Option` * @see {@link as} to replace the value with a constant * - * @category Mapping + * @category mapping * @since 2.0.0 */ (self: Option, f: (a: A) => B): Option; @@ -1556,12 +1512,8 @@ export declare const map: { * * **When to use** * - * - Preserving presence/absence while discarding the original value - * - * **Behavior** - * - * - `Some` → `Some(b)` - * - `None` → `None` + * Use when you need to replace a present `Option` value while preserving + * whether it was `Some` or `None`. * * **Example** (Replacing a value) * @@ -1578,7 +1530,7 @@ export declare const map: { * @see {@link asVoid} to replace with `undefined` * @see {@link map} for a general transformation * - * @category Mapping + * @category mapping * @since 2.0.0 */ export declare const as: { @@ -1587,12 +1539,8 @@ export declare const as: { * * **When to use** * - * - Preserving presence/absence while discarding the original value - * - * **Behavior** - * - * - `Some` → `Some(b)` - * - `None` → `None` + * Use when you need to replace a present `Option` value while preserving + * whether it was `Some` or `None`. * * **Example** (Replacing a value) * @@ -1609,7 +1557,7 @@ export declare const as: { * @see {@link asVoid} to replace with `undefined` * @see {@link map} for a general transformation * - * @category Mapping + * @category mapping * @since 2.0.0 */ (b: B): (self: Option) => Option; @@ -1618,12 +1566,8 @@ export declare const as: { * * **When to use** * - * - Preserving presence/absence while discarding the original value - * - * **Behavior** - * - * - `Some` → `Some(b)` - * - `None` → `None` + * Use when you need to replace a present `Option` value while preserving + * whether it was `Some` or `None`. * * **Example** (Replacing a value) * @@ -1640,7 +1584,7 @@ export declare const as: { * @see {@link asVoid} to replace with `undefined` * @see {@link map} for a general transformation * - * @category Mapping + * @category mapping * @since 2.0.0 */ (self: Option, b: B): Option; @@ -1651,12 +1595,8 @@ export declare const as: { * * **When to use** * - * - Discarding the value while preserving presence/absence - * - * **Behavior** - * - * - `Some` → `Some(undefined)` - * - `None` → `None` + * Use when you need to discard a present `Option` value while preserving + * whether it was `Some` or `None`. * * **Example** (Voiding the value) * @@ -1672,18 +1612,18 @@ export declare const as: { * * @see {@link as} to replace with a specific constant * - * @category Mapping + * @category mapping * @since 2.0.0 */ export declare const asVoid: <_>(self: Option<_>) => Option; declare const void_: Option; export { /** - * A pre-built `Some(undefined)` constant. + * Provides a pre-built `Some(undefined)` constant. * * **When to use** * - * - Returning a "success with no meaningful value" from an `Option`-returning function + * Use to return a "success with no meaningful value" from an `Option`-returning function * * **Example** (Using Option.void) * @@ -1696,7 +1636,7 @@ export { * * @see {@link asVoid} to convert an existing `Option` to `Option` * - * @category Constructors + * @category constructors * @since 2.0.0 */ void_ as void }; @@ -1706,10 +1646,10 @@ void_ as void }; * * **When to use** * - * - Chaining computations that each may fail (return `None`) - * - Sequencing dependent optional operations + * Use when you need to chain dependent `Option` computations where each step + * may return `None`. * - * **Behavior** + * **Details** * * - `Some` → applies `f` to the value and returns its `Option` result * - `None` → returns `None` without calling `f` @@ -1742,7 +1682,7 @@ void_ as void }; * @see {@link andThen} for a more flexible variant * @see {@link flatten} to unwrap a nested `Option>` * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ export declare const flatMap: { @@ -1752,10 +1692,10 @@ export declare const flatMap: { * * **When to use** * - * - Chaining computations that each may fail (return `None`) - * - Sequencing dependent optional operations + * Use when you need to chain dependent `Option` computations where each step + * may return `None`. * - * **Behavior** + * **Details** * * - `Some` → applies `f` to the value and returns its `Option` result * - `None` → returns `None` without calling `f` @@ -1788,7 +1728,7 @@ export declare const flatMap: { * @see {@link andThen} for a more flexible variant * @see {@link flatten} to unwrap a nested `Option>` * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ (f: (a: A) => Option): (self: Option) => Option; @@ -1798,10 +1738,10 @@ export declare const flatMap: { * * **When to use** * - * - Chaining computations that each may fail (return `None`) - * - Sequencing dependent optional operations + * Use when you need to chain dependent `Option` computations where each step + * may return `None`. * - * **Behavior** + * **Details** * * - `Some` → applies `f` to the value and returns its `Option` result * - `None` → returns `None` without calling `f` @@ -1834,7 +1774,7 @@ export declare const flatMap: { * @see {@link andThen} for a more flexible variant * @see {@link flatten} to unwrap a nested `Option>` * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ (self: Option, f: (a: A) => Option): Option; @@ -1845,10 +1785,10 @@ export declare const flatMap: { * * **When to use** * - * - Flexible chaining where the next step may return `Option`, a plain value, - * or a function + * Use when you need to chain an `Option` with a next step that may be another + * `Option`, a plain value, or a function. * - * **Behavior** + * **Details** * * - If `self` is `None`, returns `None` immediately * - If `f` is a function, calls it with the `Some` value @@ -1876,7 +1816,7 @@ export declare const flatMap: { * @see {@link flatMap} for the standard monadic bind * @see {@link map} when you always return a plain value * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ export declare const andThen: { @@ -1886,10 +1826,10 @@ export declare const andThen: { * * **When to use** * - * - Flexible chaining where the next step may return `Option`, a plain value, - * or a function + * Use when you need to chain an `Option` with a next step that may be another + * `Option`, a plain value, or a function. * - * **Behavior** + * **Details** * * - If `self` is `None`, returns `None` immediately * - If `f` is a function, calls it with the `Some` value @@ -1917,7 +1857,7 @@ export declare const andThen: { * @see {@link flatMap} for the standard monadic bind * @see {@link map} when you always return a plain value * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ (f: (a: A) => Option): (self: Option) => Option; @@ -1927,10 +1867,10 @@ export declare const andThen: { * * **When to use** * - * - Flexible chaining where the next step may return `Option`, a plain value, - * or a function + * Use when you need to chain an `Option` with a next step that may be another + * `Option`, a plain value, or a function. * - * **Behavior** + * **Details** * * - If `self` is `None`, returns `None` immediately * - If `f` is a function, calls it with the `Some` value @@ -1958,7 +1898,7 @@ export declare const andThen: { * @see {@link flatMap} for the standard monadic bind * @see {@link map} when you always return a plain value * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ (f: Option): (self: Option) => Option; @@ -1968,10 +1908,10 @@ export declare const andThen: { * * **When to use** * - * - Flexible chaining where the next step may return `Option`, a plain value, - * or a function + * Use when you need to chain an `Option` with a next step that may be another + * `Option`, a plain value, or a function. * - * **Behavior** + * **Details** * * - If `self` is `None`, returns `None` immediately * - If `f` is a function, calls it with the `Some` value @@ -1999,7 +1939,7 @@ export declare const andThen: { * @see {@link flatMap} for the standard monadic bind * @see {@link map} when you always return a plain value * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ (f: (a: A) => B): (self: Option) => Option; @@ -2009,10 +1949,10 @@ export declare const andThen: { * * **When to use** * - * - Flexible chaining where the next step may return `Option`, a plain value, - * or a function + * Use when you need to chain an `Option` with a next step that may be another + * `Option`, a plain value, or a function. * - * **Behavior** + * **Details** * * - If `self` is `None`, returns `None` immediately * - If `f` is a function, calls it with the `Some` value @@ -2040,7 +1980,7 @@ export declare const andThen: { * @see {@link flatMap} for the standard monadic bind * @see {@link map} when you always return a plain value * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ (f: NotFunction): (self: Option) => Option; @@ -2050,10 +1990,10 @@ export declare const andThen: { * * **When to use** * - * - Flexible chaining where the next step may return `Option`, a plain value, - * or a function + * Use when you need to chain an `Option` with a next step that may be another + * `Option`, a plain value, or a function. * - * **Behavior** + * **Details** * * - If `self` is `None`, returns `None` immediately * - If `f` is a function, calls it with the `Some` value @@ -2081,7 +2021,7 @@ export declare const andThen: { * @see {@link flatMap} for the standard monadic bind * @see {@link map} when you always return a plain value * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ (self: Option, f: (a: A) => Option): Option; @@ -2091,10 +2031,10 @@ export declare const andThen: { * * **When to use** * - * - Flexible chaining where the next step may return `Option`, a plain value, - * or a function + * Use when you need to chain an `Option` with a next step that may be another + * `Option`, a plain value, or a function. * - * **Behavior** + * **Details** * * - If `self` is `None`, returns `None` immediately * - If `f` is a function, calls it with the `Some` value @@ -2122,7 +2062,7 @@ export declare const andThen: { * @see {@link flatMap} for the standard monadic bind * @see {@link map} when you always return a plain value * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ (self: Option, f: Option): Option; @@ -2132,10 +2072,10 @@ export declare const andThen: { * * **When to use** * - * - Flexible chaining where the next step may return `Option`, a plain value, - * or a function + * Use when you need to chain an `Option` with a next step that may be another + * `Option`, a plain value, or a function. * - * **Behavior** + * **Details** * * - If `self` is `None`, returns `None` immediately * - If `f` is a function, calls it with the `Some` value @@ -2163,7 +2103,7 @@ export declare const andThen: { * @see {@link flatMap} for the standard monadic bind * @see {@link map} when you always return a plain value * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ (self: Option, f: (a: A) => B): Option; @@ -2173,10 +2113,10 @@ export declare const andThen: { * * **When to use** * - * - Flexible chaining where the next step may return `Option`, a plain value, - * or a function + * Use when you need to chain an `Option` with a next step that may be another + * `Option`, a plain value, or a function. * - * **Behavior** + * **Details** * * - If `self` is `None`, returns `None` immediately * - If `f` is a function, calls it with the `Some` value @@ -2204,7 +2144,7 @@ export declare const andThen: { * @see {@link flatMap} for the standard monadic bind * @see {@link map} when you always return a plain value * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ (self: Option, f: NotFunction): Option; @@ -2215,10 +2155,10 @@ export declare const andThen: { * * **When to use** * - * - Chaining with functions that use `null`/`undefined` instead of `Option` - * - Navigating deeply nested optional properties + * Use when you need to chain optional computations that use `null` or + * `undefined` instead of `Option`, such as nested property access. * - * **Behavior** + * **Details** * * - `None` → `None` * - `Some` → applies `f`, then wraps via {@link fromNullishOr} @@ -2247,8 +2187,8 @@ export declare const andThen: { * @see {@link flatMap} when the function already returns `Option` * @see {@link fromNullishOr} for single-value conversion * - * @category Sequencing - * @since 2.0.0 + * @category sequencing + * @since 4.0.0 */ export declare const flatMapNullishOr: { /** @@ -2257,10 +2197,10 @@ export declare const flatMapNullishOr: { * * **When to use** * - * - Chaining with functions that use `null`/`undefined` instead of `Option` - * - Navigating deeply nested optional properties + * Use when you need to chain optional computations that use `null` or + * `undefined` instead of `Option`, such as nested property access. * - * **Behavior** + * **Details** * * - `None` → `None` * - `Some` → applies `f`, then wraps via {@link fromNullishOr} @@ -2289,8 +2229,8 @@ export declare const flatMapNullishOr: { * @see {@link flatMap} when the function already returns `Option` * @see {@link fromNullishOr} for single-value conversion * - * @category Sequencing - * @since 2.0.0 + * @category sequencing + * @since 4.0.0 */ (f: (a: A) => B): (self: Option) => Option>; /** @@ -2299,10 +2239,10 @@ export declare const flatMapNullishOr: { * * **When to use** * - * - Chaining with functions that use `null`/`undefined` instead of `Option` - * - Navigating deeply nested optional properties + * Use when you need to chain optional computations that use `null` or + * `undefined` instead of `Option`, such as nested property access. * - * **Behavior** + * **Details** * * - `None` → `None` * - `Some` → applies `f`, then wraps via {@link fromNullishOr} @@ -2331,8 +2271,8 @@ export declare const flatMapNullishOr: { * @see {@link flatMap} when the function already returns `Option` * @see {@link fromNullishOr} for single-value conversion * - * @category Sequencing - * @since 2.0.0 + * @category sequencing + * @since 4.0.0 */ (self: Option, f: (a: A) => B): Option>; }; @@ -2341,9 +2281,9 @@ export declare const flatMapNullishOr: { * * **When to use** * - * - Removing one layer of `Option` nesting + * Use when you need to remove one layer of nested `Option`. * - * **Behavior** + * **Details** * * - `Some(Some(value))` → `Some(value)` * - `Some(None)` → `None` @@ -2363,7 +2303,7 @@ export declare const flatMapNullishOr: { * * @see {@link flatMap} which is `map` + `flatten` * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ export declare const flatten: (self: Option>) => Option; @@ -2372,9 +2312,10 @@ export declare const flatten: (self: Option>) => Option; * * **When to use** * - * - Running a side-condition that must succeed, then using the second value + * Use when you need two `Option` values to both be `Some`, then keep only the + * second value. * - * **Behavior** + * **Details** * * - Both `Some` → returns `that` * - Either `None` → returns `None` @@ -2394,7 +2335,7 @@ export declare const flatten: (self: Option>) => Option; * @see {@link zipLeft} to keep the first value instead * @see {@link zipWith} to combine both values * - * @category Zipping + * @category zipping * @since 2.0.0 */ export declare const zipRight: { @@ -2403,9 +2344,10 @@ export declare const zipRight: { * * **When to use** * - * - Running a side-condition that must succeed, then using the second value + * Use when you need two `Option` values to both be `Some`, then keep only the + * second value. * - * **Behavior** + * **Details** * * - Both `Some` → returns `that` * - Either `None` → returns `None` @@ -2425,7 +2367,7 @@ export declare const zipRight: { * @see {@link zipLeft} to keep the first value instead * @see {@link zipWith} to combine both values * - * @category Zipping + * @category zipping * @since 2.0.0 */ (that: Option): <_>(self: Option<_>) => Option; @@ -2434,9 +2376,10 @@ export declare const zipRight: { * * **When to use** * - * - Running a side-condition that must succeed, then using the second value + * Use when you need two `Option` values to both be `Some`, then keep only the + * second value. * - * **Behavior** + * **Details** * * - Both `Some` → returns `that` * - Either `None` → returns `None` @@ -2456,7 +2399,7 @@ export declare const zipRight: { * @see {@link zipLeft} to keep the first value instead * @see {@link zipWith} to combine both values * - * @category Zipping + * @category zipping * @since 2.0.0 */ (self: Option, that: Option): Option; @@ -2466,9 +2409,10 @@ export declare const zipRight: { * * **When to use** * - * - Running a validation that must succeed, but keeping the original value + * Use when you need two `Option` values to both be `Some`, then keep only the + * first value. * - * **Behavior** + * **Details** * * - Both `Some` → returns `self` * - Either `None` → returns `None` @@ -2488,7 +2432,7 @@ export declare const zipRight: { * @see {@link zipRight} to keep the second value instead * @see {@link zipWith} to combine both values * - * @category Zipping + * @category zipping * @since 2.0.0 */ export declare const zipLeft: { @@ -2497,9 +2441,10 @@ export declare const zipLeft: { * * **When to use** * - * - Running a validation that must succeed, but keeping the original value + * Use when you need two `Option` values to both be `Some`, then keep only the + * first value. * - * **Behavior** + * **Details** * * - Both `Some` → returns `self` * - Either `None` → returns `None` @@ -2519,7 +2464,7 @@ export declare const zipLeft: { * @see {@link zipRight} to keep the second value instead * @see {@link zipWith} to combine both values * - * @category Zipping + * @category zipping * @since 2.0.0 */ <_>(that: Option<_>): (self: Option) => Option; @@ -2528,9 +2473,10 @@ export declare const zipLeft: { * * **When to use** * - * - Running a validation that must succeed, but keeping the original value + * Use when you need two `Option` values to both be `Some`, then keep only the + * first value. * - * **Behavior** + * **Details** * * - Both `Some` → returns `self` * - Either `None` → returns `None` @@ -2550,7 +2496,7 @@ export declare const zipLeft: { * @see {@link zipRight} to keep the second value instead * @see {@link zipWith} to combine both values * - * @category Zipping + * @category zipping * @since 2.0.0 */ (self: Option, that: Option): Option; @@ -2561,9 +2507,10 @@ export declare const zipLeft: { * * **When to use** * - * - Building pipelines of partial functions (Kleisli composition) + * Use when you need to compose two functions that each return an `Option`, so + * `None` short-circuits without calling the next function. * - * **Behavior** + * **Details** * * - Calls `afb(a)`, then if `Some`, calls `bfc` with its value * - Short-circuits to `None` if either function returns `None` @@ -2590,7 +2537,7 @@ export declare const zipLeft: { * * @see {@link flatMap} for single-step chaining * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ export declare const composeK: { @@ -2600,9 +2547,10 @@ export declare const composeK: { * * **When to use** * - * - Building pipelines of partial functions (Kleisli composition) + * Use when you need to compose two functions that each return an `Option`, so + * `None` short-circuits without calling the next function. * - * **Behavior** + * **Details** * * - Calls `afb(a)`, then if `Some`, calls `bfc` with its value * - Short-circuits to `None` if either function returns `None` @@ -2629,7 +2577,7 @@ export declare const composeK: { * * @see {@link flatMap} for single-step chaining * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ (bfc: (b: B) => Option): (afb: (a: A) => Option) => (a: A) => Option; @@ -2639,9 +2587,10 @@ export declare const composeK: { * * **When to use** * - * - Building pipelines of partial functions (Kleisli composition) + * Use when you need to compose two functions that each return an `Option`, so + * `None` short-circuits without calling the next function. * - * **Behavior** + * **Details** * * - Calls `afb(a)`, then if `Some`, calls `bfc` with its value * - Short-circuits to `None` if either function returns `None` @@ -2668,7 +2617,7 @@ export declare const composeK: { * * @see {@link flatMap} for single-step chaining * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ (afb: (a: A) => Option, bfc: (b: B) => Option): (a: A) => Option; @@ -2680,10 +2629,10 @@ export declare const composeK: { * * **When to use** * - * - Validating a value without transforming it - * - Adding a side-condition check in a pipeline + * Use to validate an `Option`'s present value without transforming it, such as + * adding a side-condition check in a pipeline. * - * **Behavior** + * **Details** * * - `None` → `None` * - `Some` → calls `f(value)`; if result is `Some`, returns original `self`; if `None`, returns `None` @@ -2706,7 +2655,7 @@ export declare const composeK: { * @see {@link flatMap} when you want to transform the value * @see {@link filter} for predicate-based filtering * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ export declare const tap: { @@ -2717,10 +2666,10 @@ export declare const tap: { * * **When to use** * - * - Validating a value without transforming it - * - Adding a side-condition check in a pipeline + * Use to validate an `Option`'s present value without transforming it, such as + * adding a side-condition check in a pipeline. * - * **Behavior** + * **Details** * * - `None` → `None` * - `Some` → calls `f(value)`; if result is `Some`, returns original `self`; if `None`, returns `None` @@ -2743,7 +2692,7 @@ export declare const tap: { * @see {@link flatMap} when you want to transform the value * @see {@link filter} for predicate-based filtering * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ (f: (a: A) => Option): (self: Option) => Option; @@ -2754,10 +2703,10 @@ export declare const tap: { * * **When to use** * - * - Validating a value without transforming it - * - Adding a side-condition check in a pipeline + * Use to validate an `Option`'s present value without transforming it, such as + * adding a side-condition check in a pipeline. * - * **Behavior** + * **Details** * * - `None` → `None` * - `Some` → calls `f(value)`; if result is `Some`, returns original `self`; if `None`, returns `None` @@ -2780,7 +2729,7 @@ export declare const tap: { * @see {@link flatMap} when you want to transform the value * @see {@link filter} for predicate-based filtering * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ (self: Option, f: (a: A) => Option): Option; @@ -2791,9 +2740,10 @@ export declare const tap: { * * **When to use** * - * - Pairing two optional values together + * Use when you need to require two `Option` values to both be `Some` and keep + * both values as a tuple. * - * **Behavior** + * **Details** * * - Both `Some` → `Some([a, b])` * - Either `None` → `None` @@ -2813,7 +2763,7 @@ export declare const tap: { * @see {@link zipWith} to combine with a function instead of a tuple * @see {@link all} to combine many `Option`s * - * @category Combining + * @category combining * @since 2.0.0 */ export declare const product: (self: Option, that: Option) => Option<[A, B]>; @@ -2823,9 +2773,10 @@ export declare const product: (self: Option, that: Option) => Option * * **When to use** * - * - Collecting several `Option`s of the same type into a non-empty tuple + * Use when you need several `Option` values of the same type to all be `Some` + * and return them as a non-empty tuple. * - * **Behavior** + * **Details** * * - All `Some` → `Some([self.value, ...rest])` * - Any `None` → `None` @@ -2848,7 +2799,7 @@ export declare const product: (self: Option, that: Option) => Option * @see {@link product} for combining exactly two * @see {@link all} for tuples, structs, and iterables * - * @category Combining + * @category combining * @since 2.0.0 */ export declare const productMany: (self: Option, collection: Iterable>) => Option<[A, ...Array]>; @@ -2858,10 +2809,10 @@ export declare const productMany: (self: Option, collection: Iterable(self: Option, collection: Iterable> | Record>>(input: I) => [I] extends [ReadonlyArray>] ? Option<{ @@ -2907,9 +2858,10 @@ export declare const all: > | Record> | Record(that: Option, f: (a: A, b: B) => C): (self: Option) => Option; @@ -2977,9 +2930,10 @@ export declare const zipWith: { * * **When to use** * - * - Merging two optional values into a computed result + * Use when you need to combine two present `Option` values into a computed + * result. * - * **Behavior** + * **Details** * * - Both `Some` → applies `f(a, b)` and wraps in `Some` * - Either `None` → `None` @@ -3003,7 +2957,7 @@ export declare const zipWith: { * @see {@link product} to combine into a tuple instead * @see {@link lift2} to lift a binary function * - * @category Zipping + * @category zipping * @since 2.0.0 */ (self: Option, that: Option, f: (a: A, b: B) => C): Option; @@ -3013,9 +2967,10 @@ export declare const zipWith: { * * **When to use** * - * - Aggregating values from a collection where some may be absent + * Use when you need to aggregate values from a collection where some may be + * absent. * - * **Behavior** + * **Details** * * - Iterates through the collection, applying `f` only to `Some` values * - `None` values are skipped entirely @@ -3032,7 +2987,7 @@ export declare const zipWith: { * // Output: 3 * ``` * - * @category Reducing + * @category reducing * @since 2.0.0 */ export declare const reduceCompact: { @@ -3041,9 +2996,10 @@ export declare const reduceCompact: { * * **When to use** * - * - Aggregating values from a collection where some may be absent + * Use when you need to aggregate values from a collection where some may be + * absent. * - * **Behavior** + * **Details** * * - Iterates through the collection, applying `f` only to `Some` values * - `None` values are skipped entirely @@ -3060,7 +3016,7 @@ export declare const reduceCompact: { * // Output: 3 * ``` * - * @category Reducing + * @category reducing * @since 2.0.0 */ (b: B, f: (b: B, a: A) => B): (self: Iterable>) => B; @@ -3069,9 +3025,10 @@ export declare const reduceCompact: { * * **When to use** * - * - Aggregating values from a collection where some may be absent + * Use when you need to aggregate values from a collection where some may be + * absent. * - * **Behavior** + * **Details** * * - Iterates through the collection, applying `f` only to `Some` values * - `None` values are skipped entirely @@ -3088,7 +3045,7 @@ export declare const reduceCompact: { * // Output: 3 * ``` * - * @category Reducing + * @category reducing * @since 2.0.0 */ (self: Iterable>, b: B, f: (b: B, a: A) => B): B; @@ -3098,10 +3055,10 @@ export declare const reduceCompact: { * * **When to use** * - * - Interfacing with array-based APIs - * - Spreading optional values into collections + * Use when you need to pass an `Option` to array-based APIs or spread optional + * values into collections. * - * **Behavior** + * **Details** * * - `Some` → single-element array `[value]` * - `None` → empty array `[]` @@ -3120,7 +3077,7 @@ export declare const reduceCompact: { * * @see {@link fromIterable} for the inverse direction * - * @category Conversions + * @category converting * @since 2.0.0 */ export declare const toArray: (self: Option) => Array; @@ -3129,9 +3086,10 @@ export declare const toArray: (self: Option) => Array; * * **When to use** * - * - Categorizing an optional value into "left" (failure) and "right" (success) channels + * Use when you need to split an optional value into "left" and "right" + * channels using a `Result`-returning function. * - * **Behavior** + * **Details** * * - `None` → `[None, None]` * - `Some` where `f` returns `Err` → `[Some(error), None]` @@ -3159,7 +3117,7 @@ export declare const toArray: (self: Option) => Array; * * @see {@link filter} for simple predicate-based filtering * - * @category Filtering + * @category filtering * @since 2.0.0 */ export declare const partitionMap: { @@ -3168,9 +3126,10 @@ export declare const partitionMap: { * * **When to use** * - * - Categorizing an optional value into "left" (failure) and "right" (success) channels + * Use when you need to split an optional value into "left" and "right" + * channels using a `Result`-returning function. * - * **Behavior** + * **Details** * * - `None` → `[None, None]` * - `Some` where `f` returns `Err` → `[Some(error), None]` @@ -3198,7 +3157,7 @@ export declare const partitionMap: { * * @see {@link filter} for simple predicate-based filtering * - * @category Filtering + * @category filtering * @since 2.0.0 */ (f: (a: A) => Result): (self: Option) => [left: Option, right: Option]; @@ -3207,9 +3166,10 @@ export declare const partitionMap: { * * **When to use** * - * - Categorizing an optional value into "left" (failure) and "right" (success) channels + * Use when you need to split an optional value into "left" and "right" + * channels using a `Result`-returning function. * - * **Behavior** + * **Details** * * - `None` → `[None, None]` * - `Some` where `f` returns `Err` → `[Some(error), None]` @@ -3237,7 +3197,7 @@ export declare const partitionMap: { * * @see {@link filter} for simple predicate-based filtering * - * @category Filtering + * @category filtering * @since 2.0.0 */ (self: Option, f: (a: A) => Result): [left: Option, right: Option]; @@ -3245,14 +3205,20 @@ export declare const partitionMap: { /** * Transforms and filters an `Option` using a `Filter` callback. * + * **When to use** + * + * Use to transform an `Option`'s present value and discard it when the `Filter` + * fails. + * + * **Details** + * * The callback returns a `Result`: `Result.succeed` keeps and transforms the * value, while `Result.fail` discards it. * * **Example** (Filtering and transforming) * * ```ts - * import { Option } from "effect" - * import * as Result from "effect/Result" + * import { Option, Result } from "effect" * * console.log(Option.filterMap( * Option.some(2), @@ -3263,21 +3229,27 @@ export declare const partitionMap: { * * @see {@link filter} for predicate-based filtering * - * @category Filtering + * @category filtering * @since 2.0.0 */ export declare const filterMap: { /** * Transforms and filters an `Option` using a `Filter` callback. * + * **When to use** + * + * Use to transform an `Option`'s present value and discard it when the `Filter` + * fails. + * + * **Details** + * * The callback returns a `Result`: `Result.succeed` keeps and transforms the * value, while `Result.fail` discards it. * * **Example** (Filtering and transforming) * * ```ts - * import { Option } from "effect" - * import * as Result from "effect/Result" + * import { Option, Result } from "effect" * * console.log(Option.filterMap( * Option.some(2), @@ -3288,21 +3260,27 @@ export declare const filterMap: { * * @see {@link filter} for predicate-based filtering * - * @category Filtering + * @category filtering * @since 2.0.0 */ (f: Filter.Filter): (self: Option) => Option; /** * Transforms and filters an `Option` using a `Filter` callback. * + * **When to use** + * + * Use to transform an `Option`'s present value and discard it when the `Filter` + * fails. + * + * **Details** + * * The callback returns a `Result`: `Result.succeed` keeps and transforms the * value, while `Result.fail` discards it. * * **Example** (Filtering and transforming) * * ```ts - * import { Option } from "effect" - * import * as Result from "effect/Result" + * import { Option, Result } from "effect" * * console.log(Option.filterMap( * Option.some(2), @@ -3313,7 +3291,7 @@ export declare const filterMap: { * * @see {@link filter} for predicate-based filtering * - * @category Filtering + * @category filtering * @since 2.0.0 */ (self: Option, f: Filter.Filter): Option; @@ -3324,10 +3302,10 @@ export declare const filterMap: { * * **When to use** * - * - Discarding values that don't meet a condition - * - Narrowing the type via a refinement predicate + * Use when you need to discard an `Option`'s present value when it does not + * meet a condition, while narrowing the type via a refinement predicate. * - * **Behavior** + * **Details** * * - `None` → `None` * - `Some` where `predicate(value)` is `true` → `Some(value)` @@ -3355,7 +3333,7 @@ export declare const filterMap: { * @see {@link filterMap} to transform and filter simultaneously * @see {@link exists} to test without filtering * - * @category Filtering + * @category filtering * @since 2.0.0 */ export declare const filter: { @@ -3365,10 +3343,10 @@ export declare const filter: { * * **When to use** * - * - Discarding values that don't meet a condition - * - Narrowing the type via a refinement predicate + * Use when you need to discard an `Option`'s present value when it does not + * meet a condition, while narrowing the type via a refinement predicate. * - * **Behavior** + * **Details** * * - `None` → `None` * - `Some` where `predicate(value)` is `true` → `Some(value)` @@ -3396,7 +3374,7 @@ export declare const filter: { * @see {@link filterMap} to transform and filter simultaneously * @see {@link exists} to test without filtering * - * @category Filtering + * @category filtering * @since 2.0.0 */ (refinement: Refinement): (self: Option) => Option; @@ -3406,10 +3384,10 @@ export declare const filter: { * * **When to use** * - * - Discarding values that don't meet a condition - * - Narrowing the type via a refinement predicate + * Use when you need to discard an `Option`'s present value when it does not + * meet a condition, while narrowing the type via a refinement predicate. * - * **Behavior** + * **Details** * * - `None` → `None` * - `Some` where `predicate(value)` is `true` → `Some(value)` @@ -3437,7 +3415,7 @@ export declare const filter: { * @see {@link filterMap} to transform and filter simultaneously * @see {@link exists} to test without filtering * - * @category Filtering + * @category filtering * @since 2.0.0 */ (predicate: Predicate): (self: Option) => Option; @@ -3447,10 +3425,10 @@ export declare const filter: { * * **When to use** * - * - Discarding values that don't meet a condition - * - Narrowing the type via a refinement predicate + * Use when you need to discard an `Option`'s present value when it does not + * meet a condition, while narrowing the type via a refinement predicate. * - * **Behavior** + * **Details** * * - `None` → `None` * - `Some` where `predicate(value)` is `true` → `Some(value)` @@ -3478,7 +3456,7 @@ export declare const filter: { * @see {@link filterMap} to transform and filter simultaneously * @see {@link exists} to test without filtering * - * @category Filtering + * @category filtering * @since 2.0.0 */ (self: Option, refinement: Refinement): Option; @@ -3488,10 +3466,10 @@ export declare const filter: { * * **When to use** * - * - Discarding values that don't meet a condition - * - Narrowing the type via a refinement predicate + * Use when you need to discard an `Option`'s present value when it does not + * meet a condition, while narrowing the type via a refinement predicate. * - * **Behavior** + * **Details** * * - `None` → `None` * - `Some` where `predicate(value)` is `true` → `Some(value)` @@ -3519,7 +3497,7 @@ export declare const filter: { * @see {@link filterMap} to transform and filter simultaneously * @see {@link exists} to test without filtering * - * @category Filtering + * @category filtering * @since 2.0.0 */ (self: Option, predicate: Predicate): Option; @@ -3529,9 +3507,10 @@ export declare const filter: { * * **When to use** * - * - Comparing two `Option` values for structural equality + * Use when you need equality to treat two `None` values as equal and compare + * two `Some` values with a supplied equality rule. * - * **Behavior** + * **Details** * * - `None` vs `None` → `true` * - `Some` vs `None` (or vice versa) → `false` @@ -3554,8 +3533,8 @@ export declare const filter: { * // Output: true * ``` * - * @category Equivalence - * @since 2.0.0 + * @category instances + * @since 4.0.0 */ export declare const makeEquivalence: (isEquivalent: Equivalence.Equivalence) => Equivalence.Equivalence>; /** @@ -3563,9 +3542,11 @@ export declare const makeEquivalence: (isEquivalent: Equivalence.Equivalence< * * **When to use** * - * - Sorting collections of `Option` values + * Use when you need to sort `Some` and `None` values, with `None` ordered + * before present values and present values compared by a supplied ordering + * rule. * - * **Behavior** + * **Details** * * - `None` is considered less than any `Some` * - Two `Some` values are compared using the provided `Order` @@ -3574,8 +3555,7 @@ export declare const makeEquivalence: (isEquivalent: Equivalence.Equivalence< * **Example** (Ordering Options) * * ```ts - * import { Option } from "effect" - * import * as N from "effect/Number" + * import { Number as N, Option } from "effect" * * const ord = Option.makeOrder(N.Order) * @@ -3589,8 +3569,8 @@ export declare const makeEquivalence: (isEquivalent: Equivalence.Equivalence< * // Output: -1 * ``` * - * @category Sorting - * @since 2.0.0 + * @category sorting + * @since 4.0.0 */ export declare const makeOrder: (O: Order) => Order>; /** @@ -3598,9 +3578,10 @@ export declare const makeOrder: (O: Order) => Order>; * * **When to use** * - * - Reusing an existing binary function in an `Option` context + * Use when you need to reuse an existing binary function with two `Option` + * values. * - * **Behavior** + * **Details** * * - Both `Some` → applies `f` and wraps in `Some` * - Either `None` → `None` @@ -3621,7 +3602,7 @@ export declare const makeOrder: (O: Order) => Order>; * * @see {@link zipWith} for a non-lifted variant * - * @category Lifting + * @category lifting * @since 2.0.0 */ export declare const lift2: (f: (a: A, b: B) => C) => { @@ -3634,10 +3615,10 @@ export declare const lift2: (f: (a: A, b: B) => C) => { * * **When to use** * - * - Converting a boolean check into an `Option`-returning function + * Use to convert a boolean check into an `Option`-returning function * - Validating input and wrapping it in `Option` * - * **Behavior** + * **Details** * * - `predicate(value)` is `true` → `Some(value)` * - `predicate(value)` is `false` → `None` @@ -3660,7 +3641,7 @@ export declare const lift2: (f: (a: A, b: B) => C) => { * @see {@link filter} to apply a predicate to an existing `Option` * @see {@link toRefinement} for the inverse direction * - * @category Lifting + * @category lifting * @since 2.0.0 */ export declare const liftPredicate: { @@ -3671,10 +3652,10 @@ export declare const liftPredicate: { * * **When to use** * - * - Converting a boolean check into an `Option`-returning function + * Use to convert a boolean check into an `Option`-returning function * - Validating input and wrapping it in `Option` * - * **Behavior** + * **Details** * * - `predicate(value)` is `true` → `Some(value)` * - `predicate(value)` is `false` → `None` @@ -3697,7 +3678,7 @@ export declare const liftPredicate: { * @see {@link filter} to apply a predicate to an existing `Option` * @see {@link toRefinement} for the inverse direction * - * @category Lifting + * @category lifting * @since 2.0.0 */ (predicate: Predicate): (b: B) => Option; @@ -3707,10 +3688,10 @@ export declare const liftPredicate: { * * **When to use** * - * - Converting a boolean check into an `Option`-returning function + * Use to convert a boolean check into an `Option`-returning function * - Validating input and wrapping it in `Option` * - * **Behavior** + * **Details** * * - `predicate(value)` is `true` → `Some(value)` * - `predicate(value)` is `false` → `None` @@ -3733,7 +3714,7 @@ export declare const liftPredicate: { * @see {@link filter} to apply a predicate to an existing `Option` * @see {@link toRefinement} for the inverse direction * - * @category Lifting + * @category lifting * @since 2.0.0 */ (self: A, refinement: Refinement): Option; @@ -3743,10 +3724,10 @@ export declare const liftPredicate: { * * **When to use** * - * - Converting a boolean check into an `Option`-returning function + * Use to convert a boolean check into an `Option`-returning function * - Validating input and wrapping it in `Option` * - * **Behavior** + * **Details** * * - `predicate(value)` is `true` → `Some(value)` * - `predicate(value)` is `false` → `None` @@ -3769,20 +3750,21 @@ export declare const liftPredicate: { * @see {@link filter} to apply a predicate to an existing `Option` * @see {@link toRefinement} for the inverse direction * - * @category Lifting + * @category lifting * @since 2.0.0 */ (self: B, predicate: Predicate): Option; }; /** - * Checks if an `Option` contains a value equivalent to the given one, using a + * Checks whether an `Option` contains a value equivalent to the given one, using a * custom `Equivalence`. * * **When to use** * - * - Testing membership with a custom equality check + * Use when you need to test whether an `Option` contains a value using a + * custom equality check. * - * **Behavior** + * **Details** * * - `Some` where `isEquivalent(value, a)` is `true` → `true` * - `Some` where not equivalent, or `None` → `false` @@ -3806,7 +3788,7 @@ export declare const liftPredicate: { * * @see {@link contains} for a version using default equality * - * @category Elements + * @category elements * @since 2.0.0 */ export declare const containsWith: (isEquivalent: (self: A, that: A) => boolean) => { @@ -3814,14 +3796,15 @@ export declare const containsWith: (isEquivalent: (self: A, that: A) => boole (self: Option, a: A): boolean; }; /** - * Checks if an `Option` contains a value equal to the given one, using default + * Checks whether an `Option` contains a value equal to the given one, using default * structural equality. * * **When to use** * - * - Quick membership test with standard equality + * Use when you need a quick membership test for an `Option` value using + * standard equality. * - * **Behavior** + * **Details** * * - `Some` where `Equal.equals(value, a)` is `true` → `true` * - `Some` where not equal, or `None` → `false` @@ -3844,19 +3827,20 @@ export declare const containsWith: (isEquivalent: (self: A, that: A) => boole * @see {@link containsWith} for custom equality * @see {@link exists} to test with a predicate * - * @category Elements + * @category elements * @since 2.0.0 */ export declare const contains: { /** - * Checks if an `Option` contains a value equal to the given one, using default + * Checks whether an `Option` contains a value equal to the given one, using default * structural equality. * * **When to use** * - * - Quick membership test with standard equality + * Use when you need a quick membership test for an `Option` value using + * standard equality. * - * **Behavior** + * **Details** * * - `Some` where `Equal.equals(value, a)` is `true` → `true` * - `Some` where not equal, or `None` → `false` @@ -3879,19 +3863,20 @@ export declare const contains: { * @see {@link containsWith} for custom equality * @see {@link exists} to test with a predicate * - * @category Elements + * @category elements * @since 2.0.0 */ (a: A): (self: Option) => boolean; /** - * Checks if an `Option` contains a value equal to the given one, using default + * Checks whether an `Option` contains a value equal to the given one, using default * structural equality. * * **When to use** * - * - Quick membership test with standard equality + * Use when you need a quick membership test for an `Option` value using + * standard equality. * - * **Behavior** + * **Details** * * - `Some` where `Equal.equals(value, a)` is `true` → `true` * - `Some` where not equal, or `None` → `false` @@ -3914,19 +3899,19 @@ export declare const contains: { * @see {@link containsWith} for custom equality * @see {@link exists} to test with a predicate * - * @category Elements + * @category elements * @since 2.0.0 */ (self: Option, a: A): boolean; }; /** - * Tests if the value in a `Some` satisfies a predicate or refinement. + * Checks whether the value in a `Some` satisfies a predicate or refinement. * * **When to use** * - * - Checking a condition on an optional value without unwrapping + * Use to check a condition on an optional value without unwrapping * - * **Behavior** + * **Details** * * - `None` → `false` * - `Some` where `predicate(value)` is `true` → `true` @@ -3953,18 +3938,18 @@ export declare const contains: { * @see {@link filter} to keep or discard based on a predicate * @see {@link contains} to test for a specific value * - * @category Elements + * @category elements * @since 2.0.0 */ export declare const exists: { /** - * Tests if the value in a `Some` satisfies a predicate or refinement. + * Checks whether the value in a `Some` satisfies a predicate or refinement. * * **When to use** * - * - Checking a condition on an optional value without unwrapping + * Use to check a condition on an optional value without unwrapping * - * **Behavior** + * **Details** * * - `None` → `false` * - `Some` where `predicate(value)` is `true` → `true` @@ -3991,18 +3976,18 @@ export declare const exists: { * @see {@link filter} to keep or discard based on a predicate * @see {@link contains} to test for a specific value * - * @category Elements + * @category elements * @since 2.0.0 */ (refinement: Refinement, B>): (self: Option) => self is Option; /** - * Tests if the value in a `Some` satisfies a predicate or refinement. + * Checks whether the value in a `Some` satisfies a predicate or refinement. * * **When to use** * - * - Checking a condition on an optional value without unwrapping + * Use to check a condition on an optional value without unwrapping * - * **Behavior** + * **Details** * * - `None` → `false` * - `Some` where `predicate(value)` is `true` → `true` @@ -4029,18 +4014,18 @@ export declare const exists: { * @see {@link filter} to keep or discard based on a predicate * @see {@link contains} to test for a specific value * - * @category Elements + * @category elements * @since 2.0.0 */ (predicate: Predicate>): (self: Option) => boolean; /** - * Tests if the value in a `Some` satisfies a predicate or refinement. + * Checks whether the value in a `Some` satisfies a predicate or refinement. * * **When to use** * - * - Checking a condition on an optional value without unwrapping + * Use to check a condition on an optional value without unwrapping * - * **Behavior** + * **Details** * * - `None` → `false` * - `Some` where `predicate(value)` is `true` → `true` @@ -4067,18 +4052,18 @@ export declare const exists: { * @see {@link filter} to keep or discard based on a predicate * @see {@link contains} to test for a specific value * - * @category Elements + * @category elements * @since 2.0.0 */ (self: Option, refinement: Refinement): self is Option; /** - * Tests if the value in a `Some` satisfies a predicate or refinement. + * Checks whether the value in a `Some` satisfies a predicate or refinement. * * **When to use** * - * - Checking a condition on an optional value without unwrapping + * Use to check a condition on an optional value without unwrapping * - * **Behavior** + * **Details** * * - `None` → `false` * - `Some` where `predicate(value)` is `true` → `true` @@ -4105,7 +4090,7 @@ export declare const exists: { * @see {@link filter} to keep or discard based on a predicate * @see {@link contains} to test for a specific value * - * @category Elements + * @category elements * @since 2.0.0 */ (self: Option, predicate: Predicate): boolean; @@ -4116,7 +4101,8 @@ export declare const exists: { * * **When to use** * - * - Beginning a do notation chain by naming the first value + * Use when you need to start an `Option` do notation chain by naming the first + * value. * * **Example** (Starting do notation) * @@ -4137,7 +4123,7 @@ export declare const exists: { * @see {@link bind} to add `Option` values * @see {@link let_ let} to add plain values * - * @category Do notation + * @category do notation * @since 2.0.0 */ export declare const bindTo: { @@ -4147,7 +4133,8 @@ export declare const bindTo: { * * **When to use** * - * - Beginning a do notation chain by naming the first value + * Use when you need to start an `Option` do notation chain by naming the first + * value. * * **Example** (Starting do notation) * @@ -4168,7 +4155,7 @@ export declare const bindTo: { * @see {@link bind} to add `Option` values * @see {@link let_ let} to add plain values * - * @category Do notation + * @category do notation * @since 2.0.0 */ (name: N): (self: Option) => Option<{ @@ -4180,7 +4167,8 @@ export declare const bindTo: { * * **When to use** * - * - Beginning a do notation chain by naming the first value + * Use when you need to start an `Option` do notation chain by naming the first + * value. * * **Example** (Starting do notation) * @@ -4201,7 +4189,7 @@ export declare const bindTo: { * @see {@link bind} to add `Option` values * @see {@link let_ let} to add plain values * - * @category Do notation + * @category do notation * @since 2.0.0 */ (self: Option, name: N): Option<{ @@ -4222,7 +4210,8 @@ export { * * **When to use** * - * - Binding a derived (non-`Option`) value in a do notation pipeline + * Use when you need to bind a derived non-`Option` value in an `Option` do + * notation pipeline. * * **Example** (Adding a computed value) * @@ -4243,7 +4232,7 @@ export { * @see {@link bind} to add `Option` values * @see {@link bindTo} to start by naming an existing `Option` * - * @category Do notation + * @category do notation * @since 2.0.0 */ let_ as let }; @@ -4253,7 +4242,7 @@ let_ as let }; * * **When to use** * - * - Sequencing `Option` computations in do notation + * Use when you need to sequence `Option` computations in do notation. * * **Example** (Binding Option values) * @@ -4275,7 +4264,7 @@ let_ as let }; * @see {@link let_ let} to add plain values * @see {@link bindTo} to start by naming an existing `Option` * - * @category Do notation + * @category do notation * @since 2.0.0 */ export declare const bind: { @@ -4285,7 +4274,7 @@ export declare const bind: { * * **When to use** * - * - Sequencing `Option` computations in do notation + * Use when you need to sequence `Option` computations in do notation. * * **Example** (Binding Option values) * @@ -4307,7 +4296,7 @@ export declare const bind: { * @see {@link let_ let} to add plain values * @see {@link bindTo} to start by naming an existing `Option` * - * @category Do notation + * @category do notation * @since 2.0.0 */ (name: Exclude, f: (a: NoInfer) => Option): (self: Option) => Option<{ @@ -4319,7 +4308,7 @@ export declare const bind: { * * **When to use** * - * - Sequencing `Option` computations in do notation + * Use when you need to sequence `Option` computations in do notation. * * **Example** (Binding Option values) * @@ -4341,7 +4330,7 @@ export declare const bind: { * @see {@link let_ let} to add plain values * @see {@link bindTo} to start by naming an existing `Option` * - * @category Do notation + * @category do notation * @since 2.0.0 */ (self: Option, name: Exclude, f: (a: NoInfer) => Option): Option<{ @@ -4349,12 +4338,13 @@ export declare const bind: { }>; }; /** - * An `Option` containing an empty record `{}`, used as the starting point for + * Provides an `Option` containing an empty record `{}`, used as the starting point for * do notation chains. * * **When to use** * - * - Starting a do notation pipeline before adding bindings + * Use when you need to start an `Option` do notation pipeline before adding + * bindings. * * **Example** (Do notation pipeline) * @@ -4376,20 +4366,20 @@ export declare const bind: { * @see {@link let_ let} to add plain values * @see {@link bindTo} to start by naming an existing `Option` * - * @category Do notation + * @category do notation * @since 2.0.0 */ export declare const Do: Option<{}>; /** - * Generator-based syntax for `Option`, similar to `async`/`await` but for + * Provides generator-based syntax for `Option`, similar to `async`/`await` but for * optional values. Yielding a `None` short-circuits the generator to `None`. * * **When to use** * - * - Writing imperative-style code that chains multiple `Option`s - * - Readability when many sequential optional steps are involved + * Use when you need generator syntax for a sequence of `Option` steps that + * should short-circuit on `None`. * - * **Behavior** + * **Details** * * - Each `yield*` unwraps a `Some` value or short-circuits to `None` * - The return value is wrapped in `Some` @@ -4416,7 +4406,7 @@ export declare const Do: Option<{}>; * * @see {@link Do} / {@link bind} for the do notation alternative * - * @category Generators + * @category generators * @since 2.0.0 */ export declare const gen: Gen.Gen; @@ -4426,10 +4416,10 @@ export declare const gen: Gen.Gen; * * **When to use** * - * - Building a reducer that falls back to the first available value - * - Combining optional values where either side may be absent + * Use to build an `Option` reducer that falls back to the first available value + * when either side may be absent. * - * **Behavior** + * **Details** * * - `None` + `None` → `None` * - `Some(a)` + `None` → `Some(a)` @@ -4449,6 +4439,7 @@ export declare const gen: Gen.Gen; * * @see {@link makeReducerFailFast} for fail-fast semantics * + * @category Reducer * @since 4.0.0 */ export declare function makeReducer(combiner: Combiner.Combiner): Reducer.Reducer>; @@ -4458,9 +4449,10 @@ export declare function makeReducer(combiner: Combiner.Combiner): Reducer. * * **When to use** * - * - Operations that require both values to be present + * Use when you need an `Option` combiner that returns `None` unless both + * operands are `Some`. * - * **Behavior** + * **Details** * * - `None` + anything → `None` * - anything + `None` → `None` @@ -4481,6 +4473,7 @@ export declare function makeReducer(combiner: Combiner.Combiner): Reducer. * * @see {@link makeReducerFailFast} to get a full `Reducer` * + * @category Combiner * @since 4.0.0 */ export declare function makeCombinerFailFast(combiner: Combiner.Combiner): Combiner.Combiner>; @@ -4490,10 +4483,10 @@ export declare function makeCombinerFailFast(combiner: Combiner.Combiner): * * **When to use** * - * - Wrapping an existing `Reducer` to work with `Option` values - * - Reductions where any `None` should abort the entire result + * Use when you need to reduce `Option` values with fail-fast semantics, where + * any `None` aborts the entire result instead of being skipped. * - * **Behavior** + * **Details** * * - Initial value is `Some(reducer.initialValue)` * - Combines only when both operands are `Some` @@ -4515,6 +4508,7 @@ export declare function makeCombinerFailFast(combiner: Combiner.Combiner): * @see {@link makeCombinerFailFast} for just the combiner * @see {@link makeReducer} for non-fail-fast semantics * + * @category Reducer * @since 4.0.0 */ export declare function makeReducerFailFast(reducer: Reducer.Reducer): Reducer.Reducer>; diff --git a/.opencode/node_modules/effect/dist/Option.d.ts.map b/.opencode/node_modules/effect/dist/Option.d.ts.map index a4248ea4582316436a86b206a17f586281361863..f0a8afe1f372559a72c2764de34c11203e117f17 100644 --- a/.opencode/node_modules/effect/dist/Option.d.ts.map +++ b/.opencode/node_modules/effect/dist/Option.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../src/Option.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5D,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAInD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,E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;;;;;;;;;;;;GAgCG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAKpG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAW9F"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Option.js b/.opencode/node_modules/effect/dist/Option.js index 51dbdfba3f786fc0dd452c90bafb34c75c93a2e4..2033309f4e4c9124046aed4a39ab8b88b48748cf 100644 --- a/.opencode/node_modules/effect/dist/Option.js +++ b/.opencode/node_modules/effect/dist/Option.js @@ -1,3 +1,15 @@ +/** + * Models a value that may be present or absent. + * + * An `Option` is `Some` when a value is available and `None` when it is + * not. This lets code handle missing values explicitly instead of relying on + * `null` or `undefined`. The module includes helpers for creating, checking, + * transforming, combining, and extracting optional values, plus conversions to + * and from common nullable or result-like shapes. It also includes `Option.gen` + * for writing small generator-based computations that stop at the first `None`. + * + * @since 2.0.0 + */ import * as Combiner from "./Combiner.js"; import * as Equal from "./Equal.js"; import * as Equivalence from "./Equivalence.js"; @@ -14,10 +26,10 @@ const TypeId = "~effect/data/Option"; * * **When to use** * - * - Representing a missing or uninitialized value - * - Returning "no result" from a function + * Use to represent a missing or uninitialized value, such as returning "no + * result" from a function. * - * **Behavior** + * **Details** * * - Returns `Option`, which is a subtype of `Option` for any `A` * - Always returns the same singleton instance @@ -37,7 +49,7 @@ const TypeId = "~effect/data/Option"; * * @see {@link some} for the opposite operation. * - * @category Constructors + * @category constructors * @since 2.0.0 */ export const none = () => option.none; @@ -46,10 +58,10 @@ export const none = () => option.none; * * **When to use** * - * - Wrapping a known-present value as `Option` + * Use to wrap a known present value as `Option` * - Returning a successful result from a partial function * - * **Behavior** + * **Details** * * - Always returns `Some` * - Does not filter `null` or `undefined`; use {@link fromNullishOr} for that @@ -69,7 +81,7 @@ export const none = () => option.none; * * @see {@link none} for the opposite operation. * - * @category Constructors + * @category constructors * @since 2.0.0 */ export const some = option.some; @@ -78,10 +90,10 @@ export const some = option.some; * * **When to use** * - * - Validating unknown values at runtime boundaries - * - Type-narrowing in union types + * Use to validate unknown values at runtime boundaries, such as type-narrowing + * in union types. * - * **Behavior** + * **Details** * * - Returns `true` for both `Some` and `None` instances * - Acts as a type guard, narrowing the input to `Option` @@ -104,7 +116,7 @@ export const some = option.some; * @see {@link isNone} to check for `None` specifically * @see {@link isSome} to check for `Some` specifically * - * @category Guards + * @category guards * @since 2.0.0 */ export const isOption = option.isOption; @@ -113,9 +125,9 @@ export const isOption = option.isOption; * * **When to use** * - * - Branching on absence before accessing `.value` + * Use when you need to branch on an absent `Option` before accessing `.value`. * - * **Behavior** + * **Details** * * - Acts as a type guard, narrowing to `None` * @@ -133,7 +145,7 @@ export const isOption = option.isOption; * * @see {@link isSome} for the opposite check. * - * @category Guards + * @category guards * @since 2.0.0 */ export const isNone = option.isNone; @@ -142,9 +154,9 @@ export const isNone = option.isNone; * * **When to use** * - * - Branching on presence before accessing `.value` + * Use when you need to branch on a present `Option` before accessing `.value`. * - * **Behavior** + * **Details** * * - Acts as a type guard, narrowing to `Some` * @@ -162,7 +174,7 @@ export const isNone = option.isNone; * * @see {@link isNone} for the opposite check. * - * @category Guards + * @category guards * @since 2.0.0 */ export const isSome = option.isSome; @@ -171,10 +183,10 @@ export const isSome = option.isSome; * * **When to use** * - * - Exhaustively handling both branches in one expression - * - Transforming an `Option` into a plain value + * Use when you need to handle both `Some` and `None` in one expression and + * transform an `Option` into a plain value. * - * **Behavior** + * **Details** * * - If `None`, calls `onNone` and returns its result * - If `Some`, calls `onSome` with the value and returns its result @@ -196,7 +208,7 @@ export const isSome = option.isSome; * * @see {@link getOrElse} for unwrapping with a default * - * @category Pattern matching + * @category pattern matching * @since 2.0.0 */ export const match = /*#__PURE__*/dual(2, (self, { @@ -208,10 +220,10 @@ export const match = /*#__PURE__*/dual(2, (self, { * * **When to use** * - * - Turning a parsing function into a type-narrowing predicate - * - Filtering arrays with `Array.prototype.filter` + * Use when you need to turn an `Option`-returning parser into a type-narrowing + * predicate, such as for `Array.prototype.filter`. * - * **Behavior** + * **Details** * * - Returns `true` when the original function returns `Some` * - Returns `false` when the original function returns `None` @@ -240,7 +252,7 @@ export const match = /*#__PURE__*/dual(2, (self, { * * @see {@link liftPredicate} for the reverse direction * - * @category Conversions + * @category converting * @since 2.0.0 */ export const toRefinement = f => a => isSome(f(a)); @@ -250,10 +262,10 @@ export const toRefinement = f => a => isSome(f(a)); * * **When to use** * - * - Safely extracting the head of a collection - * - Working with generators or lazy iterables + * Use when you need to safely extract the head of a collection, including + * generators or lazy iterables. * - * **Behavior** + * **Details** * * - Only consumes the first element; does not iterate the rest * - Returns `None` for empty iterables @@ -272,7 +284,7 @@ export const toRefinement = f => a => isSome(f(a)); * * @see {@link toArray} for the inverse direction * - * @category Constructors + * @category constructors * @since 2.0.0 */ export const fromIterable = collection => { @@ -286,12 +298,13 @@ export const fromIterable = collection => { * * **When to use** * - * - Discarding the error channel when you only care about success + * Use when you need to discard a `Result` failure and keep only the success + * value as an `Option`. * - * **Behavior** + * **Details** * - * - `Ok` → `Some` with the success value - * - `Err` → `None` (error is discarded) + * - `Success` becomes `Some` with the success value + * - `Failure` becomes `None` and the failure value is discarded * * **Example** (Extracting the success side) * @@ -307,21 +320,22 @@ export const fromIterable = collection => { * * @see {@link getFailure} for the opposite operation. * - * @category Conversions - * @since 2.0.0 + * @category converting + * @since 4.0.0 */ export const getSuccess = result.getSuccess; /** - * Converts a `Result` into an `Option`, keeping only the error value. + * Converts a `Result` into an `Option`, keeping only the failure value. * * **When to use** * - * - Extracting the error when you don't need the success channel + * Use when you need to discard a `Result` success and keep only the failure + * value as an `Option`. * - * **Behavior** + * **Details** * - * - `Err` → `Some` with the error value - * - `Ok` → `None` (success value is discarded) + * - `Failure` becomes `Some` with the failure value + * - `Success` becomes `None` and the success value is discarded * * **Example** (Extracting the failure side) * @@ -337,8 +351,8 @@ export const getSuccess = result.getSuccess; * * @see {@link getSuccess} for the opposite operation. * - * @category Conversions - * @since 2.0.0 + * @category converting + * @since 4.0.0 */ export const getFailure = result.getFailure; /** @@ -346,10 +360,10 @@ export const getFailure = result.getFailure; * * **When to use** * - * - Providing a default value for an absent `Option` + * Use when providing a default value for an absent `Option` * - Unwrapping with lazy evaluation of the fallback * - * **Behavior** + * **Details** * * - `Some` → returns the inner value * - `None` → calls `onNone()` and returns its result @@ -371,7 +385,7 @@ export const getFailure = result.getFailure; * @see {@link getOrUndefined} to fall back to `undefined` * @see {@link getOrThrow} to throw on `None` * - * @category Getters + * @category getters * @since 2.0.0 */ export const getOrElse = /*#__PURE__*/dual(2, (self, onNone) => isNone(self) ? onNone() : self.value); @@ -380,10 +394,10 @@ export const getOrElse = /*#__PURE__*/dual(2, (self, onNone) => isNone(self) ? o * * **When to use** * - * - Chaining fallback `Option` computations - * - Building priority chains of optional values + * Use when you need a lazy fallback `Option`, such as when building priority + * chains of optional values. * - * **Behavior** + * **Details** * * - `Some` → returns `self` unchanged * - `None` → evaluates and returns `that()` @@ -404,7 +418,7 @@ export const getOrElse = /*#__PURE__*/dual(2, (self, onNone) => isNone(self) ? o * @see {@link orElseSome} to wrap the fallback value in `Some` automatically * @see {@link firstSomeOf} to pick the first `Some` from a collection * - * @category Error handling + * @category error handling * @since 2.0.0 */ export const orElse = /*#__PURE__*/dual(2, (self, that) => isNone(self) ? that() : self); @@ -414,9 +428,9 @@ export const orElse = /*#__PURE__*/dual(2, (self, that) => isNone(self) ? that() * * **When to use** * - * - Providing a default plain value (not an `Option`) as fallback + * Use when providing a default plain value (not an `Option`) as fallback * - * **Behavior** + * **Details** * * - `Some` → returns `self` unchanged * - `None` → calls `onNone()`, wraps result in `Some`, and returns it @@ -435,19 +449,19 @@ export const orElse = /*#__PURE__*/dual(2, (self, that) => isNone(self) ? that() * * @see {@link orElse} when the fallback is itself an `Option` * - * @category Error handling + * @category error handling * @since 2.0.0 */ export const orElseSome = /*#__PURE__*/dual(2, (self, onNone) => isNone(self) ? some(onNone()) : self); /** - * Like {@link orElse}, but wraps the result in a `Result` to indicate the - * source of the value. + * Returns the first available value and marks whether it came from the fallback. * * **When to use** * - * - Distinguishing whether a value came from the primary or fallback `Option` + * Use when you need to know whether a present value came from the primary or + * fallback `Option`. * - * **Behavior** + * **Details** * * - `self` is `Some` → `Some(Result.fail(value))` (value from primary) * - `self` is `None`, `that()` is `Some` → `Some(Result.succeed(value))` (value from fallback) @@ -467,8 +481,8 @@ export const orElseSome = /*#__PURE__*/dual(2, (self, onNone) => isNone(self) ? * * @see {@link orElse} for the simpler variant without source tracking * - * @category Error handling - * @since 2.0.0 + * @category error handling + * @since 4.0.0 */ export const orElseResult = /*#__PURE__*/dual(2, (self, that) => isNone(self) ? map(that(), result.succeed) : map(self, result.fail)); /** @@ -477,9 +491,9 @@ export const orElseResult = /*#__PURE__*/dual(2, (self, that) => isNone(self) ? * * **When to use** * - * - Searching for the first available value in a priority list + * Use when you need the first available `Some` value from a priority list. * - * **Behavior** + * **Details** * * - Short-circuits on the first `Some` * - Returns `None` only when every element is `None` @@ -499,7 +513,7 @@ export const orElseResult = /*#__PURE__*/dual(2, (self, that) => isNone(self) ? * * @see {@link orElse} for a two-option fallback * - * @category Error handling + * @category error handling * @since 2.0.0 */ export const firstSomeOf = collection => { @@ -516,10 +530,10 @@ export const firstSomeOf = collection => { * * **When to use** * - * - Bridging from nullable APIs to `Option` - * - Wrapping values that may be `null` or `undefined` + * Use when you need JavaScript nullish values to become absence at an API + * boundary while all other values, including falsy ones, remain present. * - * **Behavior** + * **Details** * * - `null` or `undefined` → `None` * - Any other value → `Some` (typed as `NonNullable`) @@ -543,8 +557,8 @@ export const firstSomeOf = collection => { * @see {@link fromUndefinedOr} to only treat `undefined` as absent * @see {@link liftNullishOr} to lift a nullable-returning function * - * @category Conversions - * @since 2.0.0 + * @category converting + * @since 4.0.0 */ export const fromNullishOr = a => a == null ? none() : some(a); /** @@ -553,9 +567,10 @@ export const fromNullishOr = a => a == null ? none() : some(a); * * **When to use** * - * - When `null` is a meaningful value but `undefined` means absent + * Use when you want to treat only `undefined` as absent while preserving `null` + * as a meaningful value. * - * **Behavior** + * **Details** * * - `undefined` → `None` * - Any other value (including `null`) → `Some` @@ -578,7 +593,7 @@ export const fromNullishOr = a => a == null ? none() : some(a); * @see {@link fromNullishOr} to treat both `null` and `undefined` as absent * @see {@link fromNullOr} to only treat `null` as absent * - * @category Conversions + * @category converting * @since 4.0.0 */ export const fromUndefinedOr = a => a === undefined ? none() : some(a); @@ -588,9 +603,10 @@ export const fromUndefinedOr = a => a === undefined ? none() : some(a); * * **When to use** * - * - When `undefined` is a meaningful value but `null` means absent + * Use when you want to treat only `null` as absent while preserving + * `undefined` as a meaningful value. * - * **Behavior** + * **Details** * * - `null` → `None` * - Any other value (including `undefined`) → `Some` @@ -613,7 +629,7 @@ export const fromUndefinedOr = a => a === undefined ? none() : some(a); * @see {@link fromNullishOr} to treat both `null` and `undefined` as absent * @see {@link fromUndefinedOr} to only treat `undefined` as absent * - * @category Conversions + * @category converting * @since 4.0.0 */ export const fromNullOr = a => a === null ? none() : some(a); @@ -623,9 +639,9 @@ export const fromNullOr = a => a === null ? none() : some(a); * * **When to use** * - * - Wrapping existing nullable-returning functions for use in `Option` pipelines + * Use to wrap existing nullable-returning functions for use in `Option` pipelines * - * **Behavior** + * **Details** * * - Calls the original function with the given arguments * - Wraps the result via {@link fromNullishOr} @@ -652,8 +668,8 @@ export const fromNullOr = a => a === null ? none() : some(a); * @see {@link fromNullishOr} for converting a single value * @see {@link liftThrowable} for functions that throw instead * - * @category Conversions - * @since 2.0.0 + * @category converting + * @since 4.0.0 */ export const liftNullishOr = f => (...a) => fromNullishOr(f(...a)); /** @@ -661,9 +677,9 @@ export const liftNullishOr = f => (...a) => fromNullishOr(f(...a)); * * **When to use** * - * - Interoping with APIs that use `null` for missing values + * Use when you need to pass absent `Option` values to APIs that expect `null`. * - * **Behavior** + * **Details** * * - `Some` → the inner value * - `None` → `null` @@ -683,7 +699,7 @@ export const liftNullishOr = f => (...a) => fromNullishOr(f(...a)); * @see {@link getOrUndefined} to return `undefined` instead * @see {@link getOrElse} for a custom fallback * - * @category Getters + * @category getters * @since 2.0.0 */ export const getOrNull = /*#__PURE__*/getOrElse(constNull); @@ -692,9 +708,10 @@ export const getOrNull = /*#__PURE__*/getOrElse(constNull); * * **When to use** * - * - Interoping with APIs that use `undefined` for missing values + * Use when you need to pass absent `Option` values to APIs that expect + * `undefined`. * - * **Behavior** + * **Details** * * - `Some` → the inner value * - `None` → `undefined` @@ -714,7 +731,7 @@ export const getOrNull = /*#__PURE__*/getOrElse(constNull); * @see {@link getOrNull} to return `null` instead * @see {@link getOrElse} for a custom fallback * - * @category Getters + * @category getters * @since 2.0.0 */ export const getOrUndefined = /*#__PURE__*/getOrElse(constUndefined); @@ -723,9 +740,9 @@ export const getOrUndefined = /*#__PURE__*/getOrElse(constUndefined); * * **When to use** * - * - Wrapping exception-throwing APIs (e.g. `JSON.parse`) for safe usage + * Use to wrap exception-throwing APIs (e.g. `JSON.parse`) for safe usage * - * **Behavior** + * **Details** * * - If the function returns normally → `Some` with the result * - If the function throws → `None` (exception is swallowed) @@ -746,7 +763,7 @@ export const getOrUndefined = /*#__PURE__*/getOrElse(constUndefined); * * @see {@link liftNullishOr} for nullable-returning functions * - * @category Conversions + * @category converting * @since 2.0.0 */ export const liftThrowable = f => (...a) => { @@ -761,10 +778,10 @@ export const liftThrowable = f => (...a) => { * * **When to use** * - * - Fail-fast unwrapping when absence is unexpected - * - Providing a descriptive error for debugging + * Use when you need fail-fast unwrapping of an `Option` for unexpected absence + * and want to provide a descriptive debugging error. * - * **Behavior** + * **Details** * * - `Some` → returns the inner value * - `None` → throws the value returned by `onNone()` @@ -784,7 +801,7 @@ export const liftThrowable = f => (...a) => { * @see {@link getOrThrow} for a version with a default error * @see {@link getOrElse} for a non-throwing alternative * - * @category Conversions + * @category converting * @since 2.0.0 */ export const getOrThrowWith = /*#__PURE__*/dual(2, (self, onNone) => { @@ -798,9 +815,10 @@ export const getOrThrowWith = /*#__PURE__*/dual(2, (self, onNone) => { * * **When to use** * - * - Quick fail-fast unwrapping when a generic error is acceptable + * Use when you need quick fail-fast unwrapping of an `Option` and a generic + * error is acceptable. * - * **Behavior** + * **Details** * * - `Some` → returns the inner value * - `None` → throws `new Error("getOrThrow called on a None")` @@ -820,7 +838,7 @@ export const getOrThrowWith = /*#__PURE__*/dual(2, (self, onNone) => { * @see {@link getOrThrowWith} for a custom error * @see {@link getOrElse} for a non-throwing alternative * - * @category Conversions + * @category converting * @since 2.0.0 */ export const getOrThrow = /*#__PURE__*/getOrThrowWith(() => new Error("getOrThrow called on a None")); @@ -830,14 +848,13 @@ export const getOrThrow = /*#__PURE__*/getOrThrowWith(() => new Error("getOrThro * * **When to use** * - * - Applying a pure transformation to an optional value - * - Chaining transformations in a pipeline + * Use to apply a pure transformation to an `Option`'s present value, especially + * when chaining transformations in a pipeline. * - * **Behavior** + * **Details** * * - `Some` → applies `f` and wraps the result in a new `Some` * - `None` → returns `None` unchanged - * - Does not mutate the input * * **Example** (Mapping over an Option) * @@ -854,7 +871,7 @@ export const getOrThrow = /*#__PURE__*/getOrThrowWith(() => new Error("getOrThro * @see {@link flatMap} when `f` returns an `Option` * @see {@link as} to replace the value with a constant * - * @category Mapping + * @category mapping * @since 2.0.0 */ export const map = /*#__PURE__*/dual(2, (self, f) => isNone(self) ? none() : some(f(self.value))); @@ -863,12 +880,8 @@ export const map = /*#__PURE__*/dual(2, (self, f) => isNone(self) ? none() : som * * **When to use** * - * - Preserving presence/absence while discarding the original value - * - * **Behavior** - * - * - `Some` → `Some(b)` - * - `None` → `None` + * Use when you need to replace a present `Option` value while preserving + * whether it was `Some` or `None`. * * **Example** (Replacing a value) * @@ -885,7 +898,7 @@ export const map = /*#__PURE__*/dual(2, (self, f) => isNone(self) ? none() : som * @see {@link asVoid} to replace with `undefined` * @see {@link map} for a general transformation * - * @category Mapping + * @category mapping * @since 2.0.0 */ export const as = /*#__PURE__*/dual(2, (self, b) => map(self, () => b)); @@ -895,12 +908,8 @@ export const as = /*#__PURE__*/dual(2, (self, b) => map(self, () => b)); * * **When to use** * - * - Discarding the value while preserving presence/absence - * - * **Behavior** - * - * - `Some` → `Some(undefined)` - * - `None` → `None` + * Use when you need to discard a present `Option` value while preserving + * whether it was `Some` or `None`. * * **Example** (Voiding the value) * @@ -916,18 +925,18 @@ export const as = /*#__PURE__*/dual(2, (self, b) => map(self, () => b)); * * @see {@link as} to replace with a specific constant * - * @category Mapping + * @category mapping * @since 2.0.0 */ export const asVoid = /*#__PURE__*/as(undefined); const void_ = /*#__PURE__*/some(undefined); export { /** - * A pre-built `Some(undefined)` constant. + * Provides a pre-built `Some(undefined)` constant. * * **When to use** * - * - Returning a "success with no meaningful value" from an `Option`-returning function + * Use to return a "success with no meaningful value" from an `Option`-returning function * * **Example** (Using Option.void) * @@ -940,7 +949,7 @@ export { * * @see {@link asVoid} to convert an existing `Option` to `Option` * - * @category Constructors + * @category constructors * @since 2.0.0 */ void_ as void }; @@ -950,10 +959,10 @@ void_ as void }; * * **When to use** * - * - Chaining computations that each may fail (return `None`) - * - Sequencing dependent optional operations + * Use when you need to chain dependent `Option` computations where each step + * may return `None`. * - * **Behavior** + * **Details** * * - `Some` → applies `f` to the value and returns its `Option` result * - `None` → returns `None` without calling `f` @@ -986,7 +995,7 @@ void_ as void }; * @see {@link andThen} for a more flexible variant * @see {@link flatten} to unwrap a nested `Option>` * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ export const flatMap = /*#__PURE__*/dual(2, (self, f) => isNone(self) ? none() : f(self.value)); @@ -996,10 +1005,10 @@ export const flatMap = /*#__PURE__*/dual(2, (self, f) => isNone(self) ? none() : * * **When to use** * - * - Flexible chaining where the next step may return `Option`, a plain value, - * or a function + * Use when you need to chain an `Option` with a next step that may be another + * `Option`, a plain value, or a function. * - * **Behavior** + * **Details** * * - If `self` is `None`, returns `None` immediately * - If `f` is a function, calls it with the `Some` value @@ -1027,7 +1036,7 @@ export const flatMap = /*#__PURE__*/dual(2, (self, f) => isNone(self) ? none() : * @see {@link flatMap} for the standard monadic bind * @see {@link map} when you always return a plain value * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ export const andThen = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => { @@ -1040,10 +1049,10 @@ export const andThen = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => { * * **When to use** * - * - Chaining with functions that use `null`/`undefined` instead of `Option` - * - Navigating deeply nested optional properties + * Use when you need to chain optional computations that use `null` or + * `undefined` instead of `Option`, such as nested property access. * - * **Behavior** + * **Details** * * - `None` → `None` * - `Some` → applies `f`, then wraps via {@link fromNullishOr} @@ -1072,8 +1081,8 @@ export const andThen = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => { * @see {@link flatMap} when the function already returns `Option` * @see {@link fromNullishOr} for single-value conversion * - * @category Sequencing - * @since 2.0.0 + * @category sequencing + * @since 4.0.0 */ export const flatMapNullishOr = /*#__PURE__*/dual(2, (self, f) => isNone(self) ? none() : fromNullishOr(f(self.value))); /** @@ -1081,9 +1090,9 @@ export const flatMapNullishOr = /*#__PURE__*/dual(2, (self, f) => isNone(self) ? * * **When to use** * - * - Removing one layer of `Option` nesting + * Use when you need to remove one layer of nested `Option`. * - * **Behavior** + * **Details** * * - `Some(Some(value))` → `Some(value)` * - `Some(None)` → `None` @@ -1103,7 +1112,7 @@ export const flatMapNullishOr = /*#__PURE__*/dual(2, (self, f) => isNone(self) ? * * @see {@link flatMap} which is `map` + `flatten` * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ export const flatten = /*#__PURE__*/flatMap(identity); @@ -1112,9 +1121,10 @@ export const flatten = /*#__PURE__*/flatMap(identity); * * **When to use** * - * - Running a side-condition that must succeed, then using the second value + * Use when you need two `Option` values to both be `Some`, then keep only the + * second value. * - * **Behavior** + * **Details** * * - Both `Some` → returns `that` * - Either `None` → returns `None` @@ -1134,7 +1144,7 @@ export const flatten = /*#__PURE__*/flatMap(identity); * @see {@link zipLeft} to keep the first value instead * @see {@link zipWith} to combine both values * - * @category Zipping + * @category zipping * @since 2.0.0 */ export const zipRight = /*#__PURE__*/dual(2, (self, that) => flatMap(self, () => that)); @@ -1143,9 +1153,10 @@ export const zipRight = /*#__PURE__*/dual(2, (self, that) => flatMap(self, () => * * **When to use** * - * - Running a validation that must succeed, but keeping the original value + * Use when you need two `Option` values to both be `Some`, then keep only the + * first value. * - * **Behavior** + * **Details** * * - Both `Some` → returns `self` * - Either `None` → returns `None` @@ -1165,7 +1176,7 @@ export const zipRight = /*#__PURE__*/dual(2, (self, that) => flatMap(self, () => * @see {@link zipRight} to keep the second value instead * @see {@link zipWith} to combine both values * - * @category Zipping + * @category zipping * @since 2.0.0 */ export const zipLeft = /*#__PURE__*/dual(2, (self, that) => tap(self, () => that)); @@ -1175,9 +1186,10 @@ export const zipLeft = /*#__PURE__*/dual(2, (self, that) => tap(self, () => that * * **When to use** * - * - Building pipelines of partial functions (Kleisli composition) + * Use when you need to compose two functions that each return an `Option`, so + * `None` short-circuits without calling the next function. * - * **Behavior** + * **Details** * * - Calls `afb(a)`, then if `Some`, calls `bfc` with its value * - Short-circuits to `None` if either function returns `None` @@ -1204,7 +1216,7 @@ export const zipLeft = /*#__PURE__*/dual(2, (self, that) => tap(self, () => that * * @see {@link flatMap} for single-step chaining * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ export const composeK = /*#__PURE__*/dual(2, (afb, bfc) => a => flatMap(afb(a), bfc)); @@ -1215,10 +1227,10 @@ export const composeK = /*#__PURE__*/dual(2, (afb, bfc) => a => flatMap(afb(a), * * **When to use** * - * - Validating a value without transforming it - * - Adding a side-condition check in a pipeline + * Use to validate an `Option`'s present value without transforming it, such as + * adding a side-condition check in a pipeline. * - * **Behavior** + * **Details** * * - `None` → `None` * - `Some` → calls `f(value)`; if result is `Some`, returns original `self`; if `None`, returns `None` @@ -1241,7 +1253,7 @@ export const composeK = /*#__PURE__*/dual(2, (afb, bfc) => a => flatMap(afb(a), * @see {@link flatMap} when you want to transform the value * @see {@link filter} for predicate-based filtering * - * @category Sequencing + * @category sequencing * @since 2.0.0 */ export const tap = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => map(f(a), () => a))); @@ -1251,9 +1263,10 @@ export const tap = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => map(f(a) * * **When to use** * - * - Pairing two optional values together + * Use when you need to require two `Option` values to both be `Some` and keep + * both values as a tuple. * - * **Behavior** + * **Details** * * - Both `Some` → `Some([a, b])` * - Either `None` → `None` @@ -1273,7 +1286,7 @@ export const tap = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => map(f(a) * @see {@link zipWith} to combine with a function instead of a tuple * @see {@link all} to combine many `Option`s * - * @category Combining + * @category combining * @since 2.0.0 */ export const product = (self, that) => isSome(self) && isSome(that) ? some([self.value, that.value]) : none(); @@ -1283,9 +1296,10 @@ export const product = (self, that) => isSome(self) && isSome(that) ? some([self * * **When to use** * - * - Collecting several `Option`s of the same type into a non-empty tuple + * Use when you need several `Option` values of the same type to all be `Some` + * and return them as a non-empty tuple. * - * **Behavior** + * **Details** * * - All `Some` → `Some([self.value, ...rest])` * - Any `None` → `None` @@ -1308,7 +1322,7 @@ export const product = (self, that) => isSome(self) && isSome(that) ? some([self * @see {@link product} for combining exactly two * @see {@link all} for tuples, structs, and iterables * - * @category Combining + * @category combining * @since 2.0.0 */ export const productMany = (self, collection) => { @@ -1330,10 +1344,10 @@ export const productMany = (self, collection) => { * * **When to use** * - * - Collecting multiple `Option`s into one, preserving the input shape - * - "All or nothing" combination — any `None` makes the result `None` + * Use when you need to combine multiple `Option` values into one while + * preserving the input shape, with any `None` making the result `None`. * - * **Behavior** + * **Details** * * - Tuple input → `Option` of a tuple with the same length * - Struct input → `Option` of a struct with the same keys @@ -1366,7 +1380,7 @@ export const productMany = (self, collection) => { * @see {@link product} for combining exactly two * @see {@link productMany} for a homogeneous collection * - * @category Combining + * @category combining * @since 2.0.0 */ // @ts-expect-error @@ -1396,9 +1410,10 @@ export const all = input => { * * **When to use** * - * - Merging two optional values into a computed result + * Use when you need to combine two present `Option` values into a computed + * result. * - * **Behavior** + * **Details** * * - Both `Some` → applies `f(a, b)` and wraps in `Some` * - Either `None` → `None` @@ -1422,7 +1437,7 @@ export const all = input => { * @see {@link product} to combine into a tuple instead * @see {@link lift2} to lift a binary function * - * @category Zipping + * @category zipping * @since 2.0.0 */ export const zipWith = /*#__PURE__*/dual(3, (self, that, f) => map(product(self, that), ([a, b]) => f(a, b))); @@ -1431,9 +1446,10 @@ export const zipWith = /*#__PURE__*/dual(3, (self, that, f) => map(product(self, * * **When to use** * - * - Aggregating values from a collection where some may be absent + * Use when you need to aggregate values from a collection where some may be + * absent. * - * **Behavior** + * **Details** * * - Iterates through the collection, applying `f` only to `Some` values * - `None` values are skipped entirely @@ -1450,7 +1466,7 @@ export const zipWith = /*#__PURE__*/dual(3, (self, that, f) => map(product(self, * // Output: 3 * ``` * - * @category Reducing + * @category reducing * @since 2.0.0 */ export const reduceCompact = /*#__PURE__*/dual(3, (self, b, f) => { @@ -1467,10 +1483,10 @@ export const reduceCompact = /*#__PURE__*/dual(3, (self, b, f) => { * * **When to use** * - * - Interfacing with array-based APIs - * - Spreading optional values into collections + * Use when you need to pass an `Option` to array-based APIs or spread optional + * values into collections. * - * **Behavior** + * **Details** * * - `Some` → single-element array `[value]` * - `None` → empty array `[]` @@ -1489,7 +1505,7 @@ export const reduceCompact = /*#__PURE__*/dual(3, (self, b, f) => { * * @see {@link fromIterable} for the inverse direction * - * @category Conversions + * @category converting * @since 2.0.0 */ export const toArray = self => isNone(self) ? [] : [self.value]; @@ -1498,9 +1514,10 @@ export const toArray = self => isNone(self) ? [] : [self.value]; * * **When to use** * - * - Categorizing an optional value into "left" (failure) and "right" (success) channels + * Use when you need to split an optional value into "left" and "right" + * channels using a `Result`-returning function. * - * **Behavior** + * **Details** * * - `None` → `[None, None]` * - `Some` where `f` returns `Err` → `[Some(error), None]` @@ -1528,7 +1545,7 @@ export const toArray = self => isNone(self) ? [] : [self.value]; * * @see {@link filter} for simple predicate-based filtering * - * @category Filtering + * @category filtering * @since 2.0.0 */ export const partitionMap = /*#__PURE__*/dual(2, (self, f) => { @@ -1541,14 +1558,20 @@ export const partitionMap = /*#__PURE__*/dual(2, (self, f) => { /** * Transforms and filters an `Option` using a `Filter` callback. * + * **When to use** + * + * Use to transform an `Option`'s present value and discard it when the `Filter` + * fails. + * + * **Details** + * * The callback returns a `Result`: `Result.succeed` keeps and transforms the * value, while `Result.fail` discards it. * * **Example** (Filtering and transforming) * * ```ts - * import { Option } from "effect" - * import * as Result from "effect/Result" + * import { Option, Result } from "effect" * * console.log(Option.filterMap( * Option.some(2), @@ -1559,7 +1582,7 @@ export const partitionMap = /*#__PURE__*/dual(2, (self, f) => { * * @see {@link filter} for predicate-based filtering * - * @category Filtering + * @category filtering * @since 2.0.0 */ export const filterMap = /*#__PURE__*/dual(2, (self, f) => { @@ -1575,10 +1598,10 @@ export const filterMap = /*#__PURE__*/dual(2, (self, f) => { * * **When to use** * - * - Discarding values that don't meet a condition - * - Narrowing the type via a refinement predicate + * Use when you need to discard an `Option`'s present value when it does not + * meet a condition, while narrowing the type via a refinement predicate. * - * **Behavior** + * **Details** * * - `None` → `None` * - `Some` where `predicate(value)` is `true` → `Some(value)` @@ -1606,7 +1629,7 @@ export const filterMap = /*#__PURE__*/dual(2, (self, f) => { * @see {@link filterMap} to transform and filter simultaneously * @see {@link exists} to test without filtering * - * @category Filtering + * @category filtering * @since 2.0.0 */ export const filter = /*#__PURE__*/dual(2, (self, predicate) => isNone(self) ? none() : predicate(self.value) ? some(self.value) : none()); @@ -1615,9 +1638,10 @@ export const filter = /*#__PURE__*/dual(2, (self, predicate) => isNone(self) ? n * * **When to use** * - * - Comparing two `Option` values for structural equality + * Use when you need equality to treat two `None` values as equal and compare + * two `Some` values with a supplied equality rule. * - * **Behavior** + * **Details** * * - `None` vs `None` → `true` * - `Some` vs `None` (or vice versa) → `false` @@ -1640,8 +1664,8 @@ export const filter = /*#__PURE__*/dual(2, (self, predicate) => isNone(self) ? n * // Output: true * ``` * - * @category Equivalence - * @since 2.0.0 + * @category instances + * @since 4.0.0 */ export const makeEquivalence = isEquivalent => Equivalence.make((x, y) => isNone(x) ? isNone(y) : isNone(y) ? false : isEquivalent(x.value, y.value)); /** @@ -1649,9 +1673,11 @@ export const makeEquivalence = isEquivalent => Equivalence.make((x, y) => isNone * * **When to use** * - * - Sorting collections of `Option` values + * Use when you need to sort `Some` and `None` values, with `None` ordered + * before present values and present values compared by a supplied ordering + * rule. * - * **Behavior** + * **Details** * * - `None` is considered less than any `Some` * - Two `Some` values are compared using the provided `Order` @@ -1660,8 +1686,7 @@ export const makeEquivalence = isEquivalent => Equivalence.make((x, y) => isNone * **Example** (Ordering Options) * * ```ts - * import { Option } from "effect" - * import * as N from "effect/Number" + * import { Number as N, Option } from "effect" * * const ord = Option.makeOrder(N.Order) * @@ -1675,8 +1700,8 @@ export const makeEquivalence = isEquivalent => Equivalence.make((x, y) => isNone * // Output: -1 * ``` * - * @category Sorting - * @since 2.0.0 + * @category sorting + * @since 4.0.0 */ export const makeOrder = O => order.make((self, that) => isSome(self) ? isSome(that) ? O(self.value, that.value) : 1 : -1); /** @@ -1684,9 +1709,10 @@ export const makeOrder = O => order.make((self, that) => isSome(self) ? isSome(t * * **When to use** * - * - Reusing an existing binary function in an `Option` context + * Use when you need to reuse an existing binary function with two `Option` + * values. * - * **Behavior** + * **Details** * * - Both `Some` → applies `f` and wraps in `Some` * - Either `None` → `None` @@ -1707,7 +1733,7 @@ export const makeOrder = O => order.make((self, that) => isSome(self) ? isSome(t * * @see {@link zipWith} for a non-lifted variant * - * @category Lifting + * @category lifting * @since 2.0.0 */ export const lift2 = f => dual(2, (self, that) => zipWith(self, that, f)); @@ -1717,10 +1743,10 @@ export const lift2 = f => dual(2, (self, that) => zipWith(self, that, f)); * * **When to use** * - * - Converting a boolean check into an `Option`-returning function + * Use to convert a boolean check into an `Option`-returning function * - Validating input and wrapping it in `Option` * - * **Behavior** + * **Details** * * - `predicate(value)` is `true` → `Some(value)` * - `predicate(value)` is `false` → `None` @@ -1743,19 +1769,20 @@ export const lift2 = f => dual(2, (self, that) => zipWith(self, that, f)); * @see {@link filter} to apply a predicate to an existing `Option` * @see {@link toRefinement} for the inverse direction * - * @category Lifting + * @category lifting * @since 2.0.0 */ export const liftPredicate = /*#__PURE__*/dual(2, (b, predicate) => predicate(b) ? some(b) : none()); /** - * Checks if an `Option` contains a value equivalent to the given one, using a + * Checks whether an `Option` contains a value equivalent to the given one, using a * custom `Equivalence`. * * **When to use** * - * - Testing membership with a custom equality check + * Use when you need to test whether an `Option` contains a value using a + * custom equality check. * - * **Behavior** + * **Details** * * - `Some` where `isEquivalent(value, a)` is `true` → `true` * - `Some` where not equivalent, or `None` → `false` @@ -1779,19 +1806,20 @@ export const liftPredicate = /*#__PURE__*/dual(2, (b, predicate) => predicate(b) * * @see {@link contains} for a version using default equality * - * @category Elements + * @category elements * @since 2.0.0 */ export const containsWith = isEquivalent => dual(2, (self, a) => isNone(self) ? false : isEquivalent(self.value, a)); /** - * Checks if an `Option` contains a value equal to the given one, using default + * Checks whether an `Option` contains a value equal to the given one, using default * structural equality. * * **When to use** * - * - Quick membership test with standard equality + * Use when you need a quick membership test for an `Option` value using + * standard equality. * - * **Behavior** + * **Details** * * - `Some` where `Equal.equals(value, a)` is `true` → `true` * - `Some` where not equal, or `None` → `false` @@ -1814,18 +1842,18 @@ export const containsWith = isEquivalent => dual(2, (self, a) => isNone(self) ? * @see {@link containsWith} for custom equality * @see {@link exists} to test with a predicate * - * @category Elements + * @category elements * @since 2.0.0 */ export const contains = /*#__PURE__*/containsWith(/*#__PURE__*/Equal.asEquivalence()); /** - * Tests if the value in a `Some` satisfies a predicate or refinement. + * Checks whether the value in a `Some` satisfies a predicate or refinement. * * **When to use** * - * - Checking a condition on an optional value without unwrapping + * Use to check a condition on an optional value without unwrapping * - * **Behavior** + * **Details** * * - `None` → `false` * - `Some` where `predicate(value)` is `true` → `true` @@ -1852,7 +1880,7 @@ export const contains = /*#__PURE__*/containsWith(/*#__PURE__*/Equal.asEquivalen * @see {@link filter} to keep or discard based on a predicate * @see {@link contains} to test for a specific value * - * @category Elements + * @category elements * @since 2.0.0 */ export const exists = /*#__PURE__*/dual(2, (self, refinement) => isNone(self) ? false : refinement(self.value)); @@ -1865,7 +1893,8 @@ export const exists = /*#__PURE__*/dual(2, (self, refinement) => isNone(self) ? * * **When to use** * - * - Beginning a do notation chain by naming the first value + * Use when you need to start an `Option` do notation chain by naming the first + * value. * * **Example** (Starting do notation) * @@ -1886,7 +1915,7 @@ export const exists = /*#__PURE__*/dual(2, (self, refinement) => isNone(self) ? * @see {@link bind} to add `Option` values * @see {@link let_ let} to add plain values * - * @category Do notation + * @category do notation * @since 2.0.0 */ export const bindTo = /*#__PURE__*/doNotation.bindTo(map); @@ -1897,7 +1926,8 @@ export { * * **When to use** * - * - Binding a derived (non-`Option`) value in a do notation pipeline + * Use when you need to bind a derived non-`Option` value in an `Option` do + * notation pipeline. * * **Example** (Adding a computed value) * @@ -1918,7 +1948,7 @@ export { * @see {@link bind} to add `Option` values * @see {@link bindTo} to start by naming an existing `Option` * - * @category Do notation + * @category do notation * @since 2.0.0 */ let_ as let }; @@ -1928,7 +1958,7 @@ let_ as let }; * * **When to use** * - * - Sequencing `Option` computations in do notation + * Use when you need to sequence `Option` computations in do notation. * * **Example** (Binding Option values) * @@ -1950,17 +1980,18 @@ let_ as let }; * @see {@link let_ let} to add plain values * @see {@link bindTo} to start by naming an existing `Option` * - * @category Do notation + * @category do notation * @since 2.0.0 */ export const bind = /*#__PURE__*/doNotation.bind(map, flatMap); /** - * An `Option` containing an empty record `{}`, used as the starting point for + * Provides an `Option` containing an empty record `{}`, used as the starting point for * do notation chains. * * **When to use** * - * - Starting a do notation pipeline before adding bindings + * Use when you need to start an `Option` do notation pipeline before adding + * bindings. * * **Example** (Do notation pipeline) * @@ -1982,20 +2013,20 @@ export const bind = /*#__PURE__*/doNotation.bind(map, flatMap); * @see {@link let_ let} to add plain values * @see {@link bindTo} to start by naming an existing `Option` * - * @category Do notation + * @category do notation * @since 2.0.0 */ export const Do = /*#__PURE__*/some({}); /** - * Generator-based syntax for `Option`, similar to `async`/`await` but for + * Provides generator-based syntax for `Option`, similar to `async`/`await` but for * optional values. Yielding a `None` short-circuits the generator to `None`. * * **When to use** * - * - Writing imperative-style code that chains multiple `Option`s - * - Readability when many sequential optional steps are involved + * Use when you need generator syntax for a sequence of `Option` steps that + * should short-circuit on `None`. * - * **Behavior** + * **Details** * * - Each `yield*` unwraps a `Some` value or short-circuits to `None` * - The return value is wrapped in `Some` @@ -2022,7 +2053,7 @@ export const Do = /*#__PURE__*/some({}); * * @see {@link Do} / {@link bind} for the do notation alternative * - * @category Generators + * @category generators * @since 2.0.0 */ export const gen = (...args) => { @@ -2044,10 +2075,10 @@ export const gen = (...args) => { * * **When to use** * - * - Building a reducer that falls back to the first available value - * - Combining optional values where either side may be absent + * Use to build an `Option` reducer that falls back to the first available value + * when either side may be absent. * - * **Behavior** + * **Details** * * - `None` + `None` → `None` * - `Some(a)` + `None` → `Some(a)` @@ -2067,6 +2098,7 @@ export const gen = (...args) => { * * @see {@link makeReducerFailFast} for fail-fast semantics * + * @category Reducer * @since 4.0.0 */ export function makeReducer(combiner) { @@ -2082,9 +2114,10 @@ export function makeReducer(combiner) { * * **When to use** * - * - Operations that require both values to be present + * Use when you need an `Option` combiner that returns `None` unless both + * operands are `Some`. * - * **Behavior** + * **Details** * * - `None` + anything → `None` * - anything + `None` → `None` @@ -2105,6 +2138,7 @@ export function makeReducer(combiner) { * * @see {@link makeReducerFailFast} to get a full `Reducer` * + * @category Combiner * @since 4.0.0 */ export function makeCombinerFailFast(combiner) { @@ -2119,10 +2153,10 @@ export function makeCombinerFailFast(combiner) { * * **When to use** * - * - Wrapping an existing `Reducer` to work with `Option` values - * - Reductions where any `None` should abort the entire result + * Use when you need to reduce `Option` values with fail-fast semantics, where + * any `None` aborts the entire result instead of being skipped. * - * **Behavior** + * **Details** * * - Initial value is `Some(reducer.initialValue)` * - Combines only when both operands are `Some` @@ -2144,6 +2178,7 @@ export function makeCombinerFailFast(combiner) { * @see {@link makeCombinerFailFast} for just the combiner * @see {@link makeReducer} for non-fail-fast semantics * + * @category Reducer * @since 4.0.0 */ export function makeReducerFailFast(reducer) { diff --git a/.opencode/node_modules/effect/dist/Option.js.map b/.opencode/node_modules/effect/dist/Option.js.map index 552a3bea90d789685801e1eada93758f6cb08490..c3004e02e77dd494a8db7c44bbd400c667f0a62b 100644 --- a/.opencode/node_modules/effect/dist/Option.js.map +++ b/.opencode/node_modules/effect/dist/Option.js.map @@ -1 +1 @@ -{"version":3,"file":"Option.js","names":["Combiner","Equal","Equivalence","constNull","constUndefined","dual","identity","doNotation","option","result","order","isFunction","Reducer","TypeId","none","some","isOption","isNone","isSome","match","self","onNone","onSome","value","toRefinement","f","a","fromIterable","collection","getSuccess","getFailure","getOrElse","orElse","that","orElseSome","orElseResult","map","succeed","fail","firstSomeOf","out","fromNullishOr","fromUndefinedOr","undefined","fromNullOr","liftNullishOr","getOrNull","getOrUndefined","liftThrowable","getOrThrowWith","getOrThrow","Error","as","b","asVoid","void_","void","flatMap","andThen","flatMapNullishOr","flatten","zipRight","zipLeft","tap","composeK","afb","bfc","product","productMany","o","push","all","input","Symbol","iterator","key","Object","keys","zipWith","reduceCompact","oa","toArray","partitionMap","e","isFailure","failure","success","filterMap","next","isSuccess","filter","predicate","makeEquivalence","isEquivalent","make","x","y","makeOrder","O","lift2","liftPredicate","containsWith","contains","asEquivalence","exists","refinement","bindTo","let_","let","bind","Do","gen","args","length","state","done","current","makeReducer","combiner","combine","makeCombinerFailFast","makeReducerFailFast","reducer","initialValue"],"sources":["../src/Option.ts"],"sourcesContent":[null],"mappings":"AA2EA,OAAO,KAAKA,QAAQ,MAAM,eAAe;AAEzC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAG/C,SAASC,SAAS,EAAEC,cAAc,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAGzE,OAAO,KAAKC,UAAU,MAAM,0BAA0B;AACtD,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAC9C,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAE9C,OAAO,KAAKC,KAAK,MAAM,YAAY;AAGnC,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,OAAO,KAAKC,OAAO,MAAM,cAAc;AAMvC,MAAMC,MAAM,GAAG,qBAAqB;AA6KpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,MAAMC,IAAI,GAAGA,CAAA,KAA4BN,MAAM,CAACM,IAAI;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,MAAMC,IAAI,GAA+BP,MAAM,CAACO,IAAI;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,OAAO,MAAMC,QAAQ,GAAiDR,MAAM,CAACQ,QAAQ;AAErF;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAO,MAAMC,MAAM,GAA4CT,MAAM,CAACS,MAAM;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAO,MAAMC,MAAM,GAA4CV,MAAM,CAACU,MAAM;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,OAAO,MAAMC,KAAK,gBAgFdd,IAAI,CACN,CAAC,EACD,CAAce,IAAe,EAAE;EAAEC,MAAM;EAAEC;AAAM,C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ACrD,MAAMI,YAAY,GAAG5G,IAAI,CAAC2G,OAAO,CAACC,YAAY,CAAC;EAC/C,OAAO/G,OAAO,CAACkF,IAAI,CAACyB,OAAO,EAAEI,YAAY,EAAG/F,UAAU,IAAI;IACxD,IAAIY,GAAG,GAAGmF,YAAY;IACtB,KAAK,MAAMpG,KAAK,IAAIK,UAAU,EAAE;MAC9BY,GAAG,GAAG+E,OAAO,CAAC/E,GAAG,EAAEjB,KAAK,CAAC;MACzB,IAAIN,MAAM,CAACuB,GAAG,CAAC,EAAE,OAAOA,GAAG;IAC7B;IACA,OAAOA,GAAG;EACZ,CAAC,CAAC;AACJ","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Option.js","names":["Combiner","Equal","Equivalence","constNull","constUndefined","dual","identity","doNotation","option","result","order","isFunction","Reducer","TypeId","none","some","isOption","isNone","isSome","match","self","onNone","onSome","value","toRefinement","f","a","fromIterable","collection","getSuccess","getFailure","getOrElse","orElse","that","orElseSome","orElseResult","map","succeed","fail","firstSomeOf","out","fromNullishOr","fromUndefinedOr","undefined","fromNullOr","liftNullishOr","getOrNull","getOrUndefined","liftThrowable","getOrThrowWith","getOrThrow","Error","as","b","asVoid","void_","void","flatMap","andThen","flatMapNullishOr","flatten","zipRight","zipLeft","tap","composeK","afb","bfc","product","productMany","o","push","all","input","Symbol","iterator","key","Object","keys","zipWith","reduceCompact","oa","toArray","partitionMap","e","isFailure","failure","success","filterMap","next","isSuccess","filter","predicate","makeEquivalence","isEquivalent","make","x","y","makeOrder","O","lift2","liftPredicate","containsWith","contains","asEquivalence","exists","refinement","bindTo","let_","let","bind","Do","gen","args","length","state","done","current","makeReducer","combiner","combine","makeCombinerFailFast","makeReducerFailFast","reducer","initialValue"],"sources":["../src/Option.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;AAYA,OAAO,KAAKA,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,WAAW,MAA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AAIK,UAAU,EAAE;MAC9BY,GAAG,GAAG+E,OAAO,CAAC/E,GAAG,EAAEjB,KAAK,CAAC;MACzB,IAAIN,MAAM,CAACuB,GAAG,CAAC,EAAE,OAAOA,GAAG;IAC7B;IACA,OAAOA,GAAG;EACZ,CAAC,CAAC;AACJ","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Order.d.ts b/.opencode/node_modules/effect/dist/Order.d.ts index 3653b3bd0385f9c16451a9edc507ad5c265c9be5..74db3a75d3dcc91ea287afd5c8939446282c48da 100644 --- a/.opencode/node_modules/effect/dist/Order.d.ts +++ b/.opencode/node_modules/effect/dist/Order.d.ts @@ -4,17 +4,16 @@ import * as Reducer from "./Reducer.ts"; /** * Represents a total ordering for values of type `A`. * - * When to use this: - * - When you need to define how values of a type should be compared - * - When implementing sorting, searching, or ordered data structures - * - When composing multiple comparison criteria - * - * Behavior: - * - Pure function: does not mutate inputs or have side effects - * - Returns `-1` if the first value is less than the second - * - Returns `0` if the values are equal according to this ordering - * - Returns `1` if the first value is greater than the second - * - Must satisfy total ordering laws (totality, antisymmetry, transitivity) + * **When to use** + * + * Use when you need to define how values of a type are compared. + * + * **Details** + * + * An order returns `-1` when the first value is less than the second, `0` when + * the values are equal according to this ordering, and `1` when the first value + * is greater than the second. It must satisfy total ordering laws: totality, + * antisymmetry, and transitivity. * * **Example** (Custom Order) * @@ -32,10 +31,8 @@ import * as Reducer from "./Reducer.ts"; * console.log(byAge(person1, person2)) // 1 * ``` * - * See also: - * - {@link make} - Create an order from a comparison function - * - {@link Ordering} - The result type of comparisons - * + * @see {@link make} to create an order from a comparison function + * @see {@link Ordering} for the result type of comparisons * @category type class * @since 2.0.0 */ @@ -45,13 +42,14 @@ export interface Order { /** * Type lambda for the `Order` type class, used internally for higher-kinded type operations. * - * When to use this: - * - When working with type-level operations that require higher-kinded types - * - When implementing generic type classes that work with orders + * **When to use** * - * Behavior: - * - Type-level only: no runtime representation - * - Used internally by the Effect type system + * Use when you need to abstract over `Order` in higher-kinded type code. + * + * **Details** + * + * This is type-level only, has no runtime representation, and is used + * internally by the Effect type system. * * @category type lambdas * @since 2.0.0 @@ -62,16 +60,17 @@ export interface OrderTypeLambda extends TypeLambda { /** * Creates a new `Order` instance from a comparison function. * - * When to use this: - * - When creating a custom order for a type that doesn't have a built-in order - * - When you need fine-grained control over comparison logic - * - When implementing orders for complex types + * **When to use** + * + * Use when you need a sorting rule not covered by the built-in orders or input + * mapping helpers, and you can provide a total comparison. * - * Behavior: - * - Pure function: does not mutate inputs - * - Uses reference equality (`===`) as a shortcut: if `self === that`, returns `0` without calling the comparison function - * - The comparison function should return `-1`, `0`, or `1` based on the comparison result - * - The returned order satisfies total ordering laws if the comparison function does + * **Details** + * + * Uses reference equality (`===`) as a shortcut: if `self === that`, it returns + * `0` without calling the comparison function. The comparison function should + * return `-1`, `0`, or `1`, and the returned order satisfies total ordering + * laws when the comparison function does. * * **Example** (Creating an Order) * @@ -88,27 +87,23 @@ export interface OrderTypeLambda extends TypeLambda { * console.log(byAge({ name: "Alice", age: 25 }, { name: "Bob", age: 30 })) // -1 * ``` * - * See also: - * - {@link mapInput} - Transform an order by mapping the input type - * - {@link combine} - Combine multiple orders - * + * @see {@link mapInput} to transform an order by mapping the input type + * @see {@link combine} to combine multiple orders * @category constructors * @since 2.0.0 */ export declare function make(compare: (self: A, that: A) => -1 | 0 | 1): Order; /** - * An `Order` instance for strings that compares them lexicographically using JavaScript's `<` operator. + * Order instance for strings that compares them lexicographically using JavaScript's `<` operator. + * + * **When to use** * - * When to use this: - * - When comparing strings alphabetically - * - When sorting string collections - * - As a base for creating orders on types containing strings + * Use when you need lexicographic string ordering. * - * Behavior: - * - Pure function: does not mutate inputs - * - Uses lexicographic (dictionary) ordering - * - Empty string is less than any non-empty string - * - Comparison is case-sensitive + * **Details** + * + * Uses lexicographic dictionary ordering. The empty string is less than any + * non-empty string, and comparisons are case-sensitive. * * **Example** (String Ordering) * @@ -120,28 +115,24 @@ export declare function make(compare: (self: A, that: A) => -1 | 0 | 1): Orde * console.log(Order.String("apple", "apple")) // 0 * ``` * - * See also: - * - {@link mapInput} - Use this order to compare objects by a string property - * - {@link Struct} - Combine with other orders for struct comparison - * + * @see {@link mapInput} to compare objects by a string property + * @see {@link Struct} to combine with other orders for struct comparison * @category instances * @since 4.0.0 */ export declare const String: Order; /** - * An `Order` instance for numbers that compares them numerically. + * Order instance for numbers that compares them numerically. + * + * **When to use** * - * When to use this: - * - When comparing numbers for sorting or searching - * - As a base for creating orders on types containing numbers - * - When implementing numeric comparisons in data structures + * Use when you need numeric ordering for numbers. * - * Behavior: - * - Pure function: does not mutate inputs - * - `0` is considered equal to `-0` - * - All `NaN` values are considered equal to each other - * - Any `NaN` is considered less than any non-NaN number - * - Uses standard numeric comparison for all other values + * **Details** + * + * `0` is considered equal to `-0`. All `NaN` values are considered equal to + * each other, and any `NaN` is considered less than any non-`NaN` number. All + * other values use standard numeric comparison. * * **Example** (Number Ordering) * @@ -156,26 +147,22 @@ export declare const String: Order; * console.log(Order.Number(NaN, 1)) // -1 * ``` * - * See also: - * - {@link mapInput} - Use this order to compare objects by a number property - * - {@link BigInt} - For bigint comparisons - * + * @see {@link mapInput} to compare objects by a number property + * @see {@link BigInt} for bigint comparisons * @category instances * @since 4.0.0 */ export declare const Number: Order; /** - * An `Order` instance for booleans where `false` is considered less than `true`. + * Order instance for booleans where `false` is considered less than `true`. + * + * **When to use** * - * When to use this: - * - When comparing booleans for sorting or searching - * - As a base for creating orders on types containing booleans - * - When implementing boolean-based comparisons + * Use when you need boolean ordering where `false` comes before `true`. * - * Behavior: - * - Pure function: does not mutate inputs - * - `false` is less than `true` - * - Equal values return `0` + * **Details** + * + * `false` is less than `true`, and equal values return `0`. * * **Example** (Boolean Ordering) * @@ -187,25 +174,22 @@ export declare const Number: Order; * console.log(Order.Boolean(true, true)) // 0 * ``` * - * See also: - * - {@link mapInput} - Use this order to compare objects by a boolean property - * + * @see {@link mapInput} to compare objects by a boolean property * @category instances * @since 4.0.0 */ export declare const Boolean: Order; /** - * An `Order` instance for bigints that compares them numerically. + * Order instance for bigints that compares them numerically. + * + * **When to use** * - * When to use this: - * - When comparing bigint values for sorting or searching - * - As a base for creating orders on types containing bigints - * - When working with large integers that exceed number precision + * Use when you need numeric ordering for `bigint` values. * - * Behavior: - * - Pure function: does not mutate inputs - * - Uses standard numeric comparison for bigint values - * - Handles arbitrarily large integers + * **Details** + * + * Uses standard numeric comparison for bigint values and handles arbitrarily + * large integers. * * **Example** (BigInt Ordering) * @@ -217,10 +201,8 @@ export declare const Boolean: Order; * console.log(Order.BigInt(1n, 1n)) // 0 * ``` * - * See also: - * - {@link Number} - For regular number comparisons - * - {@link mapInput} - Use this order to compare objects by a bigint property - * + * @see {@link Number} for regular number comparisons + * @see {@link mapInput} to compare objects by a bigint property * @category instances * @since 4.0.0 */ @@ -228,16 +210,15 @@ export declare const BigInt: Order; /** * Creates a new `Order` that reverses the comparison order of the input `Order`. * - * When to use this: - * - When you need descending order instead of ascending - * - When reversing an existing order without modifying the original - * - When creating orders that compare in the opposite direction + * **When to use** + * + * Use when you need the reverse of an existing order. * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns a new order that swaps the arguments before comparison - * - If the original order returns `-1`, the flipped order returns `1`, and vice versa - * - Equal comparisons remain `0` + * **Details** + * + * Returns a new order that swaps the arguments before comparison. If the + * original order returns `-1`, the flipped order returns `1`, and vice versa. + * Equal comparisons remain `0`. * * **Example** (Reversing Order) * @@ -251,27 +232,24 @@ export declare const BigInt: Order; * console.log(flip(1, 1)) // 0 * ``` * - * See also: - * - {@link combine} - Combine orders for multi-criteria comparison - * + * @see {@link combine} to combine orders for multi-criteria comparison * @category combinators - * @since 2.0.0 + * @since 4.0.0 */ export declare function flip(O: Order): Order; /** * Combines two `Order` instances to create a new `Order` that first compares using the first `Order`, * and if the values are equal, then compares using the second `Order`. * - * When to use this: - * - When you need multi-criteria comparison (e.g., sort by age, then by name) - * - When creating composite orders from simpler orders - * - When implementing lexicographic ordering + * **When to use** + * + * Use when you need tie-breaking with exactly two orders. + * + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - First applies the first order; if the result is non-zero, returns that result - * - If the first order returns `0` (equal), applies the second order - * - Returns the first non-zero result, or `0` if both orders return `0` + * First applies the first order. If the result is non-zero, that result is + * returned; otherwise, the second order is applied. The result is the first + * non-zero comparison result, or `0` if both orders return `0`. * * **Example** (Combining Orders) * @@ -296,10 +274,8 @@ export declare function flip(O: Order): Order; * console.log(byAgeAndName(person1, person3)) // 1 (Alice (30) > Charlie (25)) * ``` * - * See also: - * - {@link combineAll} - Combine multiple orders from a collection - * - {@link mapInput} - Transform orders to work with different types - * + * @see {@link combineAll} to combine multiple orders from a collection + * @see {@link mapInput} to transform orders to work with different types * @category combining * @since 2.0.0 */ @@ -308,16 +284,15 @@ export declare const combine: { * Combines two `Order` instances to create a new `Order` that first compares using the first `Order`, * and if the values are equal, then compares using the second `Order`. * - * When to use this: - * - When you need multi-criteria comparison (e.g., sort by age, then by name) - * - When creating composite orders from simpler orders - * - When implementing lexicographic ordering + * **When to use** + * + * Use when you need tie-breaking with exactly two orders. + * + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - First applies the first order; if the result is non-zero, returns that result - * - If the first order returns `0` (equal), applies the second order - * - Returns the first non-zero result, or `0` if both orders return `0` + * First applies the first order. If the result is non-zero, that result is + * returned; otherwise, the second order is applied. The result is the first + * non-zero comparison result, or `0` if both orders return `0`. * * **Example** (Combining Orders) * @@ -342,10 +317,8 @@ export declare const combine: { * console.log(byAgeAndName(person1, person3)) // 1 (Alice (30) > Charlie (25)) * ``` * - * See also: - * - {@link combineAll} - Combine multiple orders from a collection - * - {@link mapInput} - Transform orders to work with different types - * + * @see {@link combineAll} to combine multiple orders from a collection + * @see {@link mapInput} to transform orders to work with different types * @category combining * @since 2.0.0 */ @@ -354,16 +327,15 @@ export declare const combine: { * Combines two `Order` instances to create a new `Order` that first compares using the first `Order`, * and if the values are equal, then compares using the second `Order`. * - * When to use this: - * - When you need multi-criteria comparison (e.g., sort by age, then by name) - * - When creating composite orders from simpler orders - * - When implementing lexicographic ordering + * **When to use** + * + * Use when you need tie-breaking with exactly two orders. + * + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - First applies the first order; if the result is non-zero, returns that result - * - If the first order returns `0` (equal), applies the second order - * - Returns the first non-zero result, or `0` if both orders return `0` + * First applies the first order. If the result is non-zero, that result is + * returned; otherwise, the second order is applied. The result is the first + * non-zero comparison result, or `0` if both orders return `0`. * * **Example** (Combining Orders) * @@ -388,10 +360,8 @@ export declare const combine: { * console.log(byAgeAndName(person1, person3)) // 1 (Alice (30) > Charlie (25)) * ``` * - * See also: - * - {@link combineAll} - Combine multiple orders from a collection - * - {@link mapInput} - Transform orders to work with different types - * + * @see {@link combineAll} to combine multiple orders from a collection + * @see {@link mapInput} to transform orders to work with different types * @category combining * @since 2.0.0 */ @@ -400,15 +370,14 @@ export declare const combine: { /** * Creates an `Order` that considers all values as equal. * - * When to use this: - * - When you need an order that doesn't distinguish between values - * - As a default or fallback order when no meaningful comparison exists - * - When implementing optional ordering where equality is sufficient + * **When to use** + * + * Use when you need an order that treats all values as equal. + * + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Always returns `0` regardless of input values - * - Useful as a neutral element in order composition + * Always returns `0` regardless of input values, making it useful as a neutral + * element in order composition. * * **Example** (Always Equal Order) * @@ -422,9 +391,7 @@ export declare const combine: { * console.log(alwaysEqualOrder(1, 1)) // 0 * ``` * - * See also: - * - {@link combine} - Combine with other orders - * + * @see {@link combine} to combine with other orders * @category constructors * @since 4.0.0 */ @@ -433,17 +400,14 @@ export declare function alwaysEqual(): Order; * Combines all `Order` instances in the provided collection into a single `Order`. * The resulting `Order` compares using each `Order` in sequence until a non-zero result is found. * - * When to use this: - * - When you have a variable number of orders to combine - * - When combining orders from a collection or array - * - When implementing dynamic multi-criteria sorting + * **When to use** + * + * Use when you need tie-breaking across a variable number of orders. + * + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Applies orders in iteration order - * - Returns the first non-zero result from any order - * - Returns `0` only if all orders return `0` - * - Short-circuits on the first non-zero result + * Applies orders in iteration order and short-circuits on the first non-zero + * result. It returns `0` only if all orders return `0`. * * **Example** (Combining Multiple Orders) * @@ -467,10 +431,8 @@ export declare function alwaysEqual(): Order; * console.log(combinedOrder(person1, person2)) // -1 (Same age, Alice < Bob) * ``` * - * See also: - * - {@link combine} - Combine two orders - * - {@link makeReducer} - Create a reducer for combining orders - * + * @see {@link combine} to combine two orders + * @see {@link makeReducer} to create a reducer for combining orders * @category combining * @since 2.0.0 */ @@ -479,16 +441,16 @@ export declare function combineAll(collection: Iterable>): Order; * Transforms an `Order` on type `A` into an `Order` on type `B` by providing a function that * maps values of type `B` to values of type `A`. * - * When to use this: - * - When you have an order for a property type and want to compare objects by that property - * - When extracting a comparable value from a complex type - * - When creating orders for types that contain comparable values + * **When to use** + * + * Use when you need to adapt an `Order` to compare a larger value by one + * derived property. + * + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Applies the mapping function to both values before comparison - * - The mapping function should be pure and not have side effects - * - Preserves the ordering properties of the original order + * Applies the mapping function to both values before comparison. The mapping + * function should be pure and not have side effects so the ordering properties + * of the original order are preserved. * * **Example** (Mapping Input) * @@ -502,10 +464,8 @@ export declare function combineAll(collection: Iterable>): Order; * console.log(byLength("aa", "bb")) // 0 * ``` * - * See also: - * - {@link combine} - Combine mapped orders for multi-criteria comparison - * - {@link Struct} - Create orders for structs with multiple fields - * + * @see {@link combine} to combine mapped orders for multi-criteria comparison + * @see {@link Struct} to create orders for structs with multiple fields * @category mapping * @since 2.0.0 */ @@ -514,16 +474,16 @@ export declare const mapInput: { * Transforms an `Order` on type `A` into an `Order` on type `B` by providing a function that * maps values of type `B` to values of type `A`. * - * When to use this: - * - When you have an order for a property type and want to compare objects by that property - * - When extracting a comparable value from a complex type - * - When creating orders for types that contain comparable values + * **When to use** + * + * Use when you need to adapt an `Order` to compare a larger value by one + * derived property. + * + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Applies the mapping function to both values before comparison - * - The mapping function should be pure and not have side effects - * - Preserves the ordering properties of the original order + * Applies the mapping function to both values before comparison. The mapping + * function should be pure and not have side effects so the ordering properties + * of the original order are preserved. * * **Example** (Mapping Input) * @@ -537,10 +497,8 @@ export declare const mapInput: { * console.log(byLength("aa", "bb")) // 0 * ``` * - * See also: - * - {@link combine} - Combine mapped orders for multi-criteria comparison - * - {@link Struct} - Create orders for structs with multiple fields - * + * @see {@link combine} to combine mapped orders for multi-criteria comparison + * @see {@link Struct} to create orders for structs with multiple fields * @category mapping * @since 2.0.0 */ @@ -549,16 +507,16 @@ export declare const mapInput: { * Transforms an `Order` on type `A` into an `Order` on type `B` by providing a function that * maps values of type `B` to values of type `A`. * - * When to use this: - * - When you have an order for a property type and want to compare objects by that property - * - When extracting a comparable value from a complex type - * - When creating orders for types that contain comparable values + * **When to use** + * + * Use when you need to adapt an `Order` to compare a larger value by one + * derived property. + * + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Applies the mapping function to both values before comparison - * - The mapping function should be pure and not have side effects - * - Preserves the ordering properties of the original order + * Applies the mapping function to both values before comparison. The mapping + * function should be pure and not have side effects so the ordering properties + * of the original order are preserved. * * **Example** (Mapping Input) * @@ -572,28 +530,25 @@ export declare const mapInput: { * console.log(byLength("aa", "bb")) // 0 * ``` * - * See also: - * - {@link combine} - Combine mapped orders for multi-criteria comparison - * - {@link Struct} - Create orders for structs with multiple fields - * + * @see {@link combine} to combine mapped orders for multi-criteria comparison + * @see {@link Struct} to create orders for structs with multiple fields * @category mapping * @since 2.0.0 */ (self: Order, f: (b: B) => A): Order; }; /** - * An `Order` instance for `Date` objects that compares them chronologically by their timestamp. + * Order instance for `Date` objects that compares them chronologically by their timestamp. + * + * **When to use** * - * When to use this: - * - When comparing dates for sorting or searching - * - As a base for creating orders on types containing dates - * - When implementing time-based comparisons + * Use when you need chronological ordering for JavaScript date values. * - * Behavior: - * - Pure function: does not mutate inputs - * - Compares dates by their underlying timestamp (milliseconds since epoch) - * - Earlier dates are less than later dates - * - Invalid dates are compared as if they were valid (uses `getTime()` result) + * **Details** + * + * Compares dates by their underlying timestamp in milliseconds since the epoch. + * Earlier dates are less than later dates. Invalid dates are compared through + * their `getTime()` result. * * **Example** (Date Ordering) * @@ -608,9 +563,7 @@ export declare const mapInput: { * console.log(Order.Date(date1, date1)) // 0 * ``` * - * See also: - * - {@link mapInput} - Use this order to compare objects by a date property - * + * @see {@link mapInput} to compare objects by a date property * @category instances * @since 2.0.0 */ @@ -618,17 +571,15 @@ export declare const Date: Order; /** * Creates an `Order` for a tuple type based on orders for each element. * - * When to use this: - * - When comparing tuples with different types for each position - * - When you need type-safe tuple ordering - * - When working with fixed-length heterogeneous collections + * **When to use** * - * Behavior: - * - Pure function: does not mutate inputs - * - Compares tuples element-by-element using the corresponding order - * - Stops at the first non-zero comparison result - * - Requires tuples to have the same length as the order collection - * - Returns `0` if all elements are equal + * Use when you need fixed-length tuple ordering with per-position orders. + * + * **Details** + * + * Compares tuples element-by-element using the corresponding order and stops at + * the first non-zero comparison result. Tuples must have the same length as the + * order collection, and the result is `0` only if all elements are equal. * * **Example** (Tuple Ordering) * @@ -642,9 +593,7 @@ export declare const Date: Order; * console.log(tupleOrder([1, "a"], [1, "a"])) // 0 * ``` * - * See also: - * - {@link Array} - Compare arrays with length consideration - * + * @see {@link Array} to compare arrays with length consideration * @category combinators * @since 4.0.0 */ @@ -659,17 +608,16 @@ export { /** * Creates an `Order` for arrays by applying the given `Order` to each element, then comparing by length if all elements are equal. * - * When to use this: - * - When comparing arrays of the same element type - * - When you want shorter arrays to be considered less than longer arrays - * - When sorting collections of arrays + * **When to use** * - * Behavior: - * - Pure function: does not mutate inputs - * - Compares arrays element-by-element using the provided order - * - Stops at the first non-zero comparison result - * - If all elements are equal, shorter arrays are less than longer arrays - * - Returns `0` only if arrays have the same length and all elements are equal + * Use when you need lexicographic ordering for arrays of one element type. + * + * **Details** + * + * Compares arrays element-by-element using the provided order and stops at the + * first non-zero comparison result. If all elements are equal, shorter arrays + * are less than longer arrays. The result is `0` only if arrays have the same + * length and all elements are equal. * * **Example** (Array Element Ordering) * @@ -684,9 +632,7 @@ export { * console.log(arrayOrder([1, 2], [1, 2])) // 0 * ``` * - * See also: - * - {@link Tuple} - Type-safe tuple ordering - * + * @see {@link Tuple} for type-safe tuple ordering * @category combinators * @since 4.0.0 */ @@ -694,17 +640,15 @@ Array_ as Array }; /** * Creates an `Order` for structs by applying the given `Order`s to each property in sequence. * - * When to use this: - * - When comparing objects with multiple properties - * - When you need multi-field comparison for structs - * - When creating orders for complex data types + * **When to use** * - * Behavior: - * - Pure function: does not mutate inputs - * - Compares structs field-by-field in the order of keys in the fields object - * - Stops at the first non-zero comparison result - * - Returns `0` only if all fields are equal - * - Field order matters: earlier fields take precedence + * Use when you need multi-field ordering for objects with known properties. + * + * **Details** + * + * Compares structs field-by-field in the key order of the fields object and + * stops at the first non-zero comparison result. Field order matters: earlier + * fields take precedence. The result is `0` only if all fields are equal. * * **Example** (Struct Ordering) * @@ -725,10 +669,8 @@ Array_ as Array }; * console.log(personOrder(person1, person1)) // 0 * ``` * - * See also: - * - {@link combine} - Combine orders manually - * - {@link mapInput} - Extract and compare by a single property - * + * @see {@link combine} to combine orders manually + * @see {@link mapInput} to extract and compare by a single property * @category combinators * @since 4.0.0 */ @@ -738,18 +680,16 @@ export declare function Struct] ? A : never; }>; /** - * Tests whether one value is strictly less than another according to the given order. + * Checks whether one value is strictly less than another according to the given order. * - * When to use this: - * - When you need a boolean predicate instead of an ordering result - * - When checking if a value is less than another in conditional logic - * - When implementing range checks or comparisons + * **When to use** * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns `true` if the order returns `-1` (first value is less than second) - * - Returns `false` for equal or greater values - * - Supports curried and uncurried call styles + * Use when you need a boolean less-than predicate using an `Order`. + * + * **Details** + * + * Returns `true` if the order returns `-1`, meaning the first value is less + * than the second. Equal or greater values return `false`. * * **Example** (Less Than) * @@ -763,30 +703,26 @@ export declare function Struct(O: Order) => { (that: A): (self: A) => boolean; (self: A, that: A): boolean; }; /** - * Tests whether one value is strictly greater than another according to the given order. + * Checks whether one value is strictly greater than another according to the given order. + * + * **When to use** * - * When to use this: - * - When you need a boolean predicate instead of an ordering result - * - When checking if a value is greater than another in conditional logic - * - When implementing range checks or comparisons + * Use when you need a boolean greater-than predicate using an `Order`. * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns `true` if the order returns `1` (first value is greater than second) - * - Returns `false` for equal or lesser values - * - Supports curried and uncurried call styles + * **Details** + * + * Returns `true` if the order returns `1`, meaning the first value is greater + * than the second. Equal or lesser values return `false`. * * **Example** (Greater Than) * @@ -800,30 +736,26 @@ export declare const isLessThan: (O: Order) => { * console.log(isGreaterThanNumber(1, 1)) // false * ``` * - * See also: - * - {@link isGreaterThanOrEqualTo} - Non-strict greater than or equal - * - {@link isLessThan} - Strict less than - * + * @see {@link isGreaterThanOrEqualTo} for non-strict greater than or equal + * @see {@link isLessThan} for strict less than * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export declare const isGreaterThan: (O: Order) => { (that: A): (self: A) => boolean; (self: A, that: A): boolean; }; /** - * Tests whether one value is less than or equal to another according to the given order. + * Checks whether one value is less than or equal to another according to the given order. + * + * **When to use** + * + * Use when you need a boolean less-than-or-equal predicate using an `Order`. * - * When to use this: - * - When you need a boolean predicate for non-strict comparison - * - When checking if a value is within a range (inclusive lower bound) - * - When implementing inclusive comparisons + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns `true` if the order returns `-1` or `0` (less than or equal) - * - Returns `false` only if the order returns `1` (greater than) - * - Supports curried and uncurried call styles + * Returns `true` if the order returns `-1` or `0`, and returns `false` only if + * the order returns `1`. * * **Example** (Less Than Or Equal) * @@ -837,30 +769,27 @@ export declare const isGreaterThan: (O: Order) => { * console.log(isLessThanOrEqualToNumber(2, 1)) // false * ``` * - * See also: - * - {@link isLessThan} - Strict less than - * - {@link isGreaterThan} - Strict greater than - * + * @see {@link isLessThan} for strict less than + * @see {@link isGreaterThan} for strict greater than * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export declare const isLessThanOrEqualTo: (O: Order) => { (that: A): (self: A) => boolean; (self: A, that: A): boolean; }; /** - * Tests whether one value is greater than or equal to another according to the given order. + * Checks whether one value is greater than or equal to another according to the given order. * - * When to use this: - * - When you need a boolean predicate for non-strict comparison - * - When checking if a value is within a range (inclusive upper bound) - * - When implementing inclusive comparisons + * **When to use** * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns `true` if the order returns `1` or `0` (greater than or equal) - * - Returns `false` only if the order returns `-1` (less than) - * - Supports curried and uncurried call styles + * Use when you need a boolean greater-than-or-equal predicate using an + * `Order`. + * + * **Details** + * + * Returns `true` if the order returns `1` or `0`, and returns `false` only if + * the order returns `-1`. * * **Example** (Greater Than Or Equal) * @@ -874,12 +803,10 @@ export declare const isLessThanOrEqualTo: (O: Order) => { * console.log(isGreaterThanOrEqualToNumber(1, 2)) // false * ``` * - * See also: - * - {@link isGreaterThan} - Strict greater than - * - {@link isLessThanOrEqualTo} - Less than or equal - * + * @see {@link isGreaterThan} for strict greater than + * @see {@link isLessThanOrEqualTo} for less than or equal * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export declare const isGreaterThanOrEqualTo: (O: Order) => { (that: A): (self: A) => boolean; @@ -888,16 +815,15 @@ export declare const isGreaterThanOrEqualTo: (O: Order) => { /** * Returns the minimum of two values according to the given order. If they are equal, returns the first argument. * - * When to use this: - * - When you need to find the smaller of two values - * - When implementing min/max operations - * - When selecting values based on ordering + * **When to use** + * + * Use when you need to select the smaller of two values according to an + * `Order`. * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns the value that compares as less than or equal to the other - * - If values are equal, returns the first argument - * - Supports curried and uncurried call styles + * **Details** + * + * Returns the value that compares as less than or equal to the other value. If + * values are equal, the first argument is returned. * * **Example** (Minimum Value) * @@ -911,10 +837,8 @@ export declare const isGreaterThanOrEqualTo: (O: Order) => { * console.log(minNumber(1, 1)) // 1 * ``` * - * See also: - * - {@link max} - Maximum of two values - * - {@link clamp} - Clamp a value between min and max - * + * @see {@link max} for the maximum of two values + * @see {@link clamp} to clamp a value between min and max * @category comparisons * @since 2.0.0 */ @@ -925,16 +849,15 @@ export declare const min: (O: Order) => { /** * Returns the maximum of two values according to the given order. If they are equal, returns the first argument. * - * When to use this: - * - When you need to find the larger of two values - * - When implementing min/max operations - * - When selecting values based on ordering + * **When to use** + * + * Use when you need to select the larger of two values according to an + * `Order`. * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns the value that compares as greater than or equal to the other - * - If values are equal, returns the first argument - * - Supports curried and uncurried call styles + * **Details** + * + * Returns the value that compares as greater than or equal to the other value. + * If values are equal, the first argument is returned. * * **Example** (Maximum Value) * @@ -948,10 +871,8 @@ export declare const min: (O: Order) => { * console.log(maxNumber(1, 1)) // 1 * ``` * - * See also: - * - {@link min} - Minimum of two values - * - {@link clamp} - Clamp a value between min and max - * + * @see {@link min} for the minimum of two values + * @see {@link clamp} to clamp a value between min and max * @category comparisons * @since 2.0.0 */ @@ -960,20 +881,19 @@ export declare const max: (O: Order) => { (self: A, that: A): A; }; /** - * Clamps a value between a minimum and a maximum according to the given order. + * Restricts a value between a minimum and a maximum according to the given order. + * + * **When to use** * - * When to use this: - * - When you need to restrict a value to a specific range - * - When implementing bounds checking and normalization - * - When ensuring values stay within valid ranges + * Use when you need to clamp a value to an inclusive range according to an + * `Order`. * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns the value if it's between minimum and maximum (inclusive) - * - Returns minimum if the value is less than minimum - * - Returns maximum if the value is greater than maximum - * - Supports curried and uncurried call styles - * - Requires that minimum <= maximum according to the order + * **Details** + * + * Returns the value itself when it is between minimum and maximum, inclusive. + * Values below the range return minimum, and values above the range return + * maximum. The minimum must be less than or equal to the maximum according to + * the order. * * **Example** (Clamping Values) * @@ -987,11 +907,9 @@ export declare const max: (O: Order) => { * console.log(clamp(6)) // 5 * ``` * - * See also: - * - {@link min} - Minimum of two values - * - {@link max} - Maximum of two values - * - {@link isBetween} - Check if a value is within a range - * + * @see {@link min} for the minimum of two values + * @see {@link max} for the maximum of two values + * @see {@link isBetween} to check if a value is within a range * @category comparisons * @since 2.0.0 */ @@ -1006,19 +924,19 @@ export declare const clamp: (O: Order) => { }): A; }; /** - * Tests whether a value is between a minimum and a maximum (inclusive) according to the given order. + * Checks whether a value is between a minimum and a maximum (inclusive) according to the given order. + * + * **When to use** * - * When to use this: - * - When validating that a value is within a valid range - * - When implementing range checks for bounds validation - * - When filtering or selecting values within a range + * Use when you need range checks that respect domain-specific ordering, such as + * dates, versions, or custom priorities, instead of JavaScript numeric + * comparison. * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns `true` if the value is greater than or equal to minimum and less than or equal to maximum - * - Returns `false` if the value is outside the range - * - Supports curried and uncurried call styles - * - Both bounds are inclusive + * **Details** + * + * Returns `true` when the value is greater than or equal to minimum and less + * than or equal to maximum. Values outside the range return `false`. Both + * bounds are inclusive. * * **Example** (Checking Range) * @@ -1034,11 +952,9 @@ export declare const clamp: (O: Order) => { * console.log(betweenNumber(11, { minimum: 1, maximum: 10 })) // false * ``` * - * See also: - * - {@link clamp} - Clamp a value to a range - * - {@link isLessThanOrEqualTo} - Less than or equal check - * - {@link isGreaterThanOrEqualTo} - Greater than or equal check - * + * @see {@link clamp} to clamp a value to a range + * @see {@link isLessThanOrEqualTo} for less than or equal check + * @see {@link isGreaterThanOrEqualTo} for greater than or equal check * @category predicates * @since 4.0.0 */ @@ -1055,16 +971,16 @@ export declare const isBetween: (O: Order) => { /** * Creates a `Reducer` for combining `Order` instances, useful for aggregating orders in collections. * - * When to use this: - * - When you need to combine multiple orders from a collection using reducer patterns - * - When implementing fold operations over collections of orders - * - When working with reducers that operate on orders + * **When to use** + * + * Use when you need a reducer that combines orders. * - * Behavior: - * - Returns a reducer that combines orders using {@link combine} - * - Uses {@link alwaysEqual} as the identity element (returns `0` for empty collections) - * - Uses {@link combineAll} for combining collections of orders - * - The reducer can be used with fold operations on collections + * **Details** + * + * Returns a reducer that combines orders using `combine`, uses `alwaysEqual` as + * the identity element for empty collections, and uses `combineAll` for + * combining collections of orders. The reducer can be used with fold operations + * on collections. * * **Example** (Creating a Reducer) * @@ -1078,12 +994,10 @@ export declare const isBetween: (O: Order) => { * console.log(combined(1, 2)) // -1 (uses first order) * ``` * - * See also: - * - {@link combine} - Combine two orders - * - {@link combineAll} - Combine multiple orders - * - {@link Reducer} - Reducer type for collection operations - * - * @category utilities + * @see {@link combine} to combine two orders + * @see {@link combineAll} to combine multiple orders + * @see {@link Reducer} for reducing orders as a collection operation + * @category constructors * @since 4.0.0 */ export declare function makeReducer(): Reducer.Reducer>; diff --git a/.opencode/node_modules/effect/dist/Order.d.ts.map b/.opencode/node_modules/effect/dist/Order.d.ts.map index 179ec57d50855291dbe582178b9dada6895a6dc3..9f29848cc06ae071a5b6a985c703f9c838039a65 100644 --- a/.opencode/node_modules/effect/dist/Order.d.ts.map +++ b/.opencode/node_modules/effect/dist/Order.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../src/Order.ts"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,WAAW,KAAK,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,QAAQ,CAAA;CAC7B;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,QAAQ,CAAC,IAA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OAAO,CAAA;CAQV,CAAA;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,WAAW,CAAC,CAAC,+BAM5B"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Order.js b/.opencode/node_modules/effect/dist/Order.js index 5f7198b04743fbc8f0a0136421c1f3600ae07bf4..20309b78f902874d233e7837f9da1f0ed36af478 100644 --- a/.opencode/node_modules/effect/dist/Order.js +++ b/.opencode/node_modules/effect/dist/Order.js @@ -1,51 +1,12 @@ /** - * This module provides the `Order` type class for defining total orderings on types. - * An `Order` is a comparison function that returns `-1` (less than), `0` (equal), or `1` (greater than). - * - * Mental model: - * - An `Order` is a pure function `(a: A, b: A) => Ordering` that compares two values - * - The result `-1` means the first value is less than the second - * - The result `0` means the values are equal according to this ordering - * - The result `1` means the first value is greater than the second - * - Orders must satisfy total ordering laws: totality (either `x <= y` or `y <= x`), antisymmetry (if `x <= y` and `y <= x` then `x == y`), and transitivity (if `x <= y` and `y <= z` then `x <= z`) - * - Orders can be composed using {@link combine} and {@link combineAll} to create multi-criteria comparisons - * - Orders can be transformed using {@link mapInput} to compare values by extracting a comparable property - * - Built-in orders exist for common types: {@link Number}, {@link String}, {@link Boolean}, {@link BigInt}, {@link Date} - * - * Common tasks: - * - Creating custom orders → {@link make} - * - Using built-in orders → {@link Number}, {@link String}, {@link Boolean}, {@link BigInt}, {@link Date} - * - Combining multiple orders → {@link combine}, {@link combineAll} - * - Transforming orders → {@link mapInput} - * - Comparing values → {@link isLessThan}, {@link isGreaterThan}, {@link isLessThanOrEqualTo}, {@link isGreaterThanOrEqualTo} - * - Finding min/max → {@link min}, {@link max} - * - Clamping values → {@link clamp}, {@link isBetween} - * - Ordering collections → {@link Array}, {@link Tuple}, {@link Struct} - * - * Gotchas: - * - `Order.Number` treats all `NaN` values as equal and less than any other number - * - `Order.make` uses reference equality (`===`) as a shortcut: if `self === that`, it returns `0` without calling the comparison function - * - `Order.Array` compares arrays element-by-element, then by length if all elements are equal; `Order.all` only compares elements up to the shorter array's length - * - `Order.Tuple` requires a fixed-length tuple with matching order types; `Order.Array` works with variable-length arrays - * - `Order.min` and `Order.max` return the first argument when values are equal - * - * Quickstart: - * - * **Example** (Basic Usage) + * Defines comparison functions for ordered values. * - * ```ts - * import { Order } from "effect" - * - * const result = Order.Number(5, 10) - * console.log(result) // -1 (5 is less than 10) - * - * const isLessThan = Order.isLessThan(Order.Number)(5, 10) - * console.log(isLessThan) // true - * ``` - * - * See also: - * - {@link Ordering} - The result type of comparisons - * - {@link Reducer} - For combining orders in collections + * An `Order` compares two `A` values and returns whether the first is less + * than, equal to, or greater than the second. Orders are used for sorting, + * choosing minimum or maximum values, checking ranges, and building ordered data + * structures. This module includes built-in orders, constructors for custom + * orders, tools for reversing and combining comparisons, tuple and struct + * helpers, comparison predicates, clamping, and reducer support. * * @since 2.0.0 */ @@ -54,16 +15,17 @@ import * as Reducer from "./Reducer.js"; /** * Creates a new `Order` instance from a comparison function. * - * When to use this: - * - When creating a custom order for a type that doesn't have a built-in order - * - When you need fine-grained control over comparison logic - * - When implementing orders for complex types + * **When to use** * - * Behavior: - * - Pure function: does not mutate inputs - * - Uses reference equality (`===`) as a shortcut: if `self === that`, returns `0` without calling the comparison function - * - The comparison function should return `-1`, `0`, or `1` based on the comparison result - * - The returned order satisfies total ordering laws if the comparison function does + * Use when you need a sorting rule not covered by the built-in orders or input + * mapping helpers, and you can provide a total comparison. + * + * **Details** + * + * Uses reference equality (`===`) as a shortcut: if `self === that`, it returns + * `0` without calling the comparison function. The comparison function should + * return `-1`, `0`, or `1`, and the returned order satisfies total ordering + * laws when the comparison function does. * * **Example** (Creating an Order) * @@ -80,10 +42,8 @@ import * as Reducer from "./Reducer.js"; * console.log(byAge({ name: "Alice", age: 25 }, { name: "Bob", age: 30 })) // -1 * ``` * - * See also: - * - {@link mapInput} - Transform an order by mapping the input type - * - {@link combine} - Combine multiple orders - * + * @see {@link mapInput} to transform an order by mapping the input type + * @see {@link combine} to combine multiple orders * @category constructors * @since 2.0.0 */ @@ -91,18 +51,16 @@ export function make(compare) { return (self, that) => self === that ? 0 : compare(self, that); } /** - * An `Order` instance for strings that compares them lexicographically using JavaScript's `<` operator. + * Order instance for strings that compares them lexicographically using JavaScript's `<` operator. + * + * **When to use** + * + * Use when you need lexicographic string ordering. * - * When to use this: - * - When comparing strings alphabetically - * - When sorting string collections - * - As a base for creating orders on types containing strings + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Uses lexicographic (dictionary) ordering - * - Empty string is less than any non-empty string - * - Comparison is case-sensitive + * Uses lexicographic dictionary ordering. The empty string is less than any + * non-empty string, and comparisons are case-sensitive. * * **Example** (String Ordering) * @@ -114,28 +72,24 @@ export function make(compare) { * console.log(Order.String("apple", "apple")) // 0 * ``` * - * See also: - * - {@link mapInput} - Use this order to compare objects by a string property - * - {@link Struct} - Combine with other orders for struct comparison - * + * @see {@link mapInput} to compare objects by a string property + * @see {@link Struct} to combine with other orders for struct comparison * @category instances * @since 4.0.0 */ export const String = /*#__PURE__*/make((self, that) => self < that ? -1 : 1); /** - * An `Order` instance for numbers that compares them numerically. + * Order instance for numbers that compares them numerically. + * + * **When to use** + * + * Use when you need numeric ordering for numbers. * - * When to use this: - * - When comparing numbers for sorting or searching - * - As a base for creating orders on types containing numbers - * - When implementing numeric comparisons in data structures + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - `0` is considered equal to `-0` - * - All `NaN` values are considered equal to each other - * - Any `NaN` is considered less than any non-NaN number - * - Uses standard numeric comparison for all other values + * `0` is considered equal to `-0`. All `NaN` values are considered equal to + * each other, and any `NaN` is considered less than any non-`NaN` number. All + * other values use standard numeric comparison. * * **Example** (Number Ordering) * @@ -150,10 +104,8 @@ export const String = /*#__PURE__*/make((self, that) => self < that ? -1 : 1); * console.log(Order.Number(NaN, 1)) // -1 * ``` * - * See also: - * - {@link mapInput} - Use this order to compare objects by a number property - * - {@link BigInt} - For bigint comparisons - * + * @see {@link mapInput} to compare objects by a number property + * @see {@link BigInt} for bigint comparisons * @category instances * @since 4.0.0 */ @@ -164,17 +116,15 @@ export const Number = /*#__PURE__*/make((self, that) => { return self < that ? -1 : 1; }); /** - * An `Order` instance for booleans where `false` is considered less than `true`. + * Order instance for booleans where `false` is considered less than `true`. + * + * **When to use** + * + * Use when you need boolean ordering where `false` comes before `true`. * - * When to use this: - * - When comparing booleans for sorting or searching - * - As a base for creating orders on types containing booleans - * - When implementing boolean-based comparisons + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - `false` is less than `true` - * - Equal values return `0` + * `false` is less than `true`, and equal values return `0`. * * **Example** (Boolean Ordering) * @@ -186,25 +136,22 @@ export const Number = /*#__PURE__*/make((self, that) => { * console.log(Order.Boolean(true, true)) // 0 * ``` * - * See also: - * - {@link mapInput} - Use this order to compare objects by a boolean property - * + * @see {@link mapInput} to compare objects by a boolean property * @category instances * @since 4.0.0 */ export const Boolean = /*#__PURE__*/make((self, that) => self < that ? -1 : 1); /** - * An `Order` instance for bigints that compares them numerically. + * Order instance for bigints that compares them numerically. + * + * **When to use** + * + * Use when you need numeric ordering for `bigint` values. * - * When to use this: - * - When comparing bigint values for sorting or searching - * - As a base for creating orders on types containing bigints - * - When working with large integers that exceed number precision + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Uses standard numeric comparison for bigint values - * - Handles arbitrarily large integers + * Uses standard numeric comparison for bigint values and handles arbitrarily + * large integers. * * **Example** (BigInt Ordering) * @@ -216,10 +163,8 @@ export const Boolean = /*#__PURE__*/make((self, that) => self < that ? -1 : 1); * console.log(Order.BigInt(1n, 1n)) // 0 * ``` * - * See also: - * - {@link Number} - For regular number comparisons - * - {@link mapInput} - Use this order to compare objects by a bigint property - * + * @see {@link Number} for regular number comparisons + * @see {@link mapInput} to compare objects by a bigint property * @category instances * @since 4.0.0 */ @@ -227,16 +172,15 @@ export const BigInt = /*#__PURE__*/make((self, that) => self < that ? -1 : 1); /** * Creates a new `Order` that reverses the comparison order of the input `Order`. * - * When to use this: - * - When you need descending order instead of ascending - * - When reversing an existing order without modifying the original - * - When creating orders that compare in the opposite direction + * **When to use** + * + * Use when you need the reverse of an existing order. * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns a new order that swaps the arguments before comparison - * - If the original order returns `-1`, the flipped order returns `1`, and vice versa - * - Equal comparisons remain `0` + * **Details** + * + * Returns a new order that swaps the arguments before comparison. If the + * original order returns `-1`, the flipped order returns `1`, and vice versa. + * Equal comparisons remain `0`. * * **Example** (Reversing Order) * @@ -250,11 +194,9 @@ export const BigInt = /*#__PURE__*/make((self, that) => self < that ? -1 : 1); * console.log(flip(1, 1)) // 0 * ``` * - * See also: - * - {@link combine} - Combine orders for multi-criteria comparison - * + * @see {@link combine} to combine orders for multi-criteria comparison * @category combinators - * @since 2.0.0 + * @since 4.0.0 */ export function flip(O) { return make((self, that) => O(that, self)); @@ -263,16 +205,15 @@ export function flip(O) { * Combines two `Order` instances to create a new `Order` that first compares using the first `Order`, * and if the values are equal, then compares using the second `Order`. * - * When to use this: - * - When you need multi-criteria comparison (e.g., sort by age, then by name) - * - When creating composite orders from simpler orders - * - When implementing lexicographic ordering + * **When to use** + * + * Use when you need tie-breaking with exactly two orders. + * + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - First applies the first order; if the result is non-zero, returns that result - * - If the first order returns `0` (equal), applies the second order - * - Returns the first non-zero result, or `0` if both orders return `0` + * First applies the first order. If the result is non-zero, that result is + * returned; otherwise, the second order is applied. The result is the first + * non-zero comparison result, or `0` if both orders return `0`. * * **Example** (Combining Orders) * @@ -297,10 +238,8 @@ export function flip(O) { * console.log(byAgeAndName(person1, person3)) // 1 (Alice (30) > Charlie (25)) * ``` * - * See also: - * - {@link combineAll} - Combine multiple orders from a collection - * - {@link mapInput} - Transform orders to work with different types - * + * @see {@link combineAll} to combine multiple orders from a collection + * @see {@link mapInput} to transform orders to work with different types * @category combining * @since 2.0.0 */ @@ -314,15 +253,14 @@ export const combine = /*#__PURE__*/dual(2, (self, that) => make((a1, a2) => { /** * Creates an `Order` that considers all values as equal. * - * When to use this: - * - When you need an order that doesn't distinguish between values - * - As a default or fallback order when no meaningful comparison exists - * - When implementing optional ordering where equality is sufficient + * **When to use** + * + * Use when you need an order that treats all values as equal. + * + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Always returns `0` regardless of input values - * - Useful as a neutral element in order composition + * Always returns `0` regardless of input values, making it useful as a neutral + * element in order composition. * * **Example** (Always Equal Order) * @@ -336,9 +274,7 @@ export const combine = /*#__PURE__*/dual(2, (self, that) => make((a1, a2) => { * console.log(alwaysEqualOrder(1, 1)) // 0 * ``` * - * See also: - * - {@link combine} - Combine with other orders - * + * @see {@link combine} to combine with other orders * @category constructors * @since 4.0.0 */ @@ -349,17 +285,14 @@ export function alwaysEqual() { * Combines all `Order` instances in the provided collection into a single `Order`. * The resulting `Order` compares using each `Order` in sequence until a non-zero result is found. * - * When to use this: - * - When you have a variable number of orders to combine - * - When combining orders from a collection or array - * - When implementing dynamic multi-criteria sorting + * **When to use** + * + * Use when you need tie-breaking across a variable number of orders. * - * Behavior: - * - Pure function: does not mutate inputs - * - Applies orders in iteration order - * - Returns the first non-zero result from any order - * - Returns `0` only if all orders return `0` - * - Short-circuits on the first non-zero result + * **Details** + * + * Applies orders in iteration order and short-circuits on the first non-zero + * result. It returns `0` only if all orders return `0`. * * **Example** (Combining Multiple Orders) * @@ -383,10 +316,8 @@ export function alwaysEqual() { * console.log(combinedOrder(person1, person2)) // -1 (Same age, Alice < Bob) * ``` * - * See also: - * - {@link combine} - Combine two orders - * - {@link makeReducer} - Create a reducer for combining orders - * + * @see {@link combine} to combine two orders + * @see {@link makeReducer} to create a reducer for combining orders * @category combining * @since 2.0.0 */ @@ -406,16 +337,16 @@ export function combineAll(collection) { * Transforms an `Order` on type `A` into an `Order` on type `B` by providing a function that * maps values of type `B` to values of type `A`. * - * When to use this: - * - When you have an order for a property type and want to compare objects by that property - * - When extracting a comparable value from a complex type - * - When creating orders for types that contain comparable values + * **When to use** + * + * Use when you need to adapt an `Order` to compare a larger value by one + * derived property. * - * Behavior: - * - Pure function: does not mutate inputs - * - Applies the mapping function to both values before comparison - * - The mapping function should be pure and not have side effects - * - Preserves the ordering properties of the original order + * **Details** + * + * Applies the mapping function to both values before comparison. The mapping + * function should be pure and not have side effects so the ordering properties + * of the original order are preserved. * * **Example** (Mapping Input) * @@ -429,27 +360,24 @@ export function combineAll(collection) { * console.log(byLength("aa", "bb")) // 0 * ``` * - * See also: - * - {@link combine} - Combine mapped orders for multi-criteria comparison - * - {@link Struct} - Create orders for structs with multiple fields - * + * @see {@link combine} to combine mapped orders for multi-criteria comparison + * @see {@link Struct} to create orders for structs with multiple fields * @category mapping * @since 2.0.0 */ export const mapInput = /*#__PURE__*/dual(2, (self, f) => make((b1, b2) => self(f(b1), f(b2)))); /** - * An `Order` instance for `Date` objects that compares them chronologically by their timestamp. + * Order instance for `Date` objects that compares them chronologically by their timestamp. * - * When to use this: - * - When comparing dates for sorting or searching - * - As a base for creating orders on types containing dates - * - When implementing time-based comparisons + * **When to use** * - * Behavior: - * - Pure function: does not mutate inputs - * - Compares dates by their underlying timestamp (milliseconds since epoch) - * - Earlier dates are less than later dates - * - Invalid dates are compared as if they were valid (uses `getTime()` result) + * Use when you need chronological ordering for JavaScript date values. + * + * **Details** + * + * Compares dates by their underlying timestamp in milliseconds since the epoch. + * Earlier dates are less than later dates. Invalid dates are compared through + * their `getTime()` result. * * **Example** (Date Ordering) * @@ -464,9 +392,7 @@ export const mapInput = /*#__PURE__*/dual(2, (self, f) => make((b1, b2) => self( * console.log(Order.Date(date1, date1)) // 0 * ``` * - * See also: - * - {@link mapInput} - Use this order to compare objects by a date property - * + * @see {@link mapInput} to compare objects by a date property * @category instances * @since 2.0.0 */ @@ -474,17 +400,15 @@ export const Date = /*#__PURE__*/mapInput(Number, date => date.getTime()); /** * Creates an `Order` for a tuple type based on orders for each element. * - * When to use this: - * - When comparing tuples with different types for each position - * - When you need type-safe tuple ordering - * - When working with fixed-length heterogeneous collections + * **When to use** + * + * Use when you need fixed-length tuple ordering with per-position orders. + * + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Compares tuples element-by-element using the corresponding order - * - Stops at the first non-zero comparison result - * - Requires tuples to have the same length as the order collection - * - Returns `0` if all elements are equal + * Compares tuples element-by-element using the corresponding order and stops at + * the first non-zero comparison result. Tuples must have the same length as the + * order collection, and the result is `0` only if all elements are equal. * * **Example** (Tuple Ordering) * @@ -498,9 +422,7 @@ export const Date = /*#__PURE__*/mapInput(Number, date => date.getTime()); * console.log(tupleOrder([1, "a"], [1, "a"])) // 0 * ``` * - * See also: - * - {@link Array} - Compare arrays with length consideration - * + * @see {@link Array} to compare arrays with length consideration * @category combinators * @since 4.0.0 */ @@ -537,17 +459,16 @@ export { /** * Creates an `Order` for arrays by applying the given `Order` to each element, then comparing by length if all elements are equal. * - * When to use this: - * - When comparing arrays of the same element type - * - When you want shorter arrays to be considered less than longer arrays - * - When sorting collections of arrays + * **When to use** + * + * Use when you need lexicographic ordering for arrays of one element type. + * + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Compares arrays element-by-element using the provided order - * - Stops at the first non-zero comparison result - * - If all elements are equal, shorter arrays are less than longer arrays - * - Returns `0` only if arrays have the same length and all elements are equal + * Compares arrays element-by-element using the provided order and stops at the + * first non-zero comparison result. If all elements are equal, shorter arrays + * are less than longer arrays. The result is `0` only if arrays have the same + * length and all elements are equal. * * **Example** (Array Element Ordering) * @@ -562,9 +483,7 @@ export { * console.log(arrayOrder([1, 2], [1, 2])) // 0 * ``` * - * See also: - * - {@link Tuple} - Type-safe tuple ordering - * + * @see {@link Tuple} for type-safe tuple ordering * @category combinators * @since 4.0.0 */ @@ -572,17 +491,15 @@ Array_ as Array }; /** * Creates an `Order` for structs by applying the given `Order`s to each property in sequence. * - * When to use this: - * - When comparing objects with multiple properties - * - When you need multi-field comparison for structs - * - When creating orders for complex data types + * **When to use** + * + * Use when you need multi-field ordering for objects with known properties. + * + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Compares structs field-by-field in the order of keys in the fields object - * - Stops at the first non-zero comparison result - * - Returns `0` only if all fields are equal - * - Field order matters: earlier fields take precedence + * Compares structs field-by-field in the key order of the fields object and + * stops at the first non-zero comparison result. Field order matters: earlier + * fields take precedence. The result is `0` only if all fields are equal. * * **Example** (Struct Ordering) * @@ -603,10 +520,8 @@ Array_ as Array }; * console.log(personOrder(person1, person1)) // 0 * ``` * - * See also: - * - {@link combine} - Combine orders manually - * - {@link mapInput} - Extract and compare by a single property - * + * @see {@link combine} to combine orders manually + * @see {@link mapInput} to extract and compare by a single property * @category combinators * @since 4.0.0 */ @@ -623,18 +538,16 @@ export function Struct(fields) { }); } /** - * Tests whether one value is strictly less than another according to the given order. + * Checks whether one value is strictly less than another according to the given order. + * + * **When to use** + * + * Use when you need a boolean less-than predicate using an `Order`. * - * When to use this: - * - When you need a boolean predicate instead of an ordering result - * - When checking if a value is less than another in conditional logic - * - When implementing range checks or comparisons + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns `true` if the order returns `-1` (first value is less than second) - * - Returns `false` for equal or greater values - * - Supports curried and uncurried call styles + * Returns `true` if the order returns `-1`, meaning the first value is less + * than the second. Equal or greater values return `false`. * * **Example** (Less Than) * @@ -648,27 +561,23 @@ export function Struct(fields) { * console.log(isLessThanNumber(1, 1)) // false * ``` * - * See also: - * - {@link isLessThanOrEqualTo} - Non-strict less than or equal - * - {@link isGreaterThan} - Strict greater than - * + * @see {@link isLessThanOrEqualTo} for non-strict less than or equal + * @see {@link isGreaterThan} for strict greater than * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export const isLessThan = O => dual(2, (self, that) => O(self, that) === -1); /** - * Tests whether one value is strictly greater than another according to the given order. + * Checks whether one value is strictly greater than another according to the given order. + * + * **When to use** + * + * Use when you need a boolean greater-than predicate using an `Order`. * - * When to use this: - * - When you need a boolean predicate instead of an ordering result - * - When checking if a value is greater than another in conditional logic - * - When implementing range checks or comparisons + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns `true` if the order returns `1` (first value is greater than second) - * - Returns `false` for equal or lesser values - * - Supports curried and uncurried call styles + * Returns `true` if the order returns `1`, meaning the first value is greater + * than the second. Equal or lesser values return `false`. * * **Example** (Greater Than) * @@ -682,27 +591,23 @@ export const isLessThan = O => dual(2, (self, that) => O(self, that) === -1); * console.log(isGreaterThanNumber(1, 1)) // false * ``` * - * See also: - * - {@link isGreaterThanOrEqualTo} - Non-strict greater than or equal - * - {@link isLessThan} - Strict less than - * + * @see {@link isGreaterThanOrEqualTo} for non-strict greater than or equal + * @see {@link isLessThan} for strict less than * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export const isGreaterThan = O => dual(2, (self, that) => O(self, that) === 1); /** - * Tests whether one value is less than or equal to another according to the given order. + * Checks whether one value is less than or equal to another according to the given order. * - * When to use this: - * - When you need a boolean predicate for non-strict comparison - * - When checking if a value is within a range (inclusive lower bound) - * - When implementing inclusive comparisons + * **When to use** * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns `true` if the order returns `-1` or `0` (less than or equal) - * - Returns `false` only if the order returns `1` (greater than) - * - Supports curried and uncurried call styles + * Use when you need a boolean less-than-or-equal predicate using an `Order`. + * + * **Details** + * + * Returns `true` if the order returns `-1` or `0`, and returns `false` only if + * the order returns `1`. * * **Example** (Less Than Or Equal) * @@ -716,27 +621,24 @@ export const isGreaterThan = O => dual(2, (self, that) => O(self, that) === 1); * console.log(isLessThanOrEqualToNumber(2, 1)) // false * ``` * - * See also: - * - {@link isLessThan} - Strict less than - * - {@link isGreaterThan} - Strict greater than - * + * @see {@link isLessThan} for strict less than + * @see {@link isGreaterThan} for strict greater than * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export const isLessThanOrEqualTo = O => dual(2, (self, that) => O(self, that) !== 1); /** - * Tests whether one value is greater than or equal to another according to the given order. + * Checks whether one value is greater than or equal to another according to the given order. * - * When to use this: - * - When you need a boolean predicate for non-strict comparison - * - When checking if a value is within a range (inclusive upper bound) - * - When implementing inclusive comparisons + * **When to use** * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns `true` if the order returns `1` or `0` (greater than or equal) - * - Returns `false` only if the order returns `-1` (less than) - * - Supports curried and uncurried call styles + * Use when you need a boolean greater-than-or-equal predicate using an + * `Order`. + * + * **Details** + * + * Returns `true` if the order returns `1` or `0`, and returns `false` only if + * the order returns `-1`. * * **Example** (Greater Than Or Equal) * @@ -750,27 +652,24 @@ export const isLessThanOrEqualTo = O => dual(2, (self, that) => O(self, that) != * console.log(isGreaterThanOrEqualToNumber(1, 2)) // false * ``` * - * See also: - * - {@link isGreaterThan} - Strict greater than - * - {@link isLessThanOrEqualTo} - Less than or equal - * + * @see {@link isGreaterThan} for strict greater than + * @see {@link isLessThanOrEqualTo} for less than or equal * @category predicates - * @since 2.0.0 + * @since 4.0.0 */ export const isGreaterThanOrEqualTo = O => dual(2, (self, that) => O(self, that) !== -1); /** * Returns the minimum of two values according to the given order. If they are equal, returns the first argument. * - * When to use this: - * - When you need to find the smaller of two values - * - When implementing min/max operations - * - When selecting values based on ordering + * **When to use** + * + * Use when you need to select the smaller of two values according to an + * `Order`. * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns the value that compares as less than or equal to the other - * - If values are equal, returns the first argument - * - Supports curried and uncurried call styles + * **Details** + * + * Returns the value that compares as less than or equal to the other value. If + * values are equal, the first argument is returned. * * **Example** (Minimum Value) * @@ -784,10 +683,8 @@ export const isGreaterThanOrEqualTo = O => dual(2, (self, that) => O(self, that) * console.log(minNumber(1, 1)) // 1 * ``` * - * See also: - * - {@link max} - Maximum of two values - * - {@link clamp} - Clamp a value between min and max - * + * @see {@link max} for the maximum of two values + * @see {@link clamp} to clamp a value between min and max * @category comparisons * @since 2.0.0 */ @@ -795,16 +692,15 @@ export const min = O => dual(2, (self, that) => self === that || O(self, that) < /** * Returns the maximum of two values according to the given order. If they are equal, returns the first argument. * - * When to use this: - * - When you need to find the larger of two values - * - When implementing min/max operations - * - When selecting values based on ordering + * **When to use** + * + * Use when you need to select the larger of two values according to an + * `Order`. * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns the value that compares as greater than or equal to the other - * - If values are equal, returns the first argument - * - Supports curried and uncurried call styles + * **Details** + * + * Returns the value that compares as greater than or equal to the other value. + * If values are equal, the first argument is returned. * * **Example** (Maximum Value) * @@ -818,29 +714,26 @@ export const min = O => dual(2, (self, that) => self === that || O(self, that) < * console.log(maxNumber(1, 1)) // 1 * ``` * - * See also: - * - {@link min} - Minimum of two values - * - {@link clamp} - Clamp a value between min and max - * + * @see {@link min} for the minimum of two values + * @see {@link clamp} to clamp a value between min and max * @category comparisons * @since 2.0.0 */ export const max = O => dual(2, (self, that) => self === that || O(self, that) > -1 ? self : that); /** - * Clamps a value between a minimum and a maximum according to the given order. + * Restricts a value between a minimum and a maximum according to the given order. * - * When to use this: - * - When you need to restrict a value to a specific range - * - When implementing bounds checking and normalization - * - When ensuring values stay within valid ranges + * **When to use** * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns the value if it's between minimum and maximum (inclusive) - * - Returns minimum if the value is less than minimum - * - Returns maximum if the value is greater than maximum - * - Supports curried and uncurried call styles - * - Requires that minimum <= maximum according to the order + * Use when you need to clamp a value to an inclusive range according to an + * `Order`. + * + * **Details** + * + * Returns the value itself when it is between minimum and maximum, inclusive. + * Values below the range return minimum, and values above the range return + * maximum. The minimum must be less than or equal to the maximum according to + * the order. * * **Example** (Clamping Values) * @@ -854,29 +747,27 @@ export const max = O => dual(2, (self, that) => self === that || O(self, that) > * console.log(clamp(6)) // 5 * ``` * - * See also: - * - {@link min} - Minimum of two values - * - {@link max} - Maximum of two values - * - {@link isBetween} - Check if a value is within a range - * + * @see {@link min} for the minimum of two values + * @see {@link max} for the maximum of two values + * @see {@link isBetween} to check if a value is within a range * @category comparisons * @since 2.0.0 */ export const clamp = O => dual(2, (self, options) => min(O)(options.maximum, max(O)(options.minimum, self))); /** - * Tests whether a value is between a minimum and a maximum (inclusive) according to the given order. + * Checks whether a value is between a minimum and a maximum (inclusive) according to the given order. + * + * **When to use** + * + * Use when you need range checks that respect domain-specific ordering, such as + * dates, versions, or custom priorities, instead of JavaScript numeric + * comparison. * - * When to use this: - * - When validating that a value is within a valid range - * - When implementing range checks for bounds validation - * - When filtering or selecting values within a range + * **Details** * - * Behavior: - * - Pure function: does not mutate inputs - * - Returns `true` if the value is greater than or equal to minimum and less than or equal to maximum - * - Returns `false` if the value is outside the range - * - Supports curried and uncurried call styles - * - Both bounds are inclusive + * Returns `true` when the value is greater than or equal to minimum and less + * than or equal to maximum. Values outside the range return `false`. Both + * bounds are inclusive. * * **Example** (Checking Range) * @@ -892,11 +783,9 @@ export const clamp = O => dual(2, (self, options) => min(O)(options.maximum, max * console.log(betweenNumber(11, { minimum: 1, maximum: 10 })) // false * ``` * - * See also: - * - {@link clamp} - Clamp a value to a range - * - {@link isLessThanOrEqualTo} - Less than or equal check - * - {@link isGreaterThanOrEqualTo} - Greater than or equal check - * + * @see {@link clamp} to clamp a value to a range + * @see {@link isLessThanOrEqualTo} for less than or equal check + * @see {@link isGreaterThanOrEqualTo} for greater than or equal check * @category predicates * @since 4.0.0 */ @@ -904,16 +793,16 @@ export const isBetween = O => dual(2, (self, options) => !isLessThan(O)(self, op /** * Creates a `Reducer` for combining `Order` instances, useful for aggregating orders in collections. * - * When to use this: - * - When you need to combine multiple orders from a collection using reducer patterns - * - When implementing fold operations over collections of orders - * - When working with reducers that operate on orders + * **When to use** + * + * Use when you need a reducer that combines orders. + * + * **Details** * - * Behavior: - * - Returns a reducer that combines orders using {@link combine} - * - Uses {@link alwaysEqual} as the identity element (returns `0` for empty collections) - * - Uses {@link combineAll} for combining collections of orders - * - The reducer can be used with fold operations on collections + * Returns a reducer that combines orders using `combine`, uses `alwaysEqual` as + * the identity element for empty collections, and uses `combineAll` for + * combining collections of orders. The reducer can be used with fold operations + * on collections. * * **Example** (Creating a Reducer) * @@ -927,12 +816,10 @@ export const isBetween = O => dual(2, (self, options) => !isLessThan(O)(self, op * console.log(combined(1, 2)) // -1 (uses first order) * ``` * - * See also: - * - {@link combine} - Combine two orders - * - {@link combineAll} - Combine multiple orders - * - {@link Reducer} - Reducer type for collection operations - * - * @category utilities + * @see {@link combine} to combine two orders + * @see {@link combineAll} to combine multiple orders + * @see {@link Reducer} for reducing orders as a collection operation + * @category constructors * @since 4.0.0 */ export function makeReducer() { diff --git a/.opencode/node_modules/effect/dist/Order.js.map b/.opencode/node_modules/effect/dist/Order.js.map index d2801f3af7d69f6becd4bc513716b34567c5aaf2..d8bb86fd7bf9f09703222faa0008c7bec7bbdf8c 100644 --- a/.opencode/node_modules/effect/dist/Order.js.map +++ b/.opencode/node_modules/effect/dist/Order.js.map @@ -1 +1 @@ -{"version":3,"file":"Order.js","names":["dual","Reducer","make","compare","self","that","String","Number","globalThis","isNaN","Boolean","BigInt","flip","O","combine","a1","a2","out","alwaysEqual","combineAll","collection","mapInput","f","b1","b2","Date","date","getTime","Tuple","elements","len","length","i","o","Array_","aLen","bLen","Math","min","Array","Struct","fields","keys","Object","key","isLessThan","isGreaterThan","isLessThanOrEqualTo","isGreaterThanOrEqualTo","max","clamp","options","maximum","minimum","isBetween","makeReducer"],"sources":["../src/Order.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,SAASA,IAAI,QAAQ,eAAe;AAGpC,OAAO,KAAKC,OAAO,MAAM,cAAc;AA8DvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,OAAM,SAAUC,IAAIA,CAClBC,OAAyC;EAEzC,OAAO,CAACC,IAAI,EAAEC,IAAI,KAAKD,IAAI,KAAKC,IAAI,GAAG,CAAC,GAAGF,OAAO,CAACC,IAAI,EAAEC,IAAI,CAAC;AAChE;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,MAAMC,MAAM,gBAAkBJ,IAAI,CAAC,CAACE,IAAI,EAAEC,IAAI,KAAKD,IAAI,GAAGC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAO,MAAME,MAAM,gBAAkBL,IAAI,CAAC,CAACE,IAAI,EAAEC,IAAI,KAAI;EACvD,IAAIG,UAAU,CAACD,MAAM,CAACE,KAAK,CAACL,IAAI,CAAC,IAAII,UAAU,CAACD,MAAM,CAACE,KAAK,CAACJ,IAAI,CAAC,EAAE,OAAO,CAAC;EAC5E,IAAIG,UAAU,CAACD,MAAM,CAACE,KAAK,CAACL,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,EAAC;EAC7C,IAAII,UAAU,CAACD,MAAM,CAACE,KAAK,CAACJ,IAAI,CAAC,EAAE,OAAO,CAAC,EAAC;EAC5C,OAAOD,IAAI,GAAGC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC;AAC7B,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,O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AAI,CAAC;AAErF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,OAAO,MAAM6C,KAAK,GAAOrC,CAAW,IAUlCb,IAAI,CACF,CAAC,EACD,CAACI,IAAO,EAAE+C,OAGT,KAAQb,GAAG,CAACzB,CAAC,CAAC,CAACsC,OAAO,CAACC,OAAO,EAAEH,GAAG,CAACpC,CAAC,CAAC,CAACsC,OAAO,CAACE,OAAO,EAAEjD,IAAI,CAAC,CAAC,CAChE;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,OAAO,MAAMkD,SAAS,GAAOzC,CAAW,IAUtCb,IAAI,CACF,CAAC,EACD,CAACI,IAAO,EAAE+C,OAGT,KAAc,CAACN,UAAU,CAAChC,CAAC,CAAC,CAACT,IAAI,EAAE+C,OAAO,CAACE,OAAO,CAAC,IAAI,CAACP,aAAa,CAACjC,CAAC,CAAC,CAACT,IAAI,EAAE+C,OAAO,CAACC,OAAO,CAAC,CACjG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,OAAM,SAAUG,WAAWA,CAAA;EACzB,OAAOtD,OAAO,CAACC,IAAI,CACjBY,OAAO,EACP,MAAM,CAAC,EACPK,UAAU,CACX;AACH","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Order.js","names":["dual","Reducer","make","compare","self","that","String","Number","globalThis","isNaN","Boolean","BigInt","flip","O","combine","a1","a2","out","alwaysEqual","combineAll","collection","mapInput","f","b1","b2","Date","date","getTime","Tuple","elements","len","length","i","o","Array_","aLen","bLen","Math","min","Array","Struct","fields","keys","Object","key","isLessThan","isGreaterThan","isLessThanOrEqualTo","isGreaterThanOrEqualTo","max","clamp","options","maximum","minimum","isBetween","makeReducer"],"sources":["../src/Order.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;AAYA,SAASA,IAAI,QAAQ,eAAe;AAGpC,OAAO,KAAKC,OAAO,MAAM,cAAc;AA4DvC;;;;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A,OAAO,MAAMkD,SAAS,GAAOzC,CAAW,IAUtCb,IAAI,CACF,CAAC,EACD,CAACI,IAAO,EAAE+C,OAGT,KAAc,CAACN,UAAU,CAAChC,CAAC,CAAC,CAACT,IAAI,EAAE+C,OAAO,CAACE,OAAO,CAAC,IAAI,CAACP,aAAa,CAACjC,CAAC,CAAC,CAACT,IAAI,EAAE+C,OAAO,CAACC,OAAO,CAAC,CACjG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAM,SAAUG,WAAWA,CAAA;EACzB,OAAOtD,OAAO,CAACC,IAAI,CACjBY,OAAO,EACP,MAAM,CAAC,EACPK,UAAU,CACX;AACH","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Ordering.d.ts b/.opencode/node_modules/effect/dist/Ordering.d.ts index e24bf8539326826cc2d44658d5f1f6777fde7407..780e10b9c5233adfd9bc234ea5e4631ce25862b3 100644 --- a/.opencode/node_modules/effect/dist/Ordering.d.ts +++ b/.opencode/node_modules/effect/dist/Ordering.d.ts @@ -1,40 +1,30 @@ /** - * @fileoverview - * The Ordering module provides utilities for working with comparison results and ordering operations. - * An Ordering represents the result of comparing two values, expressing whether the first value is - * less than (-1), equal to (0), or greater than (1) the second value. - * - * This module is fundamental for building comparison functions, sorting algorithms, and implementing - * ordered data structures. It provides composable operations for combining multiple comparison results - * and pattern matching on ordering outcomes. - * - * Key Features: - * - Type-safe representation of comparison results (-1, 0, 1) - * - Composable operations for combining multiple orderings - * - Pattern matching utilities for handling different ordering cases - * - Ordering reversal and combination functions - * - Integration with Effect's functional programming patterns - * - * Common Use Cases: - * - Implementing custom comparison functions - * - Building complex sorting criteria - * - Combining multiple comparison results - * - Creating ordered data structures - * - Pattern matching on comparison outcomes + * The standard result of comparing two values. An `Ordering` is `-1` when the + * first value is less than the second, `0` when both values compare as equal, + * and `1` when the first value is greater than the second. This module also + * provides helpers for reversing an ordering, matching on the three cases, and + * combining ordered comparison results with a reducer. * * @since 2.0.0 - * @category utilities */ import type { LazyArg } from "./Function.ts"; import * as Reducer_ from "./Reducer.ts"; /** * Represents the result of comparing two values. * + * **When to use** + * + * Use to model a normalized comparison result that is exactly less than, + * equal to, or greater than. + * + * **Details** + * * - `-1` indicates the first value is less than the second * - `0` indicates the values are equal * - `1` indicates the first value is greater than the second * - * @example + * **Example** (Defining comparison results) + * * ```ts * import type { Ordering } from "effect" * @@ -55,15 +45,21 @@ import * as Reducer_ from "./Reducer.ts"; * } * ``` * - * @category model + * @category models * @since 2.0.0 */ export type Ordering = -1 | 0 | 1; /** - * Inverts the ordering of the input Ordering. + * Reverses the ordering of the input Ordering. * This is useful for creating descending sort orders from ascending ones. * - * @example + * **When to use** + * + * Use to flip an ordering result when reversing sort direction or comparison + * priority. + * + * **Example** (Reversing comparison order) + * * ```ts * import { Ordering } from "effect" * @@ -90,23 +86,27 @@ export type Ordering = -1 | 0 | 1; * } * ``` * - * @category transformations + * @category transforming * @since 2.0.0 */ export declare const reverse: (o: Ordering) => Ordering; /** - * Depending on the `Ordering` parameter given to it, returns a value produced by one of the 3 functions provided as parameters. + * Matches an `Ordering` value and returns the branch selected by that ordering. + * + * **When to use** + * + * Use to branch on the three possible comparison outcomes in one expression. + * + * **Example** (Pattern matching on orderings) * - * @example * ```ts - * import { Ordering } from "effect" - * import { constant } from "effect/Function" + * import { Function, Ordering } from "effect" * import * as assert from "node:assert" * * const toMessage = Ordering.match({ - * onLessThan: constant("less than"), - * onEqual: constant("equal"), - * onGreaterThan: constant("greater than") + * onLessThan: Function.constant("less than"), + * onEqual: Function.constant("equal"), + * onGreaterThan: Function.constant("greater than") * }) * * assert.deepStrictEqual(toMessage(-1), "less than") @@ -119,18 +119,22 @@ export declare const reverse: (o: Ordering) => Ordering; */ export declare const match: { /** - * Depending on the `Ordering` parameter given to it, returns a value produced by one of the 3 functions provided as parameters. + * Matches an `Ordering` value and returns the branch selected by that ordering. + * + * **When to use** + * + * Use to branch on the three possible comparison outcomes in one expression. + * + * **Example** (Pattern matching on orderings) * - * @example * ```ts - * import { Ordering } from "effect" - * import { constant } from "effect/Function" + * import { Function, Ordering } from "effect" * import * as assert from "node:assert" * * const toMessage = Ordering.match({ - * onLessThan: constant("less than"), - * onEqual: constant("equal"), - * onGreaterThan: constant("greater than") + * onLessThan: Function.constant("less than"), + * onEqual: Function.constant("equal"), + * onGreaterThan: Function.constant("greater than") * }) * * assert.deepStrictEqual(toMessage(-1), "less than") @@ -147,18 +151,22 @@ export declare const match: { readonly onGreaterThan: LazyArg; }): (self: Ordering) => A | B | C; /** - * Depending on the `Ordering` parameter given to it, returns a value produced by one of the 3 functions provided as parameters. + * Matches an `Ordering` value and returns the branch selected by that ordering. + * + * **When to use** + * + * Use to branch on the three possible comparison outcomes in one expression. + * + * **Example** (Pattern matching on orderings) * - * @example * ```ts - * import { Ordering } from "effect" - * import { constant } from "effect/Function" + * import { Function, Ordering } from "effect" * import * as assert from "node:assert" * * const toMessage = Ordering.match({ - * onLessThan: constant("less than"), - * onEqual: constant("equal"), - * onGreaterThan: constant("greater than") + * onLessThan: Function.constant("less than"), + * onEqual: Function.constant("equal"), + * onGreaterThan: Function.constant("greater than") * }) * * assert.deepStrictEqual(toMessage(-1), "less than") @@ -176,11 +184,24 @@ export declare const match: { }): A | B | C; }; /** - * A `Reducer` for combining `Ordering`s. + * Reducer for combining `Ordering`s. + * + * **When to use** + * + * Use to combine multiple comparison results in priority order, such as + * checking secondary criteria only when earlier criteria compare as equal. + * + * **Details** * * If any of the `Ordering`s is non-zero, the result is the first non-zero `Ordering`. * If all the `Ordering`s are zero, the result is zero. * + * **Gotchas** + * + * `combineAll` stops consuming the iterable as soon as it finds a non-zero + * `Ordering`. + * + * @category ordering * @since 4.0.0 */ export declare const Reducer: Reducer_.Reducer; diff --git a/.opencode/node_modules/effect/dist/Ordering.d.ts.map b/.opencode/node_modules/effect/dist/Ordering.d.ts.map index a719cea7da9f2af85adfe00d3e60296e5c8cd822..1c8d0da0d7b2b2a899fb0f75440cff51fe9d6f34 100644 --- a/.opencode/node_modules/effect/dist/Ordering.d.ts.map +++ b/.opencode/node_modules/effect/dist/Ordering.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Ordering.d.ts","sourceRoot":"","sources":["../src/Ordering.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,KAAK,QAAQ,MAAM,cAAc,CAAA;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,OAAO,GAAI,GAAG,QAAQ,KAAG,QAA6C,CAAA;AAEnF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,KAAK,EAAE;IAClB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EACV,OAAO,EAAE;QACP,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;QAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;QAC5B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;KACnC,GACA,CAAC,IAAI,EAAE,QAAQ,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAChC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EACV,CAAC,EAAE,QAAQ,EACX,OAAO,EAAE;QACP,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;QAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,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EACV,CAAC,EAAE,QAAQ,EACX,OAAO,EAAE;QACP,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;QAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;QAC5B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;KACnC,GACA,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CAQwE,CAAA;AAEtF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAY9C,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Ordering.js b/.opencode/node_modules/effect/dist/Ordering.js index 1663cc18a675aa0d2801585f198df4ad8642f833..a1a2ddaf7f5663abe954444cb286a04cbdbdb97e 100644 --- a/.opencode/node_modules/effect/dist/Ordering.js +++ b/.opencode/node_modules/effect/dist/Ordering.js @@ -1,10 +1,16 @@ import { dual } from "./Function.js"; import * as Reducer_ from "./Reducer.js"; /** - * Inverts the ordering of the input Ordering. + * Reverses the ordering of the input Ordering. * This is useful for creating descending sort orders from ascending ones. * - * @example + * **When to use** + * + * Use to flip an ordering result when reversing sort direction or comparison + * priority. + * + * **Example** (Reversing comparison order) + * * ```ts * import { Ordering } from "effect" * @@ -31,23 +37,27 @@ import * as Reducer_ from "./Reducer.js"; * } * ``` * - * @category transformations + * @category transforming * @since 2.0.0 */ export const reverse = o => o === -1 ? 1 : o === 1 ? -1 : 0; /** - * Depending on the `Ordering` parameter given to it, returns a value produced by one of the 3 functions provided as parameters. + * Matches an `Ordering` value and returns the branch selected by that ordering. + * + * **When to use** + * + * Use to branch on the three possible comparison outcomes in one expression. + * + * **Example** (Pattern matching on orderings) * - * @example * ```ts - * import { Ordering } from "effect" - * import { constant } from "effect/Function" + * import { Function, Ordering } from "effect" * import * as assert from "node:assert" * * const toMessage = Ordering.match({ - * onLessThan: constant("less than"), - * onEqual: constant("equal"), - * onGreaterThan: constant("greater than") + * onLessThan: Function.constant("less than"), + * onEqual: Function.constant("equal"), + * onGreaterThan: Function.constant("greater than") * }) * * assert.deepStrictEqual(toMessage(-1), "less than") @@ -64,11 +74,24 @@ export const match = /*#__PURE__*/dual(2, (self, { onLessThan }) => self === -1 ? onLessThan() : self === 0 ? onEqual() : onGreaterThan()); /** - * A `Reducer` for combining `Ordering`s. + * Reducer for combining `Ordering`s. + * + * **When to use** + * + * Use to combine multiple comparison results in priority order, such as + * checking secondary criteria only when earlier criteria compare as equal. + * + * **Details** * * If any of the `Ordering`s is non-zero, the result is the first non-zero `Ordering`. * If all the `Ordering`s are zero, the result is zero. * + * **Gotchas** + * + * `combineAll` stops consuming the iterable as soon as it finds a non-zero + * `Ordering`. + * + * @category ordering * @since 4.0.0 */ export const Reducer = /*#__PURE__*/Reducer_.make((self, that) => self !== 0 ? self : that, 0, collection => { diff --git a/.opencode/node_modules/effect/dist/Ordering.js.map b/.opencode/node_modules/effect/dist/Ordering.js.map index 0a38dd40da7ecbee93cd5e900f996a363c73ca89..e99fe53425ef56e40b5d1c00786cfe464f5beb2a 100644 --- a/.opencode/node_modules/effect/dist/Ordering.js.map +++ b/.opencode/node_modules/effect/dist/Ordering.js.map @@ -1 +1 @@ -{"version":3,"file":"Ordering.js","names":["dual","Reducer_","reverse","o","match","self","onEqual","onGreaterThan","onLessThan","Reducer","make","that","collection","ordering"],"sources":["../src/Ordering.ts"],"sourcesContent":[null],"mappings":"AA4BA,SAASA,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,QAAQ,MAAM,cAAc;AAmCxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,OAAO,MAAMC,OAAO,GAAIC,CAAW,IAAgBA,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,GAAGA,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAE;AAEnF;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMC,KAAK,gBA8DdJ,IAAI,CAAC,CAAC,EAAE,CACVK,IAAc,EACd;EAAEC,OAAO;EAAEC,aAAa;EAAEC;AAAU,CAInC,KACaH,IAAI,KAAK,CAAC,CAAC,GAAGG,UAAU,EAAE,GAAGH,IAAI,KAAK,CAAC,GAAGC,OAAO,EAAE,GAAGC,aAAa,EAAE,CAAC;AAEtF;;;;;;;;AAQA,OAAO,MAAME,OAAO,gBAA+BR,QAAQ,CAACS,IAAI,CAC9D,CAACL,IAAI,EAAEM,IAAI,KAAKN,IAAI,KAAK,CAAC,GAAGA,IAAI,GAAGM,IAAI,EACxC,CAAC,EACAC,UAAU,IAAI;EACb,IAAIC,QAAQ,GAAa,CAAC;EAC1B,KAAKA,QAAQ,IAAID,UAAU,EAAE;IAC3B,IAAIC,QAAQ,KAAK,CAAC,EAAE;MAClB,OAAOA,QAAQ;IACjB;EACF;EACA,OAAOA,QAAQ;AACjB,CAAC,CACF","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Ordering.js","names":["dual","Reducer_","reverse","o","match","self","onEqual","onGreaterThan","onLessThan","Reducer","make","that","collection","ordering"],"sources":["../src/Ordering.ts"],"sourcesContent":[null],"mappings":"AAUA,SAASA,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,QAAQ,MAAM,cAAc;AA2CxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,OAAO,MAAMC,OAAO,GAAIC,CAAW,IAAgBA,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,GAAGA,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAE;AAEnF;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,MAAMC,KAAK,gBAsEdJ,IAAI,CAAC,CAAC,EAAE,CACVK,IAAc,EACd;EAAEC,OAAO;EAAEC,aAAa;EAAEC;AAAU,CAInC,KACaH,IAAI,KAAK,CAAC,CAAC,GAAGG,UAAU,EAAE,GAAGH,IAAI,KAAK,CAAC,GAAGC,OAAO,EAAE,GAAGC,aAAa,EAAE,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAME,OAAO,gBAA+BR,QAAQ,CAACS,IAAI,CAC9D,CAACL,IAAI,EAAEM,IAAI,KAAKN,IAAI,KAAK,CAAC,GAAGA,IAAI,GAAGM,IAAI,EACxC,CAAC,EACAC,UAAU,IAAI;EACb,IAAIC,QAAQ,GAAa,CAAC;EAC1B,KAAKA,QAAQ,IAAID,UAAU,EAAE;IAC3B,IAAIC,QAAQ,KAAK,CAAC,EAAE;MAClB,OAAOA,QAAQ;IACjB;EACF;EACA,OAAOA,QAAQ;AACjB,CAAC,CACF","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/PartitionedSemaphore.d.ts b/.opencode/node_modules/effect/dist/PartitionedSemaphore.d.ts index 614126ff58d12f7d5200a1c944136a090bd1c8f7..ba99c8a2a1f0c392f5bbee6a0f88b512ff922d6c 100644 --- a/.opencode/node_modules/effect/dist/PartitionedSemaphore.d.ts +++ b/.opencode/node_modules/effect/dist/PartitionedSemaphore.d.ts @@ -1,26 +1,58 @@ /** + * The `PartitionedSemaphore` module provides a semaphore for limiting + * concurrency across a shared permit pool while keeping waiters grouped by + * partition key. A `PartitionedSemaphore` is useful when many independent + * groups of work compete for the same bounded resource and each group should + * make progress without one busy group monopolizing released permits. + * * @since 4.0.0 */ import * as Effect from "./Effect.ts"; import * as Option from "./Option.ts"; /** + * Runtime type identifier used to mark values that implement + * `PartitionedSemaphore`. + * + * **Details** + * + * This marker is part of the runtime representation of partitioned semaphore + * values. + * + * @category type IDs * @since 4.0.0 - * @category models */ export declare const PartitionedTypeId: PartitionedTypeId; /** + * Literal type of the `PartitionedSemaphore` runtime type identifier. + * + * **When to use** + * + * Use to type fields that store the exact `PartitionedSemaphore` runtime marker. + * + * **Details** + * + * Use this type when declaring fields that must contain the exact + * `PartitionedTypeId` marker value. + * + * @category type IDs * @since 4.0.0 - * @category models */ export type PartitionedTypeId = "~effect/PartitionedSemaphore"; /** * A `PartitionedSemaphore` controls access to a shared permit pool while * tracking waiters by partition key. * + * **When to use** + * + * Use to coordinate shared permits across partition keys so waiting groups make + * progress without one group monopolizing the pool. + * + * **Details** + * * Waiting permits are distributed across partitions in round-robin order. * - * @since 4.0.0 * @category models + * @since 3.19.4 */ export interface PartitionedSemaphore { readonly [PartitionedTypeId]: PartitionedTypeId; @@ -33,25 +65,67 @@ export interface PartitionedSemaphore { readonly withPermitsIfAvailable: (permits: number) => (effect: Effect.Effect) => Effect.Effect, E, R>; } /** - * @since 4.0.0 + * Alias interface for a `PartitionedSemaphore` keyed by values of type `K`. + * + * **When to use** + * + * Use as an alternate exported name for a partitioned permit pool keyed by `K`. + * + * **Details** + * + * This interface does not add members beyond `PartitionedSemaphore`; it + * provides an alternate exported name for APIs that refer to a partitioned + * permit pool. + * * @category models + * @since 4.0.0 */ export interface Partitioned extends PartitionedSemaphore { } /** - * Creates a `PartitionedSemaphore` unsafely. + * Constructs a `PartitionedSemaphore` synchronously, outside of `Effect`. + * + * **When to use** + * + * Use when you need to construct a partitioned semaphore synchronously outside + * an `Effect` workflow. + * + * **Details** + * + * Negative permit counts are clamped to `0`. Non-finite permit counts create + * an unbounded semaphore whose acquire and release operations complete + * immediately. + * + * @see {@link make} for creating a partitioned semaphore inside `Effect` * - * @since 4.0.0 * @category constructors + * @since 3.19.4 */ export declare const makeUnsafe: (options: { readonly permits: number; }) => PartitionedSemaphore; /** - * Creates a `PartitionedSemaphore`. + * Creates a `PartitionedSemaphore` inside an `Effect`. + * + * **When to use** + * + * Use when semaphore construction should stay inside an `Effect` workflow. + * + * **Details** + * + * The `permits` option sets the shared permit capacity. The resulting + * semaphore tracks waiters by partition key and distributes released permits + * across waiting partitions in round-robin order. + * + * **Gotchas** + * + * Negative permit counts are clamped to `0`. Non-finite permit counts create + * an unbounded semaphore. + * + * @see {@link makeUnsafe} for synchronous construction * - * @since 4.0.0 * @category constructors + * @since 3.19.4 */ export declare const make: (options: { readonly permits: number; @@ -59,124 +133,432 @@ export declare const make: (options: { /** * Gets the current number of available permits. * - * @since 4.0.0 + * **When to use** + * + * Use to inspect a snapshot of how many permits are currently free. + * + * **Details** + * + * Running the returned effect reads the semaphore's current availability. + * Taking permits decreases availability, and releasing permits can increase it + * up to the semaphore capacity. + * + * **Gotchas** + * + * Reading availability does not reserve permits. + * + * @see {@link capacity} for the fixed total permit capacity + * @see {@link release} for returning permits to the shared pool + * @see {@link withPermitsIfAvailable} for running only when permits are immediately available + * * @category combinators + * @since 4.0.0 */ export declare const available: (self: PartitionedSemaphore) => Effect.Effect; /** * Gets the total capacity. * - * @since 4.0.0 + * **When to use** + * + * Use to inspect the fixed number of permits configured for the semaphore. + * + * **Details** + * + * Capacity is stored when the semaphore is created and does not change as + * permits are acquired or released. + * + * @see {@link available} for the current number of free permits + * * @category getters + * @since 4.0.0 */ export declare const capacity: (self: PartitionedSemaphore) => number; /** - * Acquires permits for a partition. + * Returns an effect that acquires the requested number of permits for the + * given partition key. + * + * **When to use** + * + * Use when you need manual permit acquisition for a partition and want to + * control acquisition and release as separate effects. + * + * **Details** + * + * If enough permits are available, the effect completes immediately. Otherwise + * it waits until released permits are assigned to this partition. + * + * **Gotchas** + * + * Requests for more permits than the semaphore capacity never complete. + * Requests for zero or a negative number of permits complete without acquiring + * anything. + * + * @see {@link release} for manually returning permits to the shared pool + * @see {@link withPermits} for automatic acquire and release around an effect + * @see {@link withPermit} for acquiring exactly one permit around an effect * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ export declare const take: { /** - * Acquires permits for a partition. + * Returns an effect that acquires the requested number of permits for the + * given partition key. + * + * **When to use** + * + * Use when you need manual permit acquisition for a partition and want to + * control acquisition and release as separate effects. + * + * **Details** + * + * If enough permits are available, the effect completes immediately. Otherwise + * it waits until released permits are assigned to this partition. + * + * **Gotchas** + * + * Requests for more permits than the semaphore capacity never complete. + * Requests for zero or a negative number of permits complete without acquiring + * anything. + * + * @see {@link release} for manually returning permits to the shared pool + * @see {@link withPermits} for automatic acquire and release around an effect + * @see {@link withPermit} for acquiring exactly one permit around an effect * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ (key: K, permits: number): (self: PartitionedSemaphore) => Effect.Effect; /** - * Acquires permits for a partition. + * Returns an effect that acquires the requested number of permits for the + * given partition key. + * + * **When to use** + * + * Use when you need manual permit acquisition for a partition and want to + * control acquisition and release as separate effects. + * + * **Details** + * + * If enough permits are available, the effect completes immediately. Otherwise + * it waits until released permits are assigned to this partition. + * + * **Gotchas** + * + * Requests for more permits than the semaphore capacity never complete. + * Requests for zero or a negative number of permits complete without acquiring + * anything. + * + * @see {@link release} for manually returning permits to the shared pool + * @see {@link withPermits} for automatic acquire and release around an effect + * @see {@link withPermit} for acquiring exactly one permit around an effect * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ (self: PartitionedSemaphore, key: K, permits: number): Effect.Effect; }; /** - * Releases permits back to the shared pool. + * Returns an effect that releases permits back to the shared pool and returns + * the current available permit count. + * + * **When to use** + * + * Use when you need to return permits acquired with `take` in a lower-level + * partitioned permit protocol with explicit release control. + * + * **Details** + * + * Released permits are first assigned to waiting partitions in round-robin + * order. Only permits not needed by waiters increase the available count, + * which is capped at the semaphore capacity. + * + * @see {@link take} for manual acquisition + * @see {@link withPermits} for automatic acquire and release around an effect + * @see {@link available} for reading the permit count without releasing * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ export declare const release: { /** - * Releases permits back to the shared pool. + * Returns an effect that releases permits back to the shared pool and returns + * the current available permit count. + * + * **When to use** + * + * Use when you need to return permits acquired with `take` in a lower-level + * partitioned permit protocol with explicit release control. + * + * **Details** + * + * Released permits are first assigned to waiting partitions in round-robin + * order. Only permits not needed by waiters increase the available count, + * which is capped at the semaphore capacity. + * + * @see {@link take} for manual acquisition + * @see {@link withPermits} for automatic acquire and release around an effect + * @see {@link available} for reading the permit count without releasing * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ (permits: number): (self: PartitionedSemaphore) => Effect.Effect; /** - * Releases permits back to the shared pool. + * Returns an effect that releases permits back to the shared pool and returns + * the current available permit count. + * + * **When to use** + * + * Use when you need to return permits acquired with `take` in a lower-level + * partitioned permit protocol with explicit release control. + * + * **Details** + * + * Released permits are first assigned to waiting partitions in round-robin + * order. Only permits not needed by waiters increase the available count, + * which is capped at the semaphore capacity. + * + * @see {@link take} for manual acquisition + * @see {@link withPermits} for automatic acquire and release around an effect + * @see {@link available} for reading the permit count without releasing * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ (self: PartitionedSemaphore, permits: number): Effect.Effect; }; /** - * Runs an effect with permits for a partition. + * Runs an effect after acquiring permits for a partition, then releases those + * permits when the effect exits. + * + * **When to use** + * + * Use to guard weighted partitioned work with automatic permit acquisition and + * release around an effect. + * + * **Details** + * + * Permit acquisition may wait according to `take` semantics. Once acquired, + * the permits are released even if the wrapped effect fails or is interrupted. + * + * **Gotchas** + * + * Requests for more permits than the semaphore capacity never complete. + * Requests for zero or a negative number of permits run the effect without + * acquiring anything. + * + * @see {@link withPermit} for the single-permit variant + * @see {@link withPermitsIfAvailable} for running only when permits are + * immediately available + * @see {@link take} for manual acquisition + * @see {@link release} for manual release * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ export declare const withPermits: { /** - * Runs an effect with permits for a partition. + * Runs an effect after acquiring permits for a partition, then releases those + * permits when the effect exits. + * + * **When to use** + * + * Use to guard weighted partitioned work with automatic permit acquisition and + * release around an effect. + * + * **Details** + * + * Permit acquisition may wait according to `take` semantics. Once acquired, + * the permits are released even if the wrapped effect fails or is interrupted. + * + * **Gotchas** + * + * Requests for more permits than the semaphore capacity never complete. + * Requests for zero or a negative number of permits run the effect without + * acquiring anything. + * + * @see {@link withPermit} for the single-permit variant + * @see {@link withPermitsIfAvailable} for running only when permits are + * immediately available + * @see {@link take} for manual acquisition + * @see {@link release} for manual release * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ (self: PartitionedSemaphore, key: K, permits: number): (effect: Effect.Effect) => Effect.Effect; /** - * Runs an effect with permits for a partition. + * Runs an effect after acquiring permits for a partition, then releases those + * permits when the effect exits. + * + * **When to use** + * + * Use to guard weighted partitioned work with automatic permit acquisition and + * release around an effect. + * + * **Details** + * + * Permit acquisition may wait according to `take` semantics. Once acquired, + * the permits are released even if the wrapped effect fails or is interrupted. + * + * **Gotchas** + * + * Requests for more permits than the semaphore capacity never complete. + * Requests for zero or a negative number of permits run the effect without + * acquiring anything. + * + * @see {@link withPermit} for the single-permit variant + * @see {@link withPermitsIfAvailable} for running only when permits are + * immediately available + * @see {@link take} for manual acquisition + * @see {@link release} for manual release * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ (self: PartitionedSemaphore, key: K, permits: number, effect: Effect.Effect): Effect.Effect; }; /** - * Runs an effect with a single permit for a partition. + * Runs an effect after acquiring one permit for a partition, then releases the + * permit when the effect exits. + * + * **When to use** + * + * Use to guard partitioned work with exactly one permit and automatic release + * when the effect exits. + * + * **Details** + * + * This is the single-permit variant of `withPermits`. The permit is released + * even if the wrapped effect fails or is interrupted. + * + * @see {@link withPermits} for acquiring a weighted number of permits + * @see {@link withPermitsIfAvailable} for running only when permits are + * immediately available + * @see {@link take} for manual acquisition + * @see {@link release} for manual release * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ export declare const withPermit: { /** - * Runs an effect with a single permit for a partition. + * Runs an effect after acquiring one permit for a partition, then releases the + * permit when the effect exits. + * + * **When to use** + * + * Use to guard partitioned work with exactly one permit and automatic release + * when the effect exits. + * + * **Details** + * + * This is the single-permit variant of `withPermits`. The permit is released + * even if the wrapped effect fails or is interrupted. + * + * @see {@link withPermits} for acquiring a weighted number of permits + * @see {@link withPermitsIfAvailable} for running only when permits are + * immediately available + * @see {@link take} for manual acquisition + * @see {@link release} for manual release * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ (self: PartitionedSemaphore, key: K): (effect: Effect.Effect) => Effect.Effect; /** - * Runs an effect with a single permit for a partition. + * Runs an effect after acquiring one permit for a partition, then releases the + * permit when the effect exits. + * + * **When to use** + * + * Use to guard partitioned work with exactly one permit and automatic release + * when the effect exits. + * + * **Details** + * + * This is the single-permit variant of `withPermits`. The permit is released + * even if the wrapped effect fails or is interrupted. + * + * @see {@link withPermits} for acquiring a weighted number of permits + * @see {@link withPermitsIfAvailable} for running only when permits are + * immediately available + * @see {@link take} for manual acquisition + * @see {@link release} for manual release * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ (self: PartitionedSemaphore, key: K, effect: Effect.Effect): Effect.Effect; }; /** - * Runs an effect only if the permits are immediately available. + * Runs an effect only when the requested permits can be acquired immediately, + * returning the result in `Some`. + * + * **When to use** + * + * Use when guarded work should run only if the shared permit pool can provide + * the requested permits immediately. + * + * **Details** + * + * If the permits are not available, the effect is not run and the result is + * `None`. When permits are acquired, they are released after the wrapped + * effect completes, fails, or is interrupted. Requests for zero or a negative + * number of permits run the effect and return `Some`. + * + * @see {@link withPermits} for the keyed variant that waits until permits are + * available for a partition * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ export declare const withPermitsIfAvailable: { /** - * Runs an effect only if the permits are immediately available. + * Runs an effect only when the requested permits can be acquired immediately, + * returning the result in `Some`. + * + * **When to use** + * + * Use when guarded work should run only if the shared permit pool can provide + * the requested permits immediately. + * + * **Details** + * + * If the permits are not available, the effect is not run and the result is + * `None`. When permits are acquired, they are released after the wrapped + * effect completes, fails, or is interrupted. Requests for zero or a negative + * number of permits run the effect and return `Some`. + * + * @see {@link withPermits} for the keyed variant that waits until permits are + * available for a partition * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ (self: PartitionedSemaphore, permits: number): (effect: Effect.Effect) => Effect.Effect, E, R>; /** - * Runs an effect only if the permits are immediately available. + * Runs an effect only when the requested permits can be acquired immediately, + * returning the result in `Some`. + * + * **When to use** + * + * Use when guarded work should run only if the shared permit pool can provide + * the requested permits immediately. + * + * **Details** + * + * If the permits are not available, the effect is not run and the result is + * `None`. When permits are acquired, they are released after the wrapped + * effect completes, fails, or is interrupted. Requests for zero or a negative + * number of permits run the effect and return `Some`. + * + * @see {@link withPermits} for the keyed variant that waits until permits are + * available for a partition * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ (self: PartitionedSemaphore, permits: number, effect: Effect.Effect): Effect.Effect, E, R>; }; diff --git a/.opencode/node_modules/effect/dist/PartitionedSemaphore.d.ts.map b/.opencode/node_modules/effect/dist/PartitionedSemaphore.d.ts.map index 6f905b8bf06e9bac0095b978d07187fbebea4b68..96a457649af1f49ca09dd237c6a723370ad31c9b 100644 --- a/.opencode/node_modules/effect/dist/PartitionedSemaphore.d.ts.map +++ b/.opencode/node_modules/effect/dist/PartitionedSemaphore.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"PartitionedSemaphore.d.ts","sourceRoot":"","sources":["../src/PartitionedSemaphore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAGrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBAAkD,CAAA;AAElF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,8BAA8B,CAAA;AAE9D;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACxC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IAC/C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACzC,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC/D,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAA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EAAE,CAAC,EAAE,CAAC,CAAC,GAC7B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;CAQjC,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/PartitionedSemaphore.js b/.opencode/node_modules/effect/dist/PartitionedSemaphore.js index 683df881f4901c7ee48dd024c7c6a358c6c18e00..2ea3f87f9529def3fb6b634122a1897436781ced 100644 --- a/.opencode/node_modules/effect/dist/PartitionedSemaphore.js +++ b/.opencode/node_modules/effect/dist/PartitionedSemaphore.js @@ -1,4 +1,10 @@ /** + * The `PartitionedSemaphore` module provides a semaphore for limiting + * concurrency across a shared permit pool while keeping waiters grouped by + * partition key. A `PartitionedSemaphore` is useful when many independent + * groups of work compete for the same bounded resource and each group should + * make progress without one busy group monopolizing released permits. + * * @since 4.0.0 */ import * as Effect from "./Effect.js"; @@ -6,15 +12,36 @@ import { dual } from "./Function.js"; import * as MutableHashMap from "./MutableHashMap.js"; import * as Option from "./Option.js"; /** + * Runtime type identifier used to mark values that implement + * `PartitionedSemaphore`. + * + * **Details** + * + * This marker is part of the runtime representation of partitioned semaphore + * values. + * + * @category type IDs * @since 4.0.0 - * @category models */ export const PartitionedTypeId = "~effect/PartitionedSemaphore"; /** - * Creates a `PartitionedSemaphore` unsafely. + * Constructs a `PartitionedSemaphore` synchronously, outside of `Effect`. + * + * **When to use** + * + * Use when you need to construct a partitioned semaphore synchronously outside + * an `Effect` workflow. + * + * **Details** + * + * Negative permit counts are clamped to `0`. Non-finite permit counts create + * an unbounded semaphore whose acquire and release operations complete + * immediately. + * + * @see {@link make} for creating a partitioned semaphore inside `Effect` * - * @since 4.0.0 * @category constructors + * @since 3.19.4 */ export const makeUnsafe = options => { const maxPermits = Math.max(0, options.permits); @@ -152,45 +179,151 @@ export const makeUnsafe = options => { }; }; /** - * Creates a `PartitionedSemaphore`. + * Creates a `PartitionedSemaphore` inside an `Effect`. + * + * **When to use** + * + * Use when semaphore construction should stay inside an `Effect` workflow. + * + * **Details** + * + * The `permits` option sets the shared permit capacity. The resulting + * semaphore tracks waiters by partition key and distributes released permits + * across waiting partitions in round-robin order. + * + * **Gotchas** + * + * Negative permit counts are clamped to `0`. Non-finite permit counts create + * an unbounded semaphore. + * + * @see {@link makeUnsafe} for synchronous construction * - * @since 4.0.0 * @category constructors + * @since 3.19.4 */ export const make = options => Effect.sync(() => makeUnsafe(options)); /** * Gets the current number of available permits. * - * @since 4.0.0 + * **When to use** + * + * Use to inspect a snapshot of how many permits are currently free. + * + * **Details** + * + * Running the returned effect reads the semaphore's current availability. + * Taking permits decreases availability, and releasing permits can increase it + * up to the semaphore capacity. + * + * **Gotchas** + * + * Reading availability does not reserve permits. + * + * @see {@link capacity} for the fixed total permit capacity + * @see {@link release} for returning permits to the shared pool + * @see {@link withPermitsIfAvailable} for running only when permits are immediately available + * * @category combinators + * @since 4.0.0 */ export const available = self => self.available; /** * Gets the total capacity. * - * @since 4.0.0 + * **When to use** + * + * Use to inspect the fixed number of permits configured for the semaphore. + * + * **Details** + * + * Capacity is stored when the semaphore is created and does not change as + * permits are acquired or released. + * + * @see {@link available} for the current number of free permits + * * @category getters + * @since 4.0.0 */ export const capacity = self => self.capacity; /** - * Acquires permits for a partition. + * Returns an effect that acquires the requested number of permits for the + * given partition key. + * + * **When to use** + * + * Use when you need manual permit acquisition for a partition and want to + * control acquisition and release as separate effects. + * + * **Details** + * + * If enough permits are available, the effect completes immediately. Otherwise + * it waits until released permits are assigned to this partition. + * + * **Gotchas** + * + * Requests for more permits than the semaphore capacity never complete. + * Requests for zero or a negative number of permits complete without acquiring + * anything. + * + * @see {@link release} for manually returning permits to the shared pool + * @see {@link withPermits} for automatic acquire and release around an effect + * @see {@link withPermit} for acquiring exactly one permit around an effect * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ export const take = /*#__PURE__*/dual(3, (self, key, permits) => self.take(key, permits)); /** - * Releases permits back to the shared pool. + * Returns an effect that releases permits back to the shared pool and returns + * the current available permit count. + * + * **When to use** + * + * Use when you need to return permits acquired with `take` in a lower-level + * partitioned permit protocol with explicit release control. + * + * **Details** + * + * Released permits are first assigned to waiting partitions in round-robin + * order. Only permits not needed by waiters increase the available count, + * which is capped at the semaphore capacity. + * + * @see {@link take} for manual acquisition + * @see {@link withPermits} for automatic acquire and release around an effect + * @see {@link available} for reading the permit count without releasing * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ export const release = /*#__PURE__*/dual(2, (self, permits) => self.release(permits)); /** - * Runs an effect with permits for a partition. + * Runs an effect after acquiring permits for a partition, then releases those + * permits when the effect exits. + * + * **When to use** + * + * Use to guard weighted partitioned work with automatic permit acquisition and + * release around an effect. + * + * **Details** + * + * Permit acquisition may wait according to `take` semantics. Once acquired, + * the permits are released even if the wrapped effect fails or is interrupted. + * + * **Gotchas** + * + * Requests for more permits than the semaphore capacity never complete. + * Requests for zero or a negative number of permits run the effect without + * acquiring anything. + * + * @see {@link withPermit} for the single-permit variant + * @see {@link withPermitsIfAvailable} for running only when permits are + * immediately available + * @see {@link take} for manual acquisition + * @see {@link release} for manual release * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ export const withPermits = (...args) => { if (args.length === 3) { @@ -201,10 +334,27 @@ export const withPermits = (...args) => { return self.withPermits(key, permits)(effect); }; /** - * Runs an effect with a single permit for a partition. + * Runs an effect after acquiring one permit for a partition, then releases the + * permit when the effect exits. + * + * **When to use** + * + * Use to guard partitioned work with exactly one permit and automatic release + * when the effect exits. + * + * **Details** + * + * This is the single-permit variant of `withPermits`. The permit is released + * even if the wrapped effect fails or is interrupted. + * + * @see {@link withPermits} for acquiring a weighted number of permits + * @see {@link withPermitsIfAvailable} for running only when permits are + * immediately available + * @see {@link take} for manual acquisition + * @see {@link release} for manual release * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ export const withPermit = (...args) => { if (args.length === 2) { @@ -215,10 +365,26 @@ export const withPermit = (...args) => { return self.withPermit(key)(effect); }; /** - * Runs an effect only if the permits are immediately available. + * Runs an effect only when the requested permits can be acquired immediately, + * returning the result in `Some`. + * + * **When to use** + * + * Use when guarded work should run only if the shared permit pool can provide + * the requested permits immediately. + * + * **Details** + * + * If the permits are not available, the effect is not run and the result is + * `None`. When permits are acquired, they are released after the wrapped + * effect completes, fails, or is interrupted. Requests for zero or a negative + * number of permits run the effect and return `Some`. + * + * @see {@link withPermits} for the keyed variant that waits until permits are + * available for a partition * - * @since 4.0.0 * @category combinators + * @since 4.0.0 */ export const withPermitsIfAvailable = (...args) => { if (args.length === 2) { diff --git a/.opencode/node_modules/effect/dist/PartitionedSemaphore.js.map b/.opencode/node_modules/effect/dist/PartitionedSemaphore.js.map index 350e63ac3e0b1d66be51d924ce3823dc2851758f..b6c1b66bdcc6ad0f6a3b97c3fe66f876126dc256 100644 --- a/.opencode/node_modules/effect/dist/PartitionedSemaphore.js.map +++ b/.opencode/node_modules/effect/dist/PartitionedSemaphore.js.map @@ -1 +1 @@ -{"version":3,"file":"PartitionedSemaphore.js","names":["Effect","dual","MutableHashMap","Option","PartitionedTypeId","makeUnsafe","options","maxPermits","Math","max","permits","Number","isFinite","capacity","available","succeed","take","void","release","withPermits","effect","withPermit","withPermitsIfAvailable","asSome","totalPermits","waitingPermits","partitions","empty","iterator","Symbol","releaseUnsafe","min","state","next","done","waiter","value","values","undefined","resume","key","callback","never","needed","taken","waiters","getOrElse","get","set","Set","entry","cleanup","delete","size","remove","add","sync","takePermits","uninterruptibleMask","restore","flatMap","ensuring","tryTake","suspend","none","make","self","args","length"],"sources":["../src/PartitionedSemaphore.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,MAAM,MAAM,aAAa;AACrC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AACrD,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC;;;;AAIA,OAAO,MAAMC,iBAAiB,GAAsB,8BAA8B;AA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AAC,GAAG2B,IAAI;IACxB,OAAQ/C,MAAoC,IAAK8C,IAAI,CAAC7C,UAAU,CAACmB,GAAG,CAAC,CAACpB,MAAM,CAAC;EAC/E;EACA,MAAM,CAAC8C,IAAI,EAAE1B,GAAG,EAAEpB,MAAM,CAAC,GAAG+C,IAAI;EAChC,OAAOD,IAAI,CAAC7C,UAAU,CAACmB,GAAG,CAAC,CAACpB,MAAM,CAAC;AACrC,CAAS;AAET;;;;;;AAMA,OAAO,MAAME,sBAAsB,GAmB9BA,CAAC,GAAG6C,IAAgB,KAAI;EAC3B,IAAIA,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;IACrB,MAAM,CAACF,IAAI,EAAExD,OAAO,CAAC,GAAGyD,IAAI;IAC5B,OAAQ/C,MAAoC,IAAK8C,IAAI,CAAC5C,sBAAsB,CAACZ,OAAO,CAAC,CAACU,MAAM,CAAC;EAC/F;EACA,MAAM,CAAC8C,IAAI,EAAExD,OAAO,EAAEU,MAAM,CAAC,GAAG+C,IAAI;EACpC,OAAOD,IAAI,CAAC5C,sBAAsB,CAACZ,OAAO,CAAC,CAACU,MAAM,CAAC;AACrD,CAAS","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"PartitionedSemaphore.js","names":["Effect","dual","MutableHashMap","Option","PartitionedTypeId","makeUnsafe","options","maxPermits","Math","max","permits","Number","isFinite","capacity","available","succeed","take","void","release","withPermits","effect","withPermit","withPermitsIfAvailable","asSome","totalPermits","waitingPermits","partitions","empty","iterator","Symbol","releaseUnsafe","min","state","next","done","waiter","value","values","undefined","resume","key","callback","never","needed","taken","waiters","getOrElse","get","set","Set","entry","cleanup","delete","size","remove","add","sync","takePermits","uninterruptibleMask","restore","flatMap","ensuring","tryTake","suspend","none","make","self","args","length"],"sources":["../src/PartitionedSemaphore.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;AASA,OAAO,KAAKA,MAAM,MAAM,aAAa;AACrC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,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MAAM,CAAC,GAAG+C,IAAI;EACzC,OAAOD,IAAI,CAAC/C,WAAW,CAACqB,GAAG,EAAE9B,OAAO,CAAC,CAACU,MAAM,CAAC;AAC/C,CAAS;AAET;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMC,UAAU,GAiDlBA,CAAC,GAAG8C,IAAgB,KAAI;EAC3B,IAAIA,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;IACrB,MAAM,CAACF,IAAI,EAAE1B,GAAG,CAAC,GAAG2B,IAAI;IACxB,OAAQ/C,MAAoC,IAAK8C,IAAI,CAAC7C,UAAU,CAACmB,GAAG,CAAC,CAACpB,MAAM,CAAC;EAC/E;EACA,MAAM,CAAC8C,IAAI,EAAE1B,GAAG,EAAEpB,MAAM,CAAC,GAAG+C,IAAI;EAChC,OAAOD,IAAI,CAAC7C,UAAU,CAACmB,GAAG,CAAC,CAACpB,MAAM,CAAC;AACrC,CAAS;AAET;;;;;;;;;;;;;;;;;;;;;;AAsBA,OAAO,MAAME,sBAAsB,GAmD9BA,CAAC,GAAG6C,IAAgB,KAAI;EAC3B,IAAIA,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;IACrB,MAAM,CAACF,IAAI,EAAExD,OAAO,CAAC,GAAGyD,IAAI;IAC5B,OAAQ/C,MAAoC,IAAK8C,IAAI,CAAC5C,sBAAsB,CAACZ,OAAO,CAAC,CAACU,MAAM,CAAC;EAC/F;EACA,MAAM,CAAC8C,IAAI,EAAExD,OAAO,EAAEU,MAAM,CAAC,GAAG+C,IAAI;EACpC,OAAOD,IAAI,CAAC5C,sBAAsB,CAACZ,OAAO,CAAC,CAACU,MAAM,CAAC;AACrD,CAAS","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Path.d.ts b/.opencode/node_modules/effect/dist/Path.d.ts index 523fbe8115f6c17695a6b27d00be165afcccc8aa..1a58a6b713420347f027bfcabe3c02529ce8c37e 100644 --- a/.opencode/node_modules/effect/dist/Path.d.ts +++ b/.opencode/node_modules/effect/dist/Path.d.ts @@ -1,4 +1,12 @@ /** + * Provides path operations through the Effect environment. + * + * The `Path` service works with file system paths without tying code to one + * concrete platform module. It exposes common operations such as joining, + * normalizing, parsing, formatting, resolving, and converting paths to or from + * file URLs. This module includes the service interface, parsed path type, + * service tag, runtime marker, and built-in POSIX path layer. + * * @since 4.0.0 */ import * as Context from "./Context.ts"; @@ -6,13 +14,36 @@ import * as Effect from "./Effect.ts"; import * as Layer from "./Layer.ts"; import { BadArgument } from "./PlatformError.ts"; /** + * Runtime type identifier used to mark implementations of the `Path` service. + * + * **Details** + * + * The marker is the exact string stored on `Path` service implementations. + * Most code should depend on the `Path` service instead of inspecting this + * value directly. + * + * @see {@link layer} for the built-in POSIX `Path` service layer + * + * @category type IDs * @since 4.0.0 */ export declare const TypeId = "~effect/platform/Path"; /** - * @since 4.0.0 - * @category model - * @example + * Defines the service interface for platform-specific path manipulation. + * + * **When to use** + * + * Use to depend on path operations through the Effect environment instead of a + * concrete host path module. + * + * **Details** + * + * The service exposes operations for joining, normalizing, parsing, + * formatting, and converting file system paths. URL conversion methods return + * `Effect`s because invalid file URLs or paths can fail with `BadArgument`. + * + * **Example** (Using path operations) + * * ```ts * import { Effect, Path } from "effect" * @@ -43,6 +74,9 @@ export declare const TypeId = "~effect/platform/Path"; * }) * }) * ``` + * + * @category models + * @since 4.0.0 */ export interface Path { readonly [TypeId]: typeof TypeId; @@ -62,9 +96,14 @@ export interface Path { readonly toNamespacedPath: (path: string) => string; } /** - * @since 4.0.0 - * @category namespace - * @example + * Namespace containing types associated with the `Path` service. + * + * **When to use** + * + * Use to reference types associated with path parsing and formatting. + * + * **Example** (Working with parsed paths) + * * ```ts * import { Effect, Path } from "effect" * @@ -87,12 +126,26 @@ export interface Path { * console.log(parsed, exampleParsed) * }) * ``` + * + * @since 4.0.0 */ export declare namespace Path { /** - * @since 4.0.0 - * @category model - * @example + * Structured representation of a parsed file system path. + * + * **When to use** + * + * Use to model the object form produced by `Path.parse` and consumed by + * `Path.format`. + * + * **Details** + * + * The fields correspond to the path root, directory, base filename, + * extension, and filename without extension, matching the shape consumed by + * `Path.format`. + * + * **Example** (Parsing and formatting paths) + * * ```ts * import { Effect, Path } from "effect" * @@ -119,6 +172,9 @@ export declare namespace Path { * console.log(formatted) // "/home/user/newfile.ts" * }) * ``` + * + * @category models + * @since 4.0.0 */ interface Parsed { readonly root: string; @@ -129,9 +185,14 @@ export declare namespace Path { } } /** - * @since 4.0.0 - * @category tag - * @example + * Service tag for accessing the current `Path` implementation. + * + * **When to use** + * + * Use when you need path operations supplied by an effect's environment. + * + * **Example** (Providing a custom Path service) + * * ```ts * import { Effect, Layer, Path } from "effect" * @@ -185,11 +246,28 @@ export declare namespace Path { * // Run with custom path implementation * const result = Effect.provide(program, customPathLayer) * ``` + * + * @category services + * @since 4.0.0 */ export declare const Path: Context.Service; /** + * Layer that provides the built-in POSIX `Path` implementation. + * + * **When to use** + * + * Use when you need an effect that requires the `Path` service to run with the + * built-in POSIX path implementation. + * + * **Details** + * + * The layer provides a static service whose separator is `/` and whose + * operations use POSIX path semantics. + * + * @see {@link Path} for accessing the `Path` service from an effect + * + * @category layers * @since 4.0.0 - * @category Layers */ export declare const layer: Layer.Layer; //# sourceMappingURL=Path.d.ts.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Path.d.ts.map b/.opencode/node_modules/effect/dist/Path.d.ts.map index 048c34501fef1412df2e3446fb4dd054327283c0..8247f4d50f8d197116bcc30c563feb54a37f9371 100644 --- a/.opencode/node_modules/effect/dist/Path.d.ts.map +++ b/.opencode/node_modules/effect/dist/Path.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Path.d.ts","sourceRoot":"","sources":["../src/Path.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,KAAK,MAAM,YAAY,CAA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CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,WAAW,CAAC,CAAA;IACrE,QAAQ,CAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CACpD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6CG;IACH,UAAiB,MAAM;QACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;QACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;QACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KACtB;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,eAAO,MAAM,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAkC,CAAA;AAklB/E;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAkC,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Path.js b/.opencode/node_modules/effect/dist/Path.js index 05e4d674c588d687dbfd3efb849c1457733ecb4f..02bde0a02aac6af0b683bf5b94317c6583a30724 100644 --- a/.opencode/node_modules/effect/dist/Path.js +++ b/.opencode/node_modules/effect/dist/Path.js @@ -1,4 +1,12 @@ /** + * Provides path operations through the Effect environment. + * + * The `Path` service works with file system paths without tying code to one + * concrete platform module. It exposes common operations such as joining, + * normalizing, parsing, formatting, resolving, and converting paths to or from + * file URLs. This module includes the service interface, parsed path type, + * service tag, runtime marker, and built-in POSIX path layer. + * * @since 4.0.0 */ import * as Context from "./Context.js"; @@ -7,13 +15,29 @@ import { identity } from "./Function.js"; import * as Layer from "./Layer.js"; import { BadArgument } from "./PlatformError.js"; /** + * Runtime type identifier used to mark implementations of the `Path` service. + * + * **Details** + * + * The marker is the exact string stored on `Path` service implementations. + * Most code should depend on the `Path` service instead of inspecting this + * value directly. + * + * @see {@link layer} for the built-in POSIX `Path` service layer + * + * @category type IDs * @since 4.0.0 */ export const TypeId = "~effect/platform/Path"; /** - * @since 4.0.0 - * @category tag - * @example + * Service tag for accessing the current `Path` implementation. + * + * **When to use** + * + * Use when you need path operations supplied by an effect's environment. + * + * **Example** (Providing a custom Path service) + * * ```ts * import { Effect, Layer, Path } from "effect" * @@ -67,6 +91,9 @@ export const TypeId = "~effect/platform/Path"; * // Run with custom path implementation * const result = Effect.provide(program, customPathLayer) * ``` + * + * @category services + * @since 4.0.0 */ export const Path = /*#__PURE__*/Context.Service("effect/Path"); /** @@ -597,8 +624,22 @@ const posixImpl = /*#__PURE__*/Path.of({ toNamespacedPath: identity }); /** + * Layer that provides the built-in POSIX `Path` implementation. + * + * **When to use** + * + * Use when you need an effect that requires the `Path` service to run with the + * built-in POSIX path implementation. + * + * **Details** + * + * The layer provides a static service whose separator is `/` and whose + * operations use POSIX path semantics. + * + * @see {@link Path} for accessing the `Path` service from an effect + * + * @category layers * @since 4.0.0 - * @category Layers */ export const layer = /*#__PURE__*/Layer.succeed(Path)(posixImpl); //# sourceMappingURL=Path.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Path.js.map b/.opencode/node_modules/effect/dist/Path.js.map index f0276937b274961e1f721d6f7ce30a5ff6669d42..4c7afdeece58a8a54818ceed8cc70ea61547d20a 100644 --- a/.opencode/node_modules/effect/dist/Path.js.map +++ b/.opencode/node_modules/effect/dist/Path.js.map @@ -1 +1 @@ -{"version":3,"file":"Path.js","names":["Context","Effect","identity","Layer","BadArgument","TypeId","Path","Service","normalizeStringPosix","path","allowAboveRoot","res","lastSegmentLength","lastSlash","dots","code","i","length","charCodeAt","lastSlashIndex","lastIndexOf","slice","_format","sep","pathObject","dir","root","base","name","ext","fromFileUrl","url","protocol","fail","module","method","description","hostname","pathname","n","third","codePointAt","succeed","decodeURIComponent","resolve","resolvedPath","resolvedAbsolute","cwd","undefined","arguments","process","globalThis","CHAR_FORWARD_SLASH","toFileUrl","filepath","outURL","URL","resolved","filePathLast","encodePathChars","percentRegExp","backslashRegExp","newlineRegExp","carriageReturnRegExp","tabRegExp","includes","replace","posixImpl","of","normalize","isAbsolute","trailingSeparator","join","joined","arg","relative","from","to","fromStart","fromEnd","fromLen","toStart","toEnd","toLen","lastCommonSep","fromCode","toCode","out","dirname","hasRoot","end","matchedSlash","basename","start","extIdx","firstNonSlashEnd","extname","startDot","startPart","preDotState","format","TypeError","parse","ret","toNamespacedPath","layer"],"sources":["../src/Path.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,SAASC,QAAQ,QAAQ,eAAe;AACxC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,WAAW,QAAQ,oBAAoB;AAEhD;;;AAGA,OAAO,MAAMC,MAAM,GAAG,uBAAuB;AA2H7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DA,OAAO,MAAMC,IAAI,gBAAgCN,OAAO,CAACO,OAAO,CAAC,aAAa,CAAC;AAE/E;;;;;;;AAQA;AACA,SAASC,oBAAoBA,CAACC,IAAY,EAAEC,cAAuB;EACjE,IAAIC,GAAG,GAAG,EAAE;EACZ,IAAIC,iBAAiB,GAAG,CAAC;EACzB,IAAIC,SAAS,GAAG,CAAC,CAAC;EAClB,IAAIC,IAAI,GAAG,CAAC;EACZ,IAAIC,IAAI;EACR,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIP,IAAI,C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;QAClCM,GAAG,CAAC5E,IAAI,GAAGlB,IAAI,CAACY,KAAK,CAAC,CAAC,EAAEqE,GAAG,CAAC;MAC/B,CAAC,MAAM;QACLa,GAAG,CAAC3E,IAAI,GAAGnB,IAAI,CAACY,KAAK,CAAC6E,SAAS,EAAED,QAAQ,CAAC;QAC1CM,GAAG,CAAC5E,IAAI,GAAGlB,IAAI,CAACY,KAAK,CAAC6E,SAAS,EAAER,GAAG,CAAC;MACvC;MACAa,GAAG,CAAC1E,GAAG,GAAGpB,IAAI,CAACY,KAAK,CAAC4E,QAAQ,EAAEP,GAAG,CAAC;IACrC;IAEA,IAAIQ,SAAS,GAAG,CAAC,EAAEK,GAAG,CAAC9E,GAAG,GAAGhB,IAAI,CAACY,KAAK,CAAC,CAAC,EAAE6E,SAAS,GAAG,CAAC,CAAC,MACpD,IAAI5B,UAAU,EAAEiC,GAAG,CAAC9E,GAAG,GAAG,GAAG;IAElC,OAAO8E,GAAG;EACZ,CAAC;EAEDhF,GAAG,EAAE,GAAG;EACRO,WAAW;EACXuB,SAAS;EACTmD,gBAAgB,EAAEtG;CACnB,CAAC;AAEF;;;;AAIA,OAAO,MAAMuG,KAAK,gBAAsBtG,KAAK,CAACuC,OAAO,CAACpC,IAAI,CAAC,CAAC6D,SAAS,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Path.js","names":["Context","Effect","identity","Layer","BadArgument","TypeId","Path","Service","normalizeStringPosix","path","allowAboveRoot","res","lastSegmentLength","lastSlash","dots","code","i","length","charCodeAt","lastSlashIndex","lastIndexOf","slice","_format","sep","pathObject","dir","root","base","name","ext","fromFileUrl","url","protocol","fail","module","method","description","hostname","pathname","n","third","codePointAt","succeed","decodeURIComponent","resolve","resolvedPath","resolvedAbsolute","cwd","undefined","arguments","process","globalThis","CHAR_FORWARD_SLASH","toFileUrl","filepath","outURL","URL","resolved","filePathLast","encodePathChars","percentRegExp","backslashRegExp","newlineRegExp","carriageReturnRegExp","tabRegExp","includes","replace","posixImpl","of","normalize","isAbsolute","trailingSeparator","join","joined","arg","relative","from","to","fromStart","fromEnd","fromLen","toStart","toEnd","toLen","lastCommonSep","fromCode","toCode","out","dirname","hasRoot","end","matchedSlash","basename","start","extIdx","firstNonSlashEnd","extname","startDot","startPart","preDotState","format","TypeError","parse","ret","toNamespacedPath","layer"],"sources":["../src/Path.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAWA,OAAO,KAAKA,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,SAASC,QAAQ,QAAQ,eAAe;AACxC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,WAAW,QAAQ,oBAAoB;AAEhD;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,MAAM,GAAG,uBAAuB;AAgK7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,OAAO,MAAMC,IAAI,gBAAgCN,OAAO,CAACO,OAAO,CAAC,aAAa,CAAC;AAE/E;;;;;;;AAQA;AACA,SAASC,oBAAoBA,CAACC,IAAY,EAAEC,cAAuB;EACjE,IAAIC,GAAG,GAAG,EAAE;EACZ,IAAIC,iBAAiB,GAAG,CAAC;EACzB,IAAIC,SAAS,GAAG,CAAC,CAAC;EAClB,IAAIC,IAAI,GAAG,CAAC;EACZ,IAAIC,IAAI;EACR,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIP,IAAI,CAACQ,MAAM,EAAE,EAAED,CAAC,EAAE;IACrC,IAAIA,CAAC,GAAGP,IAAI,CAACQ,MAAM,EAAE;MACnBF,IAAI,GAAGN,IAAI,CAACS,UAAU,CAACF,CAAC,CAAC;IAC3B,CAAC,MAAM,IAAID,IAAI,KAAK,EAAE,CAAC,OAAO;MAC5B;IACF,CAAC,MAAM;MACLA,IAAI,GAAG,EAAE,EAAC;IACZ;IACA,IAAIA,IAAI,KAAK,EAA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MACAa,GAAG,CAAC1E,GAAG,GAAGpB,IAAI,CAACY,KAAK,CAAC4E,QAAQ,EAAEP,GAAG,CAAC;IACrC;IAEA,IAAIQ,SAAS,GAAG,CAAC,EAAEK,GAAG,CAAC9E,GAAG,GAAGhB,IAAI,CAACY,KAAK,CAAC,CAAC,EAAE6E,SAAS,GAAG,CAAC,CAAC,MACpD,IAAI5B,UAAU,EAAEiC,GAAG,CAAC9E,GAAG,GAAG,GAAG;IAElC,OAAO8E,GAAG;EACZ,CAAC;EAEDhF,GAAG,EAAE,GAAG;EACRO,WAAW;EACXuB,SAAS;EACTmD,gBAAgB,EAAEtG;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;AAkBA,OAAO,MAAMuG,KAAK,gBAAsBtG,KAAK,CAACuC,OAAO,CAACpC,IAAI,CAAC,CAAC6D,SAAS,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Pipeable.d.ts b/.opencode/node_modules/effect/dist/Pipeable.d.ts index 16f81e26b7803e2f78d7e28ba2f333473f1e6198..0eff349b125c21068b9665b2ce19aa5a475db4fc 100644 --- a/.opencode/node_modules/effect/dist/Pipeable.d.ts +++ b/.opencode/node_modules/effect/dist/Pipeable.d.ts @@ -1,10 +1,30 @@ /** + * The `Pipeable` module defines the shared interface and implementation helpers + * for values that support Effect-style method chaining with `.pipe(...)`. + * + * A `Pipeable` value can pass itself through a sequence of unary functions from + * left to right, so code can be written as `value.pipe(f, g, h)` instead of + * deeply nesting calls. This is the method form used by many Effect data types + * to compose transformations, validations, and effectful operations while + * keeping the original value as the starting point of the pipeline. + * * @since 2.0.0 */ /** - * @since 2.0.0 - * @category models - * @example + * Interface for values that support method-style `pipe` composition. + * + * **When to use** + * + * Use to type values that expose an Effect-style `.pipe(...)` method. + * + * **Details** + * + * Calling `value.pipe(f, g, h)` passes the value through each function from + * left to right, returning the final result. Many Effect data types implement + * this so operations can be chained without nesting function calls. + * + * **Example** (Chaining operations with pipe) + * * ```ts * import { Effect } from "effect" * @@ -15,6 +35,9 @@ * Effect.tap((x) => Effect.log(`Result: ${x}`)) * ) * ``` + * + * @category models + * @since 2.0.0 */ export interface Pipeable { pipe(this: A): A; @@ -41,45 +64,105 @@ export interface Pipeable { pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T, tu: (_: T) => U): U; } /** - * @since 2.0.0 - * @category utilities - * @example + * Applies a `pipe` method's variadic arguments to an initial value from left + * to right. + * + * **When to use** + * + * Use to implement a custom `.pipe(...)` method from JavaScript's `arguments` + * object. + * + * **Details** + * + * This helper is intended for implementing `Pipeable.pipe` methods that + * receive JavaScript's `arguments` object. With no functions it returns the + * original value; otherwise it feeds each result into the next function. + * + * **Example** (Implementing a pipe method) + * * ```ts * import { Pipeable } from "effect" * - * // pipeArguments is used internally to implement efficient piping - * function customPipe(self: A, ...fns: Array<(a: any) => any>): unknown { - * return Pipeable.pipeArguments(self, arguments as any) - * } + * class NumberBox { + * constructor(readonly value: number) {} * - * // Example usage - * const add = (x: number) => (y: number) => x + y - * const multiply = (x: number) => (y: number) => x * y + * pipe(..._fns: ReadonlyArray<(value: number) => number>): number { + * return Pipeable.pipeArguments(this.value, arguments) as number + * } + * } * - * const result = customPipe(5, add(2), multiply(3)) + * const result = new NumberBox(5).pipe( + * (n) => n + 2, + * (n) => n * 3 + * ) * console.log(result) // 21 * ``` + * + * @category combinators + * @since 2.0.0 */ export declare const pipeArguments: (self: A, args: IArguments) => unknown; /** - * @since 4.0.0 + * Reusable prototype that implements `Pipeable.pipe`. + * + * **When to use** + * + * Use when classes or object prototypes can reuse this value when they need the + * standard pipe implementation backed by `pipeArguments`. + * + * @category prototypes + * @since 3.15.0 */ export declare const Prototype: Pipeable; /** - * @since 4.0.0 + * Provides a base constructor whose instances implement the standard `Pipeable.pipe` + * method. + * + * **When to use** + * + * Use when you need to define a class that supports Effect-style method + * chaining through `.pipe(...)`. + * * @category constructors + * @since 3.15.0 */ export declare const Class: new () => Pipeable; /** - * @since 4.0.0 + * Constructor type for classes whose instances implement `Pipeable`. + * + * **When to use** + * + * Use as the constructor-side type when a class value should be known to create + * instances that support Effect-style method chaining with `.pipe(...)`. + * + * @see {@link Pipeable} for the instance-side contract + * @see {@link Class} for the base constructor + * @see {@link Mixin} for wrapping an existing class constructor + * * @category models + * @since 3.15.0 */ export interface PipeableConstructor { new (...args: ReadonlyArray): Pipeable; } /** - * @since 4.0.0 + * Returns a subclass of the provided class that adds the standard `pipe` + * method. + * + * **When to use** + * + * Use to add pipe support to an existing class without extending a base class + * or modifying its prototype. + * + * **Details** + * + * The original constructor and instance members are preserved, and the added + * method delegates to `pipeArguments`. + * + * @see {@link Prototype} for a reusable prototype object + * @see {@link Class} for a base constructor to extend * @category constructors + * @since 4.0.0 */ export declare const Mixin: ) => any>(klass: TBase) => TBase & PipeableConstructor; //# sourceMappingURL=Pipeable.d.ts.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Pipeable.d.ts.map b/.opencode/node_modules/effect/dist/Pipeable.d.ts.map index 6ac38e58a8867e8372f3fe6829d9bb554a79cd3f..7a1f8231cd5140d44d64e180137ccd42e30e272c 100644 --- a/.opencode/node_modules/effect/dist/Pipeable.d.ts.map +++ b/.opencode/node_modules/effect/dist/Pipeable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Pipeable.d.ts","sourceRoot":"","sources":["../src/Pipeable.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAAA;IACnB,IAAI,C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E,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EACf,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EACf,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EACf,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EACf,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GACd,CAAC,CAAA;CACL;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,UAAU,KAAG,OA8B5D,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,EAAE,QAIvB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK,EAAE,UAAS,QAIzB,CAAA;AAEJ;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAI,GAAG,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAA;CAC3C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,KAAK,GAAI,KAAK,SAAS,KAAI,GAAG,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,GAAG,EACzE,OAAO,KAAK,KACX,KAAK,GAAG,mBAIT,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Pipeable.js b/.opencode/node_modules/effect/dist/Pipeable.js index e58be62779ff09848e7f8d07d2f7eeb6f5da5329..eb626b5f017d2a27951a30f6f4e7127518b20be4 100644 --- a/.opencode/node_modules/effect/dist/Pipeable.js +++ b/.opencode/node_modules/effect/dist/Pipeable.js @@ -1,25 +1,52 @@ /** + * The `Pipeable` module defines the shared interface and implementation helpers + * for values that support Effect-style method chaining with `.pipe(...)`. + * + * A `Pipeable` value can pass itself through a sequence of unary functions from + * left to right, so code can be written as `value.pipe(f, g, h)` instead of + * deeply nesting calls. This is the method form used by many Effect data types + * to compose transformations, validations, and effectful operations while + * keeping the original value as the starting point of the pipeline. + * * @since 2.0.0 */ /** - * @since 2.0.0 - * @category utilities - * @example + * Applies a `pipe` method's variadic arguments to an initial value from left + * to right. + * + * **When to use** + * + * Use to implement a custom `.pipe(...)` method from JavaScript's `arguments` + * object. + * + * **Details** + * + * This helper is intended for implementing `Pipeable.pipe` methods that + * receive JavaScript's `arguments` object. With no functions it returns the + * original value; otherwise it feeds each result into the next function. + * + * **Example** (Implementing a pipe method) + * * ```ts * import { Pipeable } from "effect" * - * // pipeArguments is used internally to implement efficient piping - * function customPipe(self: A, ...fns: Array<(a: any) => any>): unknown { - * return Pipeable.pipeArguments(self, arguments as any) - * } + * class NumberBox { + * constructor(readonly value: number) {} * - * // Example usage - * const add = (x: number) => (y: number) => x + y - * const multiply = (x: number) => (y: number) => x * y + * pipe(..._fns: ReadonlyArray<(value: number) => number>): number { + * return Pipeable.pipeArguments(this.value, arguments) as number + * } + * } * - * const result = customPipe(5, add(2), multiply(3)) + * const result = new NumberBox(5).pipe( + * (n) => n + 2, + * (n) => n * 3 + * ) * console.log(result) // 21 * ``` + * + * @category combinators + * @since 2.0.0 */ export const pipeArguments = (self, args) => { switch (args.length) { @@ -54,7 +81,15 @@ export const pipeArguments = (self, args) => { } }; /** - * @since 4.0.0 + * Reusable prototype that implements `Pipeable.pipe`. + * + * **When to use** + * + * Use when classes or object prototypes can reuse this value when they need the + * standard pipe implementation backed by `pipeArguments`. + * + * @category prototypes + * @since 3.15.0 */ export const Prototype = { pipe() { @@ -62,8 +97,16 @@ export const Prototype = { } }; /** - * @since 4.0.0 + * Provides a base constructor whose instances implement the standard `Pipeable.pipe` + * method. + * + * **When to use** + * + * Use when you need to define a class that supports Effect-style method + * chaining through `.pipe(...)`. + * * @category constructors + * @since 3.15.0 */ export const Class = /*#__PURE__*/function () { function PipeableBase() {} @@ -71,8 +114,23 @@ export const Class = /*#__PURE__*/function () { return PipeableBase; }(); /** - * @since 4.0.0 + * Returns a subclass of the provided class that adds the standard `pipe` + * method. + * + * **When to use** + * + * Use to add pipe support to an existing class without extending a base class + * or modifying its prototype. + * + * **Details** + * + * The original constructor and instance members are preserved, and the added + * method delegates to `pipeArguments`. + * + * @see {@link Prototype} for a reusable prototype object + * @see {@link Class} for a base constructor to extend * @category constructors + * @since 4.0.0 */ export const Mixin = klass => class extends klass { pipe() { diff --git a/.opencode/node_modules/effect/dist/Pipeable.js.map b/.opencode/node_modules/effect/dist/Pipeable.js.map index 84dd031f38d7abc850d0f3cc6391759d321f88d5..b5e65351fbc8b7f8b267f6612c8debf44e44c743 100644 --- a/.opencode/node_modules/effect/dist/Pipeable.js.map +++ b/.opencode/node_modules/effect/dist/Pipeable.js.map @@ -1 +1 @@ -{"version":3,"file":"Pipeable.js","names":["pipeArguments","self","args","length","ret","i","len","Prototype","pipe","arguments","Class","PipeableBase","prototype","Mixin","klass"],"sources":["../src/Pipeable.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAqfA;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMA,aAAa,GAAGA,CAAIC,IAAO,EAAEC,IAAgB,KAAa;EACrE,QAAQA,IAAI,CAACC,MAAM;IACjB,KAAK,CAAC;MACJ,OAAOF,IAAI;IACb,KAAK,CAAC;MACJ,OAAOC,IAAI,CAAC,CAAC,CAAC,CAACD,IAAI,CAAC;IACtB,KAAK,CAAC;MACJ,OAAOC,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACD,IAAI,CAAC,CAAC;IAC/B,KAAK,CAAC;MACJ,OAAOC,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACD,IAAI,CAAC,CAAC,CAAC;IACxC,KAAK,CAAC;MACJ,OAAOC,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAA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CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACA,IAAI,CAAC,CAAC,CAAC,CAACD,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9F;MAAS;QACP,IAAIG,GAAG,GAAGH,IAAI;QACd,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEC,GAAG,GAAGJ,IAAI,CAACC,MAAM,EAAEE,CAAC,GAAGC,GAAG,EAAED,CAAC,EAAE,EAAE;UAC/CD,GAAG,GAAGF,IAAI,CAACG,CAAC,CAAC,CAACD,GAAG,CAAC;QACpB;QACA,OAAOA,GAAG;MACZ;EACF;AACF,CAAC;AAED;;;AAGA,OAAO,MAAMG,SAAS,GAAa;EACjCC,IAAIA,CAAA;IACF,OAAOR,aAAa,CAAC,IAAI,EAAES,SAAS,CAAC;EACvC;CACD;AAED;;;;AAIA,OAAO,MAAMC,KAAK,gBAAuB;EACvC,SAASC,YAAYA,CAAA,GAAI;EACzBA,YAAY,CAACC,SAAS,GAAGL,SAAS;EAClC,OAAOI,YAAmB;AAC5B,CAAC,CAAC,CAAE;AAUJ;;;;AAIA,OAAO,MAAME,KAAK,GAChBC,KAAY,IAEX,cAAcA,KAAK;EAClBN,IAAIA,CAAA;IACF,OAAOR,aAAa,CAAC,IAAI,EAAES,SAAS,CAAC;EACvC;CACA","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Pipeable.js","names":["pipeArguments","self","args","length","ret","i","len","Prototype","pipe","arguments","Class","PipeableBase","prototype","Mixin","klass"],"sources":["../src/Pipeable.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;AA4gBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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aAAa,CAAC,IAAI,EAAES,SAAS,CAAC;EACvC;CACD;AAED;;;;;;;;;;;;AAYA,OAAO,MAAMC,KAAK,gBAAuB;EACvC,SAASC,YAAYA,CAAA,GAAI;EACzBA,YAAY,CAACC,SAAS,GAAGL,SAAS;EAClC,OAAOI,YAAmB;AAC5B,CAAC,CAAC,CAAE;AAqBJ;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAME,KAAK,GAChBC,KAAY,IACqB,cAAcA,KAAK;EACpDN,IAAIA,CAAA;IACF,OAAOR,aAAa,CAAC,IAAI,EAAES,SAAS,CAAC;EACvC;CACA","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/PlatformError.d.ts b/.opencode/node_modules/effect/dist/PlatformError.d.ts index 1f16cfa867a6ed6a11c4554055da31f6dffa5c1d..706419e6817175f62a960e6a2d33f82b31956080 100644 --- a/.opencode/node_modules/effect/dist/PlatformError.d.ts +++ b/.opencode/node_modules/effect/dist/PlatformError.d.ts @@ -1,4 +1,12 @@ /** + * Normalized errors for platform APIs. + * + * Platform services such as file systems, terminals, and sockets use + * `PlatformError` to report host-level failures in a consistent shape. The + * wrapper records whether the problem came from an invalid argument or from the + * operating system, while preserving useful details such as the module, method, + * path, descriptor, description, and original cause when available. + * * @since 4.0.0 */ import * as Data from "./Data.ts"; @@ -7,8 +15,24 @@ declare const BadArgument_base: new = {}>(args: i readonly _tag: "BadArgument"; } & Readonly; /** + * Error data for an invalid argument passed to a platform API. + * + * **When to use** + * + * Use when you need to model caller input rejected before a platform operation + * runs, including invalid-argument reason data. + * + * **Details** + * + * The error records the module and method that rejected the argument, with an + * optional description and cause. It is usually wrapped in `PlatformError`. + * + * @see {@link badArgument} for creating a wrapped `PlatformError` whose reason is `BadArgument` + * @see {@link SystemError} for failures reported by the host platform or operating system + * @see {@link PlatformError} for the wrapper used by most platform APIs + * + * @category models * @since 4.0.0 - * @category Models */ export declare class BadArgument extends BadArgument_base<{ module: string; @@ -17,18 +41,56 @@ export declare class BadArgument extends BadArgument_base<{ cause?: unknown; }> { /** + * Formats the module, method, and optional description that rejected the argument. + * + * **When to use** + * + * Use to read the formatted error message for a rejected platform argument. + * * @since 4.0.0 */ get message(): string; } /** + * Normalized category for failures reported by platform or system operations. + * + * **When to use** + * + * Use to type or match the normalized `_tag` on `SystemError` values reported + * by platform operations. + * + * **Details** + * + * The tags group lower-level platform errors into a stable set such as + * `NotFound`, `PermissionDenied`, `TimedOut`, and `Unknown`. + * + * @see {@link SystemError} for the error data that carries this tag on its `_tag` field + * @see {@link systemError} for creating a `PlatformError` from a system failure with one of these tags + * + * @category models * @since 4.0.0 - * @category Model */ export type SystemErrorTag = "AlreadyExists" | "BadResource" | "Busy" | "InvalidData" | "NotFound" | "PermissionDenied" | "TimedOut" | "UnexpectedEof" | "Unknown" | "WouldBlock" | "WriteZero"; /** - * @since 4.0.0 + * Error data for a platform or system operation failure. + * + * **When to use** + * + * Use when you need normalized reason data for a platform or system operation + * failure, including the operation details. + * + * **Details** + * + * The error records a normalized `_tag`, the module and method that failed, + * and optional details such as the syscall, path or descriptor, description, + * and original cause. It is usually wrapped in `PlatformError`. + * + * @see {@link systemError} for creating the usual `PlatformError` wrapper from this reason data + * @see {@link BadArgument} for platform API failures caused by rejected caller input before an operation runs + * @see {@link SystemErrorTag} for the normalized tag values stored in `_tag` + * * @category models + * @since 4.0.0 */ export declare class SystemError extends Data.Error<{ _tag: SystemErrorTag; @@ -40,6 +102,12 @@ export declare class SystemError extends Data.Error<{ cause?: unknown; }> { /** + * Formats the normalized system error tag with operation and path details. + * + * **When to use** + * + * Use to read the formatted error message for a normalized system failure. + * * @since 4.0.0 */ get message(): string; @@ -48,22 +116,54 @@ declare const PlatformError_base: new = {}>(args: readonly _tag: "PlatformError"; } & Readonly; /** + * Tagged error used by platform APIs to report either invalid arguments or + * system-level failures. + * + * **When to use** + * + * Use as the shared error type for platform APIs that expose invalid arguments + * and host or operating-system failures through a single `Effect` error + * channel. + * + * **Details** + * + * The `reason` field contains the underlying `BadArgument` or `SystemError`. + * When that reason has a cause, the cause is preserved on the wrapper. + * + * @see {@link BadArgument} for invalid inputs rejected before an operation runs + * @see {@link SystemError} for failures reported by the host platform or operating system + * @see {@link badArgument} for creating this wrapper from rejected caller input + * @see {@link systemError} for creating this wrapper from a host or operating-system failure + * + * @category models * @since 4.0.0 - * @category Models */ export declare class PlatformError extends PlatformError_base<{ reason: BadArgument | SystemError; }> { constructor(reason: BadArgument | SystemError); /** + * Marks this value as a platform error wrapper for runtime guards. + * + * **When to use** + * + * Use to identify `PlatformError` values through their runtime type marker. + * * @since 4.0.0 */ readonly [TypeId]: typeof TypeId; get message(): string; } /** - * @since 4.0.0 + * Creates a `PlatformError` whose reason is a `SystemError`. + * + * **When to use** + * + * Use to adapt an operating-system or platform failure into the normalized + * platform error model. + * * @category constructors + * @since 4.0.0 */ export declare const systemError: (options: { readonly _tag: SystemErrorTag; @@ -75,8 +175,15 @@ export declare const systemError: (options: { readonly cause?: unknown; }) => PlatformError; /** - * @since 4.0.0 + * Creates a `PlatformError` whose reason is a `BadArgument`. + * + * **When to use** + * + * Use to report a platform API rejecting caller input before performing the + * underlying operation. + * * @category constructors + * @since 4.0.0 */ export declare const badArgument: (options: { readonly module: string; diff --git a/.opencode/node_modules/effect/dist/PlatformError.d.ts.map b/.opencode/node_modules/effect/dist/PlatformError.d.ts.map index 02858d8983bd344d11672283cf62f2a0b492ee1d..c04e19f4e122cb559c7634fa90c6eca5f205d521 100644 --- a/.opencode/node_modules/effect/dist/PlatformError.d.ts.map +++ b/.opencode/node_modules/effect/dist/PlatformError.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"PlatformError.d.ts","sourceRoot":"","sources":["../src/PlatformError.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAEjC,QAAA,MAAM,MAAM,mCAAmC,CAAA;;;;AAE/C;;;GAGG;AACH,qBAAa,WAAY,SAAQ,iBAAgC;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C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CACzB,KAAG,aAA4D,CAAA"} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/PlatformError.js b/.opencode/node_modules/effect/dist/PlatformError.js index 90060510fc87b7c46ed232e61909e35bfa9c3cb8..db402841f315f77bf1804e6652d882796f4d37d4 100644 --- a/.opencode/node_modules/effect/dist/PlatformError.js +++ b/.opencode/node_modules/effect/dist/PlatformError.js @@ -1,14 +1,44 @@ /** + * Normalized errors for platform APIs. + * + * Platform services such as file systems, terminals, and sockets use + * `PlatformError` to report host-level failures in a consistent shape. The + * wrapper records whether the problem came from an invalid argument or from the + * operating system, while preserving useful details such as the module, method, + * path, descriptor, description, and original cause when available. + * * @since 4.0.0 */ import * as Data from "./Data.js"; const TypeId = "~effect/platform/PlatformError"; /** + * Error data for an invalid argument passed to a platform API. + * + * **When to use** + * + * Use when you need to model caller input rejected before a platform operation + * runs, including invalid-argument reason data. + * + * **Details** + * + * The error records the module and method that rejected the argument, with an + * optional description and cause. It is usually wrapped in `PlatformError`. + * + * @see {@link badArgument} for creating a wrapped `PlatformError` whose reason is `BadArgument` + * @see {@link SystemError} for failures reported by the host platform or operating system + * @see {@link PlatformError} for the wrapper used by most platform APIs + * + * @category models * @since 4.0.0 - * @category Models */ export class BadArgument extends /*#__PURE__*/Data.TaggedError("BadArgument") { /** + * Formats the module, method, and optional description that rejected the argument. + * + * **When to use** + * + * Use to read the formatted error message for a rejected platform argument. + * * @since 4.0.0 */ get message() { @@ -16,11 +46,34 @@ export class BadArgument extends /*#__PURE__*/Data.TaggedError("BadArgument") { } } /** - * @since 4.0.0 + * Error data for a platform or system operation failure. + * + * **When to use** + * + * Use when you need normalized reason data for a platform or system operation + * failure, including the operation details. + * + * **Details** + * + * The error records a normalized `_tag`, the module and method that failed, + * and optional details such as the syscall, path or descriptor, description, + * and original cause. It is usually wrapped in `PlatformError`. + * + * @see {@link systemError} for creating the usual `PlatformError` wrapper from this reason data + * @see {@link BadArgument} for platform API failures caused by rejected caller input before an operation runs + * @see {@link SystemErrorTag} for the normalized tag values stored in `_tag` + * * @category models + * @since 4.0.0 */ export class SystemError extends Data.Error { /** + * Formats the normalized system error tag with operation and path details. + * + * **When to use** + * + * Use to read the formatted error message for a normalized system failure. + * * @since 4.0.0 */ get message() { @@ -28,8 +81,27 @@ export class SystemError extends Data.Error { } } /** + * Tagged error used by platform APIs to report either invalid arguments or + * system-level failures. + * + * **When to use** + * + * Use as the shared error type for platform APIs that expose invalid arguments + * and host or operating-system failures through a single `Effect` error + * channel. + * + * **Details** + * + * The `reason` field contains the underlying `BadArgument` or `SystemError`. + * When that reason has a cause, the cause is preserved on the wrapper. + * + * @see {@link BadArgument} for invalid inputs rejected before an operation runs + * @see {@link SystemError} for failures reported by the host platform or operating system + * @see {@link badArgument} for creating this wrapper from rejected caller input + * @see {@link systemError} for creating this wrapper from a host or operating-system failure + * + * @category models * @since 4.0.0 - * @category Models */ export class PlatformError extends /*#__PURE__*/Data.TaggedError("PlatformError") { constructor(reason) { @@ -45,6 +117,12 @@ export class PlatformError extends /*#__PURE__*/Data.TaggedError("PlatformError" } } /** + * Marks this value as a platform error wrapper for runtime guards. + * + * **When to use** + * + * Use to identify `PlatformError` values through their runtime type marker. + * * @since 4.0.0 */ [TypeId] = TypeId; @@ -53,13 +131,27 @@ export class PlatformError extends /*#__PURE__*/Data.TaggedError("PlatformError" } } /** - * @since 4.0.0 + * Creates a `PlatformError` whose reason is a `SystemError`. + * + * **When to use** + * + * Use to adapt an operating-system or platform failure into the normalized + * platform error model. + * * @category constructors + * @since 4.0.0 */ export const systemError = options => new PlatformError(new SystemError(options)); /** - * @since 4.0.0 + * Creates a `PlatformError` whose reason is a `BadArgument`. + * + * **When to use** + * + * Use to report a platform API rejecting caller input before performing the + * underlying operation. + * * @category constructors + * @since 4.0.0 */ export const badArgument = options => new PlatformError(new BadArgument(options)); //# sourceMappingURL=PlatformError.js.map \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/PlatformError.js.map b/.opencode/node_modules/effect/dist/PlatformError.js.map index bc67820407a786e89123cf6d63904f609080f20f..4c9f524660ed032ee70bb5e63c93982f92846ba9 100644 --- a/.opencode/node_modules/effect/dist/PlatformError.js.map +++ b/.opencode/node_modules/effect/dist/PlatformError.js.map @@ -1 +1 @@ -{"version":3,"file":"PlatformError.js","names":["Data","TypeId","BadArgument","TaggedError","message","module","method","description","SystemError","Error","_tag","pathOrDescriptor","undefined","PlatformError","constructor","reason","cause","systemError","options","badArgument"],"sources":["../src/PlatformError.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,IAAI,MAAM,WAAW;AAEjC,MAAMC,MAAM,GAAG,gCAAgC;AAE/C;;;;AAIA,OAAM,MAAOC,WAAY,sBAAQF,IAAI,CAACG,WAAW,CAAC,aAAa,CAK7D;EACA;;;EAGA,IAAaC,OAAOA,CAAA;IAClB,OAAO,GAAG,IAAI,CAACC,MAAM,IAAI,IAAI,CAACC,MAAM,GAAG,IAAI,CAACC,WAAW,GAAG,KAAK,IAAI,CAACA,WAAW,EAAE,GAAG,EAAE,EAAE;EAC1F;;AAoBF;;;;AAIA,OAAM,MAAOC,WAAY,SAAQR,IAAI,CAACS,KAQpC;EACA;;;EAGA,IAAaL,OAAOA,CAAA;IAClB,OAAO,GAAG,IAAI,CAACM,IAAI,KAAK,IAAI,CAACL,MAAM,IAAI,IAAI,CAACC,MAAM,GAChD,IAAI,CAACK,gBAAgB,KAAKC,SAAS,GAAG,KAAK,IAAI,CAACD,gBAAgB,GAAG,GAAG,EACxE,GAAG,IAAI,CAACJ,WAAW,GAAG,KAAK,IAAI,CAACA,WAAW,EAAE,GAAG,EAAE,EAAE;EACtD;;AAGF;;;;AAIA,OAAM,MAAOM,aAAc,sBAAQb,IAAI,CAACG,WAAW,CAAC,eAAe,CAEjE;EACAW,YAAYC,MAAiC;IAC3C,IAAI,OAAO,IAAIA,MAAM,EAAE;MACrB,KAAK,CAAC;QAAEA,MAAM;QAAEC,KAAK,EAAED,MAAM,CAACC;MAAK,CAAS,CAAC;IAC/C,CAAC,MAAM;MACL,KAAK,CAAC;QAAED;MAAM,CAAE,CAAC;IACnB;EACF;EAEA;;;EAGS,CAACd,MAAM,IAAmBA,MAAM;EAEzC,IAAaG,OAAOA,CAAA;IAClB,OAAO,IAAI,CAACW,MAAM,CAACX,OAAO;EAC5B;;AAGF;;;;AAIA,OAAO,MAAMa,WAAW,GAAIC,OAQ3B,IAAoB,IAAIL,aAAa,CAAC,IAAIL,WAAW,CAACU,OAAO,CAAC,CAAC;AAEhE;;;;AAIA,OAAO,MAAMC,WAAW,GAAID,OAK3B,IAAoB,IAAIL,aAAa,CAAC,IAAIX,WAAW,CAACgB,OAAO,CAAC,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"PlatformError.js","names":["Data","TypeId","BadArgument","TaggedError","message","module","method","description","SystemError","Error","_tag","pathOrDescriptor","undefined","PlatformError","constructor","reason","cause","systemError","options","badArgument"],"sources":["../src/PlatformError.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAWA,OAAO,KAAKA,IAAI,MAAM,WAAW;AAEjC,MAAMC,MAAM,GAAG,gCAAgC;AAE/C;;;;;;;;;;;;;;;;;;;;AAoBA,OAAM,MAAOC,WAAY,sBAAQF,IAAI,CAACG,WAAW,CAAC,aAAa,CAK7D;EACA;;;;;;;;;EASA,IAAaC,OAAOA,CAAA;IAClB,OAAO,GAAG,IAAI,CAACC,MAAM,IAAI,IAAI,CAACC,MAAM,GAAG,IAAI,CAACC,WAAW,GAAG,KAAK,IAAI,CAACA,WAAW,EAAE,GAAG,EAAE,EAAE;EAC1F;;AAmCF;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAM,MAAOC,WAAY,SAAQR,IAAI,CAACS,KAQpC;EACA;;;;;;;;;EASA,IAAaL,OAAOA,CAAA;IAClB,OAAO,GAAG,IAAI,CAACM,IAAI,KAAK,IAAI,CAACL,MAAM,IAAI,IAAI,CAACC,MAAM,GAChD,IAAI,CAACK,gBAAgB,KAAKC,SAAS,GAAG,KAAK,IAAI,CAACD,gBAAgB,GAAG,GAAG,EACxE,GAAG,IAAI,CAACJ,WAAW,GAAG,KAAK,IAAI,CAACA,WAAW,EAAE,GAAG,EAAE,EAAE;EACtD;;AAGF;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAM,MAAOM,aAAc,sBAAQb,IAAI,CAACG,WAAW,CAAC,eAAe,CAEjE;EACAW,YAAYC,MAAiC;IAC3C,IAAI,OAAO,IAAIA,MAAM,EAAE;MACrB,KAAK,CAAC;QAAEA,MAAM;QAAEC,KAAK,EAAED,MAAM,CAACC;MAAK,CAAS,CAAC;IAC/C,CAAC,MAAM;MACL,KAAK,CAAC;QAAED;MAAM,CAAE,CAAC;IACnB;EACF;EAEA;;;;;;;;;EASS,CAACd,MAAM,IAAmBA,MAAM;EAEzC,IAAaG,OAAOA,CAAA;IAClB,OAAO,IAAI,CAACW,MAAM,CAACX,OAAO;EAC5B;;AAGF;;;;;;;;;;;AAWA,OAAO,MAAMa,WAAW,GAAIC,OAQ3B,IAAoB,IAAIL,aAAa,CAAC,IAAIL,WAAW,CAACU,OAAO,CAAC,CAAC;AAEhE;;;;;;;;;;;AAWA,OAAO,MAAMC,WAAW,GAAID,OAK3B,IAAoB,IAAIL,aAAa,CAAC,IAAIX,WAAW,CAACgB,OAAO,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Pool.d.ts b/.opencode/node_modules/effect/dist/Pool.d.ts index 4527c624dc5b4a0194d056c78d310b0bcd4c6dd8..68e210461b38b360cb415bb1603c070e11102bab 100644 --- a/.opencode/node_modules/effect/dist/Pool.d.ts +++ b/.opencode/node_modules/effect/dist/Pool.d.ts @@ -11,8 +11,19 @@ declare const TypeId = "~effect/Pool"; * associated with the acquisition and release of resources. An attempt to get * an item `A` from a pool may fail with an error of type `E`. * - * @since 2.0.0 + * **When to use** + * + * Use when you need to share a bounded set of scoped resources across fibers + * while the pool manages acquisition, reuse, and release. + * + * @see {@link make} for creating a pool with size bounds + * @see {@link makeWithTTL} for creating a pool with idle item expiration + * @see {@link makeWithStrategy} for creating a pool with a custom strategy + * @see {@link get} for acquiring an item from a pool + * @see {@link invalidate} for removing a broken item from the pool + * * @category models + * @since 2.0.0 */ export interface Pool extends Pipeable { readonly [TypeId]: typeof TypeId; @@ -20,8 +31,24 @@ export interface Pool extends Pipeable { readonly state: State; } /** - * @since 4.0.0 + * Normalized configuration used by a `Pool`. + * + * **When to use** + * + * Use as the normalized, read-only description of how a pool acquires, sizes, + * shares, and resizes its items after construction. + * + * **Details** + * + * The config stores the acquire effect, size bounds, per-item concurrency, + * target utilization, and resizing strategy used by the pool implementation. + * + * @see {@link Pool} for the value exposing this configuration + * @see {@link State} for mutable runtime state instead of static configuration + * @see {@link Strategy} for the resizing and reclamation contract stored on the config + * * @category models + * @since 4.0.0 */ export interface Config { readonly acquire: Effect.Effect; @@ -32,8 +59,28 @@ export interface Config { readonly targetUtilization: number; } /** - * @since 4.0.0 + * Mutable runtime state maintained by a `Pool`. + * + * **When to use** + * + * Use when you need to inspect or support the runtime state backing a `Pool`, + * including its scope, item sets, semaphores, waiters, invalidation tracking, + * and shutdown flag. + * + * **Details** + * + * This state tracks the pool scope, active and available items, invalidated + * items, semaphores, waiters, and shutdown status. It is exposed for + * inspection and implementation support; user code should prefer the + * high-level pool operations. + * + * @see {@link Pool} for the pool value exposing this state + * @see {@link PoolItem} for the entries stored in the runtime item sets + * @see {@link get} for acquiring items through the high-level API + * @see {@link invalidate} for invalidating items through the high-level API + * * @category models + * @since 4.0.0 */ export interface State { readonly scope: Scope.Scope; @@ -47,8 +94,25 @@ export interface State { waiters: number; } /** - * @since 4.0.0 + * Internal record for a value managed by a `Pool`. + * + * **When to use** + * + * Use when implementing a custom pool `Strategy` that needs to inspect + * acquired items, track reference counts, or return reclaimable items to the + * pool. + * + * **Details** + * + * Each item stores the acquisition `Exit`, its finalizer, the current + * reference count, and whether automatic reclaiming has been disabled because + * the item was invalidated. + * + * @see {@link Strategy} for the custom strategy callbacks that receive and return pool items + * @see {@link State} for the runtime sets that store active, available, and invalidated pool items + * * @category models + * @since 4.0.0 */ export interface PoolItem { readonly exit: Exit.Exit; @@ -57,8 +121,24 @@ export interface PoolItem { disableReclaim: boolean; } /** - * @since 4.0.0 + * Strategy used by a `Pool` to manage background resizing and item + * reclamation. + * + * **When to use** + * + * Use when defining a custom pool lifecycle policy that needs to run background + * work, observe acquired items, or choose items for reclamation. + * + * **Details** + * + * `run` starts any strategy-specific background work, `onAcquire` is invoked + * when an item is acquired, and `reclaim` selects an item that can be removed + * or replaced. + * + * @see {@link makeWithStrategy} for constructing a pool from a custom `Strategy` + * * @category models + * @since 4.0.0 */ export interface Strategy { readonly run: (pool: Pool) => Effect.Effect; @@ -68,15 +148,31 @@ export interface Strategy { /** * Returns `true` if the specified value is a `Pool`, `false` otherwise. * - * @since 2.0.0 + * **When to use** + * + * Use to validate unknown values at runtime boundaries before treating them as + * `Pool` values. + * + * **Details** + * + * This predicate narrows the input to `Pool`. + * * @category refinements + * @since 2.0.0 */ export declare const isPool: (u: unknown) => u is Pool; /** - * Makes a new pool of the specified fixed size. The pool is returned in a - * `Scope`, which governs the lifetime of the pool. When the pool is shutdown - * because the `Scope` is closed, the individual items allocated by the pool - * will be released in some unspecified order. + * Makes a new pool of the specified fixed size. + * + * **When to use** + * + * Use when you need a fixed-size pool with no growth or shrinkage. + * + * **Details** + * + * The pool is returned in a `Scope`, which governs the lifetime of the pool. + * When the pool is shutdown because the `Scope` is closed, the individual + * items allocated by the pool will be released in some unspecified order. * * By setting the `concurrency` parameter, you can control the level of concurrent * access per pool item. By default, the number of permits is set to `1`. @@ -88,8 +184,10 @@ export declare const isPool: (u: unknown) => u is Pool; * A `targetUtilization` of 0.5 will create new pool items when the existing items are * 50% utilized. * - * @since 2.0.0 + * @see {@link makeWithTTL} for pools with min/max sizes and a TTL-based shrinking policy + * @see {@link makeWithStrategy} for pools with a custom resizing and reclamation strategy * @category constructors + * @since 2.0.0 */ export declare const make: (options: { readonly acquire: Effect.Effect; @@ -98,51 +196,61 @@ export declare const make: (options: { readonly targetUtilization?: number | undefined; }) => Effect.Effect, never, R | Scope.Scope>; /** - * Makes a new pool with the specified minimum and maximum sizes and time to - * live before a pool whose excess items are not being used will be shrunk - * down to the minimum size. The pool is returned in a `Scope`, which governs - * the lifetime of the pool. When the pool is shutdown because the `Scope` is - * used, the individual items allocated by the pool will be released in some - * unspecified order. + * Creates a scoped pool with minimum and maximum sizes and a time-to-live + * policy for shrinking unused excess items. * - * By setting the `concurrency` parameter, you can control the level of concurrent - * access per pool item. By default, the number of permits is set to `1`. + * **When to use** * - * `targetUtilization` determines when to create new pool items. It is a value - * between 0 and 1, where 1 means only create new pool items when all the existing - * items are fully utilized. + * Use to create an elastic scoped pool that can grow up to a maximum size and + * later reclaim unused excess items. * - * A `targetUtilization` of 0.5 will create new pool items when the existing items are - * 50% utilized. + * **Details** + * + * The returned pool requires `Scope`; when that scope is closed, allocated + * items are released in an unspecified order. `concurrency` controls how many + * fibers may use each pool item at once and defaults to `1`. * - * The `timeToLiveStrategy` determines how items are invalidated. If set to - * "creation", then items are invalidated based on their creation time. If set - * to "usage", then items are invalidated based on pool usage. + * `targetUtilization` controls when new items are created and is clamped by the + * pool implementation. A value of `1` waits until existing items are fully + * utilized before creating more items. * - * By default, the `timeToLiveStrategy` is set to "usage". + * `timeToLiveStrategy` controls when excess items expire: `"creation"` measures + * from item creation, while `"usage"` measures from pool usage. The default is + * `"usage"`. * - * ```ts skip-type-checking + * **Example** (Create a connection pool) + * + * ```ts * import { Duration, Effect, Pool } from "effect" - * import { createConnection } from "mysql2" + * + * interface Connection { + * readonly execute: (sql: string) => Effect.Effect> + * readonly close: Effect.Effect + * } * * const acquireDBConnection = Effect.acquireRelease( - * Effect.sync(() => createConnection("mysql://...")), - * (connection) => Effect.sync(() => connection.end(() => {})) + * Effect.succeed({ + * execute: (sql) => Effect.succeed([`executed: ${sql}`]), + * close: Effect.void + * } satisfies Connection), + * (connection) => connection.close * ) * - * const connectionPool = Effect.flatMap( - * Pool.makeWithTTL({ - * acquire: acquireDBConnection, - * min: 10, - * max: 20, - * timeToLive: Duration.seconds(60) - * }), - * (pool) => pool.get + * const program = Effect.scoped( + * Effect.flatMap( + * Pool.makeWithTTL({ + * acquire: acquireDBConnection, + * min: 10, + * max: 20, + * timeToLive: Duration.seconds(60) + * }), + * (pool) => Effect.flatMap(Pool.get(pool), (connection) => connection.execute("select 1")) + * ) * ) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export declare const makeWithTTL: (options: { readonly acquire: Effect.Effect; @@ -154,8 +262,24 @@ export declare const makeWithTTL: (options: { readonly timeToLiveStrategy?: "creation" | "usage" | undefined; }) => Effect.Effect, never, R | Scope.Scope>; /** - * @since 4.0.0 + * Creates a scoped pool using a custom resizing and reclamation strategy. + * + * **When to use** + * + * Use to build a pool whose item lifecycle is controlled by an explicit + * `Strategy`, such as custom background resizing, replacement, or reclamation. + * + * **Details** + * + * The returned pool requires `Scope`; closing the scope shuts down the pool and + * releases allocated items. + * + * @see {@link make} for fixed-size pools without custom resizing or reclamation + * @see {@link makeWithTTL} for min/max pools that shrink excess items with a TTL policy + * @see {@link Strategy} for the custom strategy contract consumed by this constructor + * * @category constructors + * @since 4.0.0 */ export declare const makeWithStrategy: (options: { readonly acquire: Effect.Effect; @@ -166,39 +290,86 @@ export declare const makeWithStrategy: (options: { readonly strategy: Strategy; }) => Effect.Effect, never, Scope.Scope | R>; /** - * Retrieves an item from the pool in a scoped effect. Note that if - * acquisition fails, then the returned effect will fail for that same reason. - * Retrying a failed acquisition attempt will repeat the acquisition attempt. + * Retrieves an item from the pool in a scoped effect. + * + * **When to use** + * + * Use to borrow a pooled resource for the lifetime of the current scope so it + * is automatically returned when that scope closes. + * + * **Details** + * + * The returned effect waits for an available item when the pool is at capacity. + * If acquiring a new item fails, the effect fails with the acquisition error. + * + * **Gotchas** + * + * Retrying a failed `get` can repeat the acquisition attempt. + * + * @see {@link invalidate} for removing an unhealthy item from future reuse * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export declare const get: (self: Pool) => Effect.Effect; /** - * Invalidates the specified item. This will cause the pool to eventually - * reallocate the item, although this reallocation may occur lazily rather - * than eagerly. + * Invalidates the specified item so the pool can remove it and reallocate the + * item, lazily if needed. + * + * **When to use** + * + * Use to prevent a pooled item from being reused after it becomes unsuitable, + * such as a stale connection or a resource that failed a health check. + * + * **Gotchas** + * + * The item is matched with strict equality. Passing an equivalent but different + * object instance does nothing. + * + * @see {@link get} for retrieving scoped items from the pool * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ export declare const invalidate: { /** - * Invalidates the specified item. This will cause the pool to eventually - * reallocate the item, although this reallocation may occur lazily rather - * than eagerly. + * Invalidates the specified item so the pool can remove it and reallocate the + * item, lazily if needed. + * + * **When to use** + * + * Use to prevent a pooled item from being reused after it becomes unsuitable, + * such as a stale connection or a resource that failed a health check. + * + * **Gotchas** + * + * The item is matched with strict equality. Passing an equivalent but different + * object instance does nothing. + * + * @see {@link get} for retrieving scoped items from the pool * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ (item: A): (self: Pool) => Effect.Effect; /** - * Invalidates the specified item. This will cause the pool to eventually - * reallocate the item, although this reallocation may occur lazily rather - * than eagerly. + * Invalidates the specified item so the pool can remove it and reallocate the + * item, lazily if needed. + * + * **When to use** + * + * Use to prevent a pooled item from being reused after it becomes unsuitable, + * such as a stale connection or a resource that failed a health check. + * + * **Gotchas** + * + * The item is matched with strict equality. Passing an equivalent but different + * object instance does nothing. + * + * @see {@link get} for retrieving scoped items from the pool * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ (self: Pool, item: A): Effect.Effect; }; diff --git a/.opencode/node_modules/effect/dist/Pool.d.ts.map b/.opencode/node_modules/effect/dist/Pool.d.ts.map index 8021cc8f661f68054093e08d0675aa2ec5540f52..296fbe935cf4e127696df6e20636cbd0f1c575b4 100644 --- a/.opencode/node_modules/effect/dist/Pool.d.ts.map +++ b/.opencode/node_modules/effect/dist/Pool.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Pool.d.ts","sourceRoot":"","sources":["../src/Pool.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,KAAK,IAAI,MAAM,WAAW,CAAA;AAItC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,eAAe,CAAA;AAI5D,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAE3C,QAAA,MAAM,MAAM,iBAAiB,CAAA;AAE7B;;;;;;;GAOG;AACH,MAAM,WAAW,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAE,SAAQ,QAAQ;IAChE,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAC7B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM,CAAC,CAAC,EAAE,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,C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.opencode/node_modules/effect/dist/Pool.js b/.opencode/node_modules/effect/dist/Pool.js index 1bded6ff7a83c7961e99f6841eb24c36148291f1..a86bcc5ff0efff2d2189fc53a483f47889b05136 100644 --- a/.opencode/node_modules/effect/dist/Pool.js +++ b/.opencode/node_modules/effect/dist/Pool.js @@ -16,15 +16,31 @@ const TypeId = "~effect/Pool"; /** * Returns `true` if the specified value is a `Pool`, `false` otherwise. * - * @since 2.0.0 + * **When to use** + * + * Use to validate unknown values at runtime boundaries before treating them as + * `Pool` values. + * + * **Details** + * + * This predicate narrows the input to `Pool`. + * * @category refinements + * @since 2.0.0 */ export const isPool = u => hasProperty(u, TypeId); /** - * Makes a new pool of the specified fixed size. The pool is returned in a - * `Scope`, which governs the lifetime of the pool. When the pool is shutdown - * because the `Scope` is closed, the individual items allocated by the pool - * will be released in some unspecified order. + * Makes a new pool of the specified fixed size. + * + * **When to use** + * + * Use when you need a fixed-size pool with no growth or shrinkage. + * + * **Details** + * + * The pool is returned in a `Scope`, which governs the lifetime of the pool. + * When the pool is shutdown because the `Scope` is closed, the individual + * items allocated by the pool will be released in some unspecified order. * * By setting the `concurrency` parameter, you can control the level of concurrent * access per pool item. By default, the number of permits is set to `1`. @@ -36,8 +52,10 @@ export const isPool = u => hasProperty(u, TypeId); * A `targetUtilization` of 0.5 will create new pool items when the existing items are * 50% utilized. * - * @since 2.0.0 + * @see {@link makeWithTTL} for pools with min/max sizes and a TTL-based shrinking policy + * @see {@link makeWithStrategy} for pools with a custom resizing and reclamation strategy * @category constructors + * @since 2.0.0 */ export const make = options => makeWithStrategy({ ...options, @@ -46,59 +64,85 @@ export const make = options => makeWithStrategy({ strategy: strategyNoop() }); /** - * Makes a new pool with the specified minimum and maximum sizes and time to - * live before a pool whose excess items are not being used will be shrunk - * down to the minimum size. The pool is returned in a `Scope`, which governs - * the lifetime of the pool. When the pool is shutdown because the `Scope` is - * used, the individual items allocated by the pool will be released in some - * unspecified order. + * Creates a scoped pool with minimum and maximum sizes and a time-to-live + * policy for shrinking unused excess items. * - * By setting the `concurrency` parameter, you can control the level of concurrent - * access per pool item. By default, the number of permits is set to `1`. + * **When to use** * - * `targetUtilization` determines when to create new pool items. It is a value - * between 0 and 1, where 1 means only create new pool items when all the existing - * items are fully utilized. + * Use to create an elastic scoped pool that can grow up to a maximum size and + * later reclaim unused excess items. * - * A `targetUtilization` of 0.5 will create new pool items when the existing items are - * 50% utilized. + * **Details** + * + * The returned pool requires `Scope`; when that scope is closed, allocated + * items are released in an unspecified order. `concurrency` controls how many + * fibers may use each pool item at once and defaults to `1`. + * + * `targetUtilization` controls when new items are created and is clamped by the + * pool implementation. A value of `1` waits until existing items are fully + * utilized before creating more items. * - * The `timeToLiveStrategy` determines how items are invalidated. If set to - * "creation", then items are invalidated based on their creation time. If set - * to "usage", then items are invalidated based on pool usage. + * `timeToLiveStrategy` controls when excess items expire: `"creation"` measures + * from item creation, while `"usage"` measures from pool usage. The default is + * `"usage"`. * - * By default, the `timeToLiveStrategy` is set to "usage". + * **Example** (Create a connection pool) * - * ```ts skip-type-checking + * ```ts * import { Duration, Effect, Pool } from "effect" - * import { createConnection } from "mysql2" + * + * interface Connection { + * readonly execute: (sql: string) => Effect.Effect> + * readonly close: Effect.Effect + * } * * const acquireDBConnection = Effect.acquireRelease( - * Effect.sync(() => createConnection("mysql://...")), - * (connection) => Effect.sync(() => connection.end(() => {})) + * Effect.succeed({ + * execute: (sql) => Effect.succeed([`executed: ${sql}`]), + * close: Effect.void + * } satisfies Connection), + * (connection) => connection.close * ) * - * const connectionPool = Effect.flatMap( - * Pool.makeWithTTL({ - * acquire: acquireDBConnection, - * min: 10, - * max: 20, - * timeToLive: Duration.seconds(60) - * }), - * (pool) => pool.get + * const program = Effect.scoped( + * Effect.flatMap( + * Pool.makeWithTTL({ + * acquire: acquireDBConnection, + * min: 10, + * max: 20, + * timeToLive: Duration.seconds(60) + * }), + * (pool) => Effect.flatMap(Pool.get(pool), (connection) => connection.execute("select 1")) + * ) * ) * ``` * - * @since 2.0.0 * @category constructors + * @since 2.0.0 */ export const makeWithTTL = options => Effect.flatMap(options.timeToLiveStrategy === "creation" ? strategyCreationTTL(options.timeToLive) : strategyUsageTTL(options.timeToLive), strategy => makeWithStrategy({ ...options, strategy })); /** - * @since 4.0.0 + * Creates a scoped pool using a custom resizing and reclamation strategy. + * + * **When to use** + * + * Use to build a pool whose item lifecycle is controlled by an explicit + * `Strategy`, such as custom background resizing, replacement, or reclamation. + * + * **Details** + * + * The returned pool requires `Scope`; closing the scope shuts down the pool and + * releases allocated items. + * + * @see {@link make} for fixed-size pools without custom resizing or reclamation + * @see {@link makeWithTTL} for min/max pools that shrink excess items with a TTL policy + * @see {@link Strategy} for the custom strategy contract consumed by this constructor + * * @category constructors + * @since 4.0.0 */ export const makeWithStrategy = options => Effect.uninterruptibleMask(Effect.fnUntraced(function* (restore) { const services = yield* Effect.context(); @@ -159,12 +203,26 @@ const shutdown = /*#__PURE__*/Effect.fnUntraced(function* (self) { yield* semaphore.take(size); }); /** - * Retrieves an item from the pool in a scoped effect. Note that if - * acquisition fails, then the returned effect will fail for that same reason. - * Retrying a failed acquisition attempt will repeat the acquisition attempt. + * Retrieves an item from the pool in a scoped effect. + * + * **When to use** + * + * Use to borrow a pooled resource for the lifetime of the current scope so it + * is automatically returned when that scope closes. + * + * **Details** + * + * The returned effect waits for an available item when the pool is at capacity. + * If acquiring a new item fails, the effect fails with the acquisition error. + * + * **Gotchas** + * + * Retrying a failed `get` can repeat the acquisition attempt. + * + * @see {@link invalidate} for removing an unhealthy item from future reuse * - * @since 2.0.0 * @category getters + * @since 2.0.0 */ export const get = self => Effect.suspend(() => { if (self.state.isShuttingDown) { @@ -212,12 +270,23 @@ const getPoolItemInner = /*#__PURE__*/Effect.fnUntraced(function* (self) { return Iterable.headUnsafe(self.state.available); }); /** - * Invalidates the specified item. This will cause the pool to eventually - * reallocate the item, although this reallocation may occur lazily rather - * than eagerly. + * Invalidates the specified item so the pool can remove it and reallocate the + * item, lazily if needed. + * + * **When to use** + * + * Use to prevent a pooled item from being reused after it becomes unsuitable, + * such as a stale connection or a resource that failed a health check. + * + * **Gotchas** + * + * The item is matched with strict equality. Passing an equivalent but different + * object instance does nothing. + * + * @see {@link get} for retrieving scoped items from the pool * - * @since 2.0.0 * @category combinators + * @since 2.0.0 */ export const invalidate = /*#__PURE__*/dual(2, (self, item) => Effect.suspend(() => { if (self.state.isShuttingDown) return Effect.void; diff --git a/.opencode/node_modules/effect/dist/Pool.js.map b/.opencode/node_modules/effect/dist/Pool.js.map index fa8252a51decc8411d71dcf75484d632556cca18..6b43aa10cea63c135ece97ae649041806386aee8 100644 --- a/.opencode/node_modules/effect/dist/Pool.js.map +++ b/.opencode/node_modules/effect/dist/Pool.js.map @@ -1 +1 @@ -{"version":3,"file":"Pool.js","names":["Clock","Context","Duration","Effect","Fiber","dual","identity","Iterable","Latch","pipeArguments","hasProperty","Queue","UnhandledLogLevel","Scope","Semaphore","TypeId","isPool","u","make","options","makeWithStrategy","min","size","max","strategy","strategyNoop","makeWithTTL","flatMap","timeToLiveStrategy","strategyCreationTTL","timeToLive","strategyUsageTTL","uninterruptibleMask","fnUntraced","restore","services","context","scope","get","acquire","updateContext","input","merge","concurrency","config","minSize","maxSize","targetUtilization","Math","state","isShuttingDown","semaphore","makeUnsafe","resizeSemaphore","items","Set","available","availableLatch","invalidated","waiters","self","pipe","arguments","addFinalizer","shutdown","tap","forkDetach","resize","fiber","interrupt","run","item","refCount","finalizer","release","add","take","delete","releaseAll","openUnsafe","suspend","getPoolItem","exit","getPoolItemInner","ensuring","sync","_tag","addFinalizerExit","has","invalidatePoolItem","void","onInterrupt","targetSize","activeSize","withPermitsIfAvailable","forkIn","interruptible","headUnsafe","closeUnsafe","await","invalidate","poolItem","value","disableReclaim","uninterruptible","asVoid","withPermits","resizeLoop","active","target","toAcquire","reclaim","succeed","allocate","replicateEffect","open","some","_","acquireUseRelease","provide","catchCause","close","reportUnhandledError","as","onAcquire","currentUsage","count","utilization","ceil","undefined","ttl","clock","queue","unbounded","ttlMillis","toMillis","fromInputUnsafe","creationTimes","WeakMap","pool","process","now","currentTimeMillisUnsafe","created","remaining","delay","forever","disableYield","set","offer","excess","head","filter","cause","withFiber","unhandledLogLevel","getRef","logWithLevel"],"sources":["../src/Pool.ts"],"sourcesContent":[null],"mappings":"AAIA,SAASA,KAAK,QAAQ,YAAY;AAClC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAC9C,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAAwBC,aAAa,QAAQ,eAAe;AAC5D,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,iBAAiB,QAAQ,iBAAiB;AACnD,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C,MAAMC,MAAM,GAAG,cAAc;AAkE7B;;;;;;AAMA,OAAO,MAAMC,MAAM,GAAIC,CAAU,IAAkCP,WAAW,CAACO,CAAC,EAAEF,MAAM,CAAC;AAEzF;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMG,IAAI,GAAaC,OAK7B,IACCC,gBAAgB,CAAC;EAAE,GAAGD,OAAO;EAAEE,GAAG,EAAEF,OAAO,CAACG,IAAI;EAAEC,GAAG,EAAEJ,OAAO,CAACG,IAAI;EAAEE,QAAQ,EAAEC,YAAY;AAAE,CAAE,CAAC;AAElG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,OAAO,MAAMC,WAAW,GAAaP,OAQpC,IACChB,MAAM,CAACwB,OAAO,CACZR,OAAO,C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C9D,CAAC,CAAC;IACJ;GACD,CAAC;AACJ,CAAC,CAAC;AAEF,MAAMoB,oBAAoB,GAAO+B,KAAqB,IACpDtJ,MAAM,CAACuJ,SAAS,CAAQtF,KAAK,IAAI;EAC/B,MAAMuF,iBAAiB,GAAGvF,KAAK,CAACwF,MAAM,CAAChJ,iBAAiB,CAAC;EACzD,IAAI+I,iBAAiB,EAAE;IACrB,OAAOxJ,MAAM,CAAC0J,YAAY,CAACF,iBAAiB,CAAC,CAC3C,mCAAmC,EACnCF,KAAK,CACN;EACH;EACA,OAAOtJ,MAAM,CAACuF,IAAI;AACpB,CAAC,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"Pool.js","names":["Clock","Context","Duration","Effect","Fiber","dual","identity","Iterable","Latch","pipeArguments","hasProperty","Queue","UnhandledLogLevel","Scope","Semaphore","TypeId","isPool","u","make","options","makeWithStrategy","min","size","max","strategy","strategyNoop","makeWithTTL","flatMap","timeToLiveStrategy","strategyCreationTTL","timeToLive","strategyUsageTTL","uninterruptibleMask","fnUntraced","restore","services","context","scope","get","acquire","updateContext","input","merge","concurrency","config","minSize","maxSize","targetUtilization","Math","state","isShuttingDown","semaphore","makeUnsafe","resizeSemaphore","items","Set","available","availableLatch","invalidated","waiters","self","pipe","arguments","addFinalizer","shutdown","tap","forkDetach","resize","fiber","interrupt","run","item","refCount","finalizer","release","add","take","delete","releaseAll","openUnsafe","suspend","getPoolItem","exit","getPoolItemInner","ensuring","sync","_tag","addFinalizerExit","has","invalidatePoolItem","void","onInterrupt","targetSize","activeSize","withPermitsIfAvailable","forkIn","interruptible","headUnsafe","closeUnsafe","await","invalidate","poolItem","value","disableReclaim","uninterruptible","asVoid","withPermits","resizeLoop","active","target","toAcquire","reclaim","succeed","allocate","replicateEffect","open","some","_","acquireUseRelease","provide","catchCause","close","reportUnhandledError","as","onAcquire","currentUsage","count","utilization","ceil","undefined","ttl","clock","queue","unbounded","ttlMillis","toMillis","fromInputUnsafe","creationTimes","WeakMap","pool","process","now","currentTimeMillisUnsafe","created","remaining","delay","forever","disableYield","set","offer","excess","head","filter","cause","withFiber","unhandledLogLevel","getRef","logWithLevel"],"sources":["../src/Pool.ts"],"sourcesContent":[null],"mappings":"AAYA,SAASA,KAAK,QAAQ,YAAY;AAClC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAC9C,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAAwBC,aAAa,QAAQ,eAAe;AAC5D,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,iBAAiB,QAAQ,iBAAiB;AACnD,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C,MAAMC,MAAM,GAAG,cAAc;AAkJ7B;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,MAAM,GAAIC,CAAU,IAAkCP,WAAW,CAACO,CAAC,EAAEF,MAAM,CAAC;AAEzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAO,MAAMG,IAAI,GAAaC,OAK7B,IACCC,gBAAgB,CAAC;EAAE,GAAGD,OAAO;EAAEE,GAAG,EAAEF,OAAO,CAACG,IAAI;EAAEC,GAAG,EAAEJ,OAAO,CAACG,IAAI;EAAEE,QAAQ,EAAEC,YAAY;AAAE,CAAE,CAAC;AAElG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDA,OAAO,MAAMC,WAAW,GAAaP,OAQpC,IACChB,MAAM,CAACwB,OAAO,CACZR,OAAO,CAACS,kBAAkB,KAAK,UAAU,GAC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I,CAAC+B,KAAK,CAAC;MAC9D,CAAC,CAAC;IACJ;GACD,CAAC;AACJ,CAAC,CAAC;AAEF,MAAMoB,oBAAoB,GAAO+B,KAAqB,IACpDtJ,MAAM,CAACuJ,SAAS,CAAQtF,KAAK,IAAI;EAC/B,MAAMuF,iBAAiB,GAAGvF,KAAK,CAACwF,MAAM,CAAChJ,iBAAiB,CAAC;EACzD,IAAI+I,iBAAiB,EAAE;IACrB,OAAOxJ,MAAM,CAAC0J,YAAY,CAACF,iBAAiB,CAAC,CAC3C,mCAAmC,EACnCF,KAAK,CACN;EACH;EACA,OAAOtJ,MAAM,CAACuF,IAAI;AACpB,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/.opencode/node_modules/effect/dist/Predicate.d.ts b/.opencode/node_modules/effect/dist/Predicate.d.ts index ca7472f571dfe2975e0a92f8c882ccfb67a00b86..1418de31144de2431c37e50e4c4d1b3d893bbbd7 100644 --- a/.opencode/node_modules/effect/dist/Predicate.d.ts +++ b/.opencode/node_modules/effect/dist/Predicate.d.ts @@ -3,15 +3,16 @@ import type { TupleOf, TupleOfAtLeast } from "./Types.ts"; /** * A function that decides whether a value of type `A` satisfies a condition. * - * When to use: - * - You want a reusable boolean check for `A`. - * - You plan to combine checks with {@link and}/{@link or}. - * - You want a simple filter predicate for arrays or iterables. + * **When to use** * - * Behavior: - * - Pure function; does not mutate input. - * - Returns `true` or `false`; never throws by itself. - * - Does not narrow types unless you use {@link Refinement}. + * Use when you want a reusable boolean check for `A`, especially when you plan + * to combine checks with {@link and}/{@link or} or pass a predicate to arrays + * and iterables. + * + * **Details** + * + * A predicate returns `true` or `false` and never throws by itself. It does not + * narrow types unless you use `Refinement`. * * **Example** (Define a predicate) * @@ -23,8 +24,9 @@ import type { TupleOf, TupleOfAtLeast } from "./Types.ts"; * console.log(isPositive(1)) * ``` * - * See also: {@link Refinement}, {@link mapInput}, {@link and} - * + * @see {@link Refinement} + * @see {@link mapInput} + * @see {@link and} * @category models * @since 2.0.0 */ @@ -34,13 +36,15 @@ export interface Predicate { /** * Type-level lambda for higher-kinded usage of {@link Predicate}. * - * When to use: - * - You are defining APIs that abstract over predicates with HKTs. - * - You need a `TypeLambda` instance for predicate-based type classes. + * **When to use** + * + * Use when you are defining APIs that abstract over predicates with HKTs and + * need a `TypeLambda` instance for predicate-based type classes. + * + * **Details** * - * Behavior: - * - Type-only; no runtime value is created. - * - Does not affect emitted JavaScript. + * This is type-only, creates no runtime value, and does not affect emitted + * JavaScript. * * **Example** (Type-level usage) * @@ -51,8 +55,7 @@ export interface Predicate { * type TL = Predicate.PredicateTypeLambda * ``` * - * See also: {@link Predicate} - * + * @see {@link Predicate} * @category type lambdas * @since 2.0.0 */ @@ -62,15 +65,16 @@ export interface PredicateTypeLambda extends TypeLambda { /** * A predicate that also narrows the input type when it returns `true`. * - * When to use: - * - You want a runtime check that refines `A` to `B` for TypeScript. - * - You want to compose multiple type guards with {@link compose}. - * - You need to guard `unknown` values safely. + * **When to use** + * + * Use when you want a runtime check that refines `A` to `B` for TypeScript, + * especially when composing type guards with {@link compose} or safely + * checking `unknown` values. * - * Behavior: - * - Pure function; does not mutate input. - * - Returns a type predicate (`a is B`). - * - Use with `if`/`filter` to narrow types. + * **Details** + * + * A refinement returns a type predicate (`a is B`). Use it with `if` or + * `filter` to narrow types. * * **Example** (Narrow unknown) * @@ -85,8 +89,9 @@ export interface PredicateTypeLambda extends TypeLambda { * } * ``` * - * See also: {@link Predicate}, {@link compose}, {@link isString} - * + * @see {@link Predicate} + * @see {@link compose} + * @see {@link isString} * @category models * @since 2.0.0 */ @@ -96,13 +101,15 @@ export interface Refinement { /** * Type-level utilities for working with {@link Predicate} types. * - * When to use: - * - You need to extract input types from predicate signatures. - * - You want to write generic helpers over predicate types. + * **When to use** * - * Behavior: - * - Type-only; no runtime value is created. - * - The namespace is erased at runtime. + * Use when you need to extract input types from predicate signatures while + * writing generic helpers over predicate types. + * + * **Details** + * + * These utilities are type-only, create no runtime values, and the namespace is + * erased at runtime. * * **Example** (Extract predicate input) * @@ -113,22 +120,23 @@ export interface Refinement { * type Input = Predicate.Predicate.In * ``` * - * See also: {@link Predicate}, {@link Refinement} - * + * @see {@link Predicate} + * @see {@link Refinement} * @since 3.6.0 - * @category type-level */ export declare namespace Predicate { /** * Extracts the input type `A` from a `Predicate`. * - * When to use: - * - You want to infer the input type from a predicate type. - * - You are defining generic utilities over predicates. + * **When to use** + * + * Use when you want to infer the input type from a predicate type while + * defining generic utilities over predicates. * - * Behavior: - * - Type-only; no runtime value is created. - * - Resolves to `never` if the type does not match `Predicate`. + * **Details** + * + * This is type-only and creates no runtime value. It resolves to `never` if + * the type does not match `Predicate`. * * **Example** (Infer input) * @@ -139,20 +147,22 @@ export declare namespace Predicate { * type Input = Predicate.Predicate.In