{
  "id": "@typed/fx/RefTrie#modify",
  "canonicalId": "@typed/fx/RefTrie#modify",
  "symbol": {
    "id": "@typed/fx/RefTrie#modify",
    "packageName": "@typed/fx",
    "moduleName": "RefTrie",
    "exportName": "modify",
    "kind": "constant",
    "signatures": [
      "export declare const modify: {\n    <V>(key: string, f: (v: V) => V): <E, R>(ref: RefTrie<V, E, R>) => Effect.Effect<Trie.Trie<V>, E, R>;\n    <V, E, R>(ref: RefTrie<V, E, R>, key: string, f: (v: V) => V): Effect.Effect<Trie.Trie<V>, E, R>;\n};"
    ],
    "summary": "Modify the value at a key if it exists.",
    "sections": {
      "Why": "Keeps modify atomic with respect to competing RefSubject writes instead of splitting the read\nand replacement into separate effects.",
      "Ownership and lifetime": "Running modify performs one serialized trie transition and resolves with its committed value. It\nacquires no resource; failures and services remain those of the source ref."
    },
    "examples": [],
    "relations": [],
    "source": {
      "file": "packages/fx/src/RefSubject/RefTrie.ts",
      "line": 177
    },
    "since": "1.18.0",
    "category": "State updates"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/RefTrie#modify",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": "RefTrie",
    "consumerSpecifier": "@typed/fx/RefTrie",
    "exportName": "modify",
    "qualifiedName": "modify",
    "declarationKey": "declaration:5a791c16b9a5eb2970801a00",
    "family": "variable",
    "signatures": [
      "export declare const modify: {\n    <V>(key: string, f: (v: V) => V): <E, R>(ref: RefTrie<V, E, R>) => Effect.Effect<Trie.Trie<V>, E, R>;\n    <V, E, R>(ref: RefTrie<V, E, R>, key: string, f: (v: V) => V): Effect.Effect<Trie.Trie<V>, E, R>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/RefSubject/RefTrie.ts",
        "start": {
          "line": 177,
          "column": 14
        },
        "end": {
          "line": 185,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefTrie.ts",
        "start": {
          "line": 178,
          "column": 3
        },
        "end": {
          "line": 181,
          "column": 73
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefTrie.ts",
        "start": {
          "line": 182,
          "column": 3
        },
        "end": {
          "line": 182,
          "column": 100
        }
      }
    ],
    "aliases": [
      "@typed/fx#RefTrie.modify"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:5a791c16b9a5eb2970801a00",
    "name": "modify",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const modify: {\n    <V>(key: string, f: (v: V) => V): <E, R>(ref: RefTrie<V, E, R>) => Effect.Effect<Trie.Trie<V>, E, R>;\n    <V, E, R>(ref: RefTrie<V, E, R>, key: string, f: (v: V) => V): Effect.Effect<Trie.Trie<V>, E, R>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/RefSubject/RefTrie.ts",
            "start": {
              "line": 177,
              "column": 14
            },
            "end": {
              "line": 185,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<V>(key: string, f: (v: V) => V): <E, R>(ref: RefTrie<V, E, R>) => Effect.Effect<Trie.Trie<V>, E, R>;",
          "<V, E, R>(ref: RefTrie<V, E, R>, key: string, f: (v: V) => V): Effect.Effect<Trie.Trie<V>, E, R>;"
        ],
        "typeParameters": [
          "V",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/RefSubject/RefTrie.ts",
            "start": {
              "line": 178,
              "column": 3
            },
            "end": {
              "line": 181,
              "column": 73
            }
          },
          {
            "file": "packages/fx/src/RefSubject/RefTrie.ts",
            "start": {
              "line": 182,
              "column": 3
            },
            "end": {
              "line": 182,
              "column": 100
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const modify: {\n    <V>(key: string, f: (v: V) => V): <E, R>(ref: RefTrie<V, E, R>) => Effect.Effect<Trie.Trie<V>, E, R>;\n    <V, E, R>(ref: RefTrie<V, E, R>, key: string, f: (v: V) => V): Effect.Effect<Trie.Trie<V>, E, R>;\n};"
    ],
    "typeParameters": [
      "V",
      "E",
      "R"
    ],
    "summary": "Modify the value at a key if it exists.",
    "sections": {
      "Why": "Keeps modify atomic with respect to competing RefSubject writes instead of splitting the read\nand replacement into separate effects.",
      "Ownership and lifetime": "Running modify performs one serialized trie transition and resolves with its committed value. It\nacquires no resource; failures and services remain those of the source ref."
    },
    "examples": [],
    "sourceSpans": [
      {
        "file": "packages/fx/src/RefSubject/RefTrie.ts",
        "start": {
          "line": 177,
          "column": 14
        },
        "end": {
          "line": 185,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefTrie.ts",
        "start": {
          "line": 178,
          "column": 3
        },
        "end": {
          "line": 181,
          "column": 73
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefTrie.ts",
        "start": {
          "line": 182,
          "column": 3
        },
        "end": {
          "line": 182,
          "column": 100
        }
      }
    ],
    "since": "1.18.0",
    "category": "State updates"
  }
}
