{
  "id": "@typed/fx/Fx#KeyedOptions",
  "canonicalId": "@typed/fx/Fx#KeyedOptions",
  "symbol": {
    "id": "@typed/fx/Fx#KeyedOptions",
    "packageName": "@typed/fx",
    "moduleName": "Fx",
    "exportName": "KeyedOptions",
    "kind": "interface",
    "signatures": [
      "export interface KeyedOptions<A, B, C, E2, R2> {\n    readonly getKey: (a: A) => B;\n    readonly onValue: (ref: RefSubject.RefSubject<A>, key: B) => Fx<C, E2, R2 | Scope.Scope>;\n    readonly debounce?: Duration.Input;\n}"
    ],
    "summary": "Configuration options for the `keyed` combinator.",
    "sections": {
      "Why": "The options put identity, per-identity work, and output coalescing beside one\nanother so callers can choose collection behavior without exposing the keyed\nimplementation's maps, child Scopes, or diff patches.",
      "Ownership and lifetime": "The options object acquires nothing. {@link keyed} invokes `onValue` once per\nadmitted key. Its run fiber belongs to the outer parent Scope; the per-key\nchild Scope is supplied to that Fx for resources it explicitly registers.",
      "Property: debounce": "Delays and coalesces array emissions after keyed state changes.",
      "Property: debounce: Why": "Several child updates can describe one logical collection change. Debounce\nreplaces the pending array emission so consumers receive the latest coherent\nready prefix rather than every intermediate scheduling step.",
      "Property: debounce: Ownership and lifetime": "The delay fiber belongs to the outer keyed `Scope`. A later change interrupts\nand replaces it; outer completion waits for the final scheduled emission and\ninterruption discards it. Omission uses a one-millisecond delay.",
      "Property: getKey": "Extracts the stable identity of an element.",
      "Property: getKey: Why": "A key lets value updates and moves reuse one existing child rather than\ninterpreting array position as identity.",
      "Property: getKey: Ownership and lifetime": "The function is called synchronously while processing a source array. It\nacquires no resource; keys are retained only while their entries are live.",
      "Property: onValue": "Creates the Fx for one key from its live value RefSubject and stable key.",
      "Property: onValue: Why": "Passing a `RefSubject` separates identity from the current value: later\nvalues with the same key update the existing child instead of recreating it.",
      "Property: onValue: Ownership and lifetime": "`keyed` calls this once when a key is added and forks its run fiber in the\nouter parent Scope. It provides a per-key child `Scope` to the run, so\nresources registered through that service close when the key is removed.\nClosing the child Scope does not by itself interrupt an arbitrary returned\nFx run fiber; resourceful work must honor the supplied Scope. Failures and\nservices remain on the returned `keyed` Fx."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\n\ninterface Row { readonly id: string; readonly value: number }\n\nconst options: Fx.KeyedOptions<Row, string, number, never, never> = {\n  getKey: (row) => row.id,\n  onValue: (row) => Fx.map(row, ({ value }) => value)\n}"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/keyed.ts",
      "line": 53
    },
    "since": "1.0.0",
    "category": "Operator options"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Fx#KeyedOptions",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": "Fx",
    "consumerSpecifier": "@typed/fx/Fx",
    "exportName": "KeyedOptions",
    "qualifiedName": "KeyedOptions",
    "declarationKey": "declaration:5a87bae72b5584aa9cf5317a",
    "family": "interface",
    "signatures": [
      "export interface KeyedOptions<A, B, C, E2, R2> {\n    readonly getKey: (a: A) => B;\n    readonly onValue: (ref: RefSubject.RefSubject<A>, key: B) => Fx<C, E2, R2 | Scope.Scope>;\n    readonly debounce?: Duration.Input;\n}"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/keyed.ts",
        "start": {
          "line": 53,
          "column": 1
        },
        "end": {
          "line": 114,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/keyed.ts",
        "start": {
          "line": 113,
          "column": 3
        },
        "end": {
          "line": 113,
          "column": 38
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/keyed.ts",
        "start": {
          "line": 71,
          "column": 3
        },
        "end": {
          "line": 71,
          "column": 32
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/keyed.ts",
        "start": {
          "line": 93,
          "column": 3
        },
        "end": {
          "line": 93,
          "column": 92
        }
      }
    ],
    "aliases": [
      "@typed/fx#Fx.KeyedOptions"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:5a87bae72b5584aa9cf5317a",
    "name": "KeyedOptions",
    "family": "interface",
    "facets": [
      {
        "family": "interface",
        "syntaxKind": "InterfaceDeclaration",
        "signatures": [
          "export interface KeyedOptions<A, B, C, E2, R2> {\n    readonly getKey: (a: A) => B;\n    readonly onValue: (ref: RefSubject.RefSubject<A>, key: B) => Fx<C, E2, R2 | Scope.Scope>;\n    readonly debounce?: Duration.Input;\n}"
        ],
        "typeParameters": [
          "A",
          "B",
          "C",
          "E2",
          "R2"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/keyed.ts",
            "start": {
              "line": 53,
              "column": 1
            },
            "end": {
              "line": 114,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly debounce?: Duration.Input;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/keyed.ts",
            "start": {
              "line": 113,
              "column": 3
            },
            "end": {
              "line": 113,
              "column": 38
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": true
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly getKey: (a: A) => B;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/keyed.ts",
            "start": {
              "line": 71,
              "column": 3
            },
            "end": {
              "line": 71,
              "column": 32
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly onValue: (ref: RefSubject.RefSubject<A>, key: B) => Fx<C, E2, R2 | Scope.Scope>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/keyed.ts",
            "start": {
              "line": 93,
              "column": 3
            },
            "end": {
              "line": 93,
              "column": 92
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      }
    ],
    "signatures": [
      "export interface KeyedOptions<A, B, C, E2, R2> {\n    readonly getKey: (a: A) => B;\n    readonly onValue: (ref: RefSubject.RefSubject<A>, key: B) => Fx<C, E2, R2 | Scope.Scope>;\n    readonly debounce?: Duration.Input;\n}"
    ],
    "typeParameters": [
      "A",
      "B",
      "C",
      "E2",
      "R2"
    ],
    "summary": "Configuration options for the `keyed` combinator.",
    "sections": {
      "Why": "The options put identity, per-identity work, and output coalescing beside one\nanother so callers can choose collection behavior without exposing the keyed\nimplementation's maps, child Scopes, or diff patches.",
      "Ownership and lifetime": "The options object acquires nothing. {@link keyed} invokes `onValue` once per\nadmitted key. Its run fiber belongs to the outer parent Scope; the per-key\nchild Scope is supplied to that Fx for resources it explicitly registers.",
      "Property: debounce": "Delays and coalesces array emissions after keyed state changes.",
      "Property: debounce: Why": "Several child updates can describe one logical collection change. Debounce\nreplaces the pending array emission so consumers receive the latest coherent\nready prefix rather than every intermediate scheduling step.",
      "Property: debounce: Ownership and lifetime": "The delay fiber belongs to the outer keyed `Scope`. A later change interrupts\nand replaces it; outer completion waits for the final scheduled emission and\ninterruption discards it. Omission uses a one-millisecond delay.",
      "Property: getKey": "Extracts the stable identity of an element.",
      "Property: getKey: Why": "A key lets value updates and moves reuse one existing child rather than\ninterpreting array position as identity.",
      "Property: getKey: Ownership and lifetime": "The function is called synchronously while processing a source array. It\nacquires no resource; keys are retained only while their entries are live.",
      "Property: onValue": "Creates the Fx for one key from its live value RefSubject and stable key.",
      "Property: onValue: Why": "Passing a `RefSubject` separates identity from the current value: later\nvalues with the same key update the existing child instead of recreating it.",
      "Property: onValue: Ownership and lifetime": "`keyed` calls this once when a key is added and forks its run fiber in the\nouter parent Scope. It provides a per-key child `Scope` to the run, so\nresources registered through that service close when the key is removed.\nClosing the child Scope does not by itself interrupt an arbitrary returned\nFx run fiber; resourceful work must honor the supplied Scope. Failures and\nservices remain on the returned `keyed` Fx."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\n\ninterface Row { readonly id: string; readonly value: number }\n\nconst options: Fx.KeyedOptions<Row, string, number, never, never> = {\n  getKey: (row) => row.id,\n  onValue: (row) => Fx.map(row, ({ value }) => value)\n}"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/keyed.ts",
        "start": {
          "line": 53,
          "column": 1
        },
        "end": {
          "line": 114,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/keyed.ts",
        "start": {
          "line": 113,
          "column": 3
        },
        "end": {
          "line": 113,
          "column": 38
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/keyed.ts",
        "start": {
          "line": 71,
          "column": 3
        },
        "end": {
          "line": 71,
          "column": 32
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/keyed.ts",
        "start": {
          "line": 93,
          "column": 3
        },
        "end": {
          "line": 93,
          "column": 92
        }
      }
    ],
    "since": "1.0.0",
    "category": "Operator options"
  }
}
