{
  "id": "@typed/fx#Fx.debounce",
  "canonicalId": "@typed/fx/Fx#debounce",
  "symbol": {
    "id": "@typed/fx#Fx.debounce",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Fx.debounce",
    "kind": "constant",
    "signatures": [
      "export declare const debounce: {\n    (duration: Duration.Input): <A, E, R>(fx: Fx<A, E, R>) => Fx<A, E, R | Scope.Scope>;\n    <A, E, R>(fx: Fx<A, E, R>, duration: Duration.Input): Fx<A, E, R | Scope.Scope>;\n};"
    ],
    "summary": "Emits a value only after no newer source value arrives for `duration`.",
    "sections": {
      "Why": "Bursty producers such as text input should often trigger work only after\nthey settle. Debouncing represents that quiet-period rule in the Fx graph.",
      "Ownership and lifetime": "Each value starts a scoped sleep. A newer value interrupts the previous\nsleep and replaces its pending value, so at most the latest value is emitted\nafter a quiet period. Source errors terminate the result. Interruption stops\nboth source and pending timer; `Scope` owns those switching lifetimes."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { debounce } from \"@typed/fx/Fx\"\nimport { fromIterable } from \"@typed/fx/Fx\"\n\nconst settled = debounce(fromIterable([\"t\", \"ty\", \"typed\"]), \"250 millis\")"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/debounce.ts",
      "line": 34
    },
    "since": "1.0.0",
    "category": "Time and rate"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Fx.debounce",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Fx",
    "qualifiedName": "Fx.debounce",
    "declarationKey": "declaration:7160ec3707514fe1a5088559",
    "family": "variable",
    "signatures": [
      "export declare const debounce: {\n    (duration: Duration.Input): <A, E, R>(fx: Fx<A, E, R>) => Fx<A, E, R | Scope.Scope>;\n    <A, E, R>(fx: Fx<A, E, R>, duration: Duration.Input): Fx<A, E, R | Scope.Scope>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/debounce.ts",
        "start": {
          "line": 34,
          "column": 14
        },
        "end": {
          "line": 46,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/debounce.ts",
        "start": {
          "line": 35,
          "column": 3
        },
        "end": {
          "line": 35,
          "column": 87
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/debounce.ts",
        "start": {
          "line": 36,
          "column": 3
        },
        "end": {
          "line": 36,
          "column": 83
        }
      }
    ],
    "aliases": [
      "@typed/fx/Fx#debounce"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Fx",
    "static": false,
    "importedFrom": "declaration:7160ec3707514fe1a5088559"
  },
  "declaration": {
    "declarationKey": "declaration:7160ec3707514fe1a5088559",
    "name": "debounce",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const debounce: {\n    (duration: Duration.Input): <A, E, R>(fx: Fx<A, E, R>) => Fx<A, E, R | Scope.Scope>;\n    <A, E, R>(fx: Fx<A, E, R>, duration: Duration.Input): Fx<A, E, R | Scope.Scope>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/debounce.ts",
            "start": {
              "line": 34,
              "column": 14
            },
            "end": {
              "line": 46,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "(duration: Duration.Input): <A, E, R>(fx: Fx<A, E, R>) => Fx<A, E, R | Scope.Scope>;",
          "<A, E, R>(fx: Fx<A, E, R>, duration: Duration.Input): Fx<A, E, R | Scope.Scope>;"
        ],
        "typeParameters": [
          "A",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/debounce.ts",
            "start": {
              "line": 35,
              "column": 3
            },
            "end": {
              "line": 35,
              "column": 87
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/debounce.ts",
            "start": {
              "line": 36,
              "column": 3
            },
            "end": {
              "line": 36,
              "column": 83
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const debounce: {\n    (duration: Duration.Input): <A, E, R>(fx: Fx<A, E, R>) => Fx<A, E, R | Scope.Scope>;\n    <A, E, R>(fx: Fx<A, E, R>, duration: Duration.Input): Fx<A, E, R | Scope.Scope>;\n};"
    ],
    "typeParameters": [
      "A",
      "E",
      "R"
    ],
    "summary": "Emits a value only after no newer source value arrives for `duration`.",
    "sections": {
      "Why": "Bursty producers such as text input should often trigger work only after\nthey settle. Debouncing represents that quiet-period rule in the Fx graph.",
      "Ownership and lifetime": "Each value starts a scoped sleep. A newer value interrupts the previous\nsleep and replaces its pending value, so at most the latest value is emitted\nafter a quiet period. Source errors terminate the result. Interruption stops\nboth source and pending timer; `Scope` owns those switching lifetimes."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { debounce } from \"@typed/fx/Fx\"\nimport { fromIterable } from \"@typed/fx/Fx\"\n\nconst settled = debounce(fromIterable([\"t\", \"ty\", \"typed\"]), \"250 millis\")"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/debounce.ts",
        "start": {
          "line": 34,
          "column": 14
        },
        "end": {
          "line": 46,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/debounce.ts",
        "start": {
          "line": 35,
          "column": 3
        },
        "end": {
          "line": 35,
          "column": 87
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/debounce.ts",
        "start": {
          "line": 36,
          "column": 3
        },
        "end": {
          "line": 36,
          "column": 83
        }
      }
    ],
    "since": "1.0.0",
    "category": "Time and rate"
  }
}
