{
  "id": "@typed/fx/Fx#throttle",
  "canonicalId": "@typed/fx/Fx#throttle",
  "symbol": {
    "id": "@typed/fx/Fx#throttle",
    "packageName": "@typed/fx",
    "moduleName": "Fx",
    "exportName": "throttle",
    "kind": "constant",
    "signatures": [
      "export declare const throttle: {\n    (duration: Duration.Input): <A, E, R>(fx: Fx<A, E, R>) => Fx<A, E, R | Scope.Scope>;\n    (options: ThrottleOptions): <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    <A, E, R>(fx: Fx<A, E, R>, options: ThrottleOptions): Fx<A, E, R | Scope.Scope>;\n};"
    ],
    "summary": "Limits emissions to configured leading and trailing edges of fixed windows.\n\nPass `{ duration, leading, trailing }` for trailing or both-edge behavior.\nA duration alone defaults to `{ leading: true, trailing: false }`.",
    "sections": {
      "Why": "Throttling bounds push frequency while allowing immediate feedback, a final\nsettled value, or both, without moving timing state outside the Fx graph.",
      "Ownership and lifetime": "The first value opens a window. Leading mode emits it immediately. Values\narriving while open replace one pending latest value; trailing mode emits\nthat value when the timer closes, except that both-edge mode does not repeat\nthe first value unless another arrived. Windows never overlap. Source errors\npropagate, source completion waits for the active window, and interruption\nstops the scoped timer and discards pending state."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { throttle } from \"@typed/fx/Fx\"\nimport { fromIterable } from \"@typed/fx/Fx\"\n\nconst bounded = throttle(fromIterable([1, 2, 3]), {\n  duration: \"250 millis\",\n  leading: true,\n  trailing: true\n})"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/throttle.ts",
      "line": 152
    },
    "since": "1.0.0",
    "category": "Time and rate"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Fx#throttle",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": "Fx",
    "consumerSpecifier": "@typed/fx/Fx",
    "exportName": "throttle",
    "qualifiedName": "throttle",
    "declarationKey": "declaration:6e850ab7d28ae7bd46df1001",
    "family": "variable",
    "signatures": [
      "export declare const throttle: {\n    (duration: Duration.Input): <A, E, R>(fx: Fx<A, E, R>) => Fx<A, E, R | Scope.Scope>;\n    (options: ThrottleOptions): <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    <A, E, R>(fx: Fx<A, E, R>, options: ThrottleOptions): Fx<A, E, R | Scope.Scope>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/throttle.ts",
        "start": {
          "line": 152,
          "column": 14
        },
        "end": {
          "line": 176,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/throttle.ts",
        "start": {
          "line": 153,
          "column": 3
        },
        "end": {
          "line": 153,
          "column": 87
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/throttle.ts",
        "start": {
          "line": 154,
          "column": 3
        },
        "end": {
          "line": 154,
          "column": 87
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/throttle.ts",
        "start": {
          "line": 155,
          "column": 3
        },
        "end": {
          "line": 155,
          "column": 83
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/throttle.ts",
        "start": {
          "line": 156,
          "column": 3
        },
        "end": {
          "line": 156,
          "column": 83
        }
      }
    ],
    "aliases": [
      "@typed/fx#Fx.throttle"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:6e850ab7d28ae7bd46df1001",
    "name": "throttle",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const throttle: {\n    (duration: Duration.Input): <A, E, R>(fx: Fx<A, E, R>) => Fx<A, E, R | Scope.Scope>;\n    (options: ThrottleOptions): <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    <A, E, R>(fx: Fx<A, E, R>, options: ThrottleOptions): Fx<A, E, R | Scope.Scope>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/throttle.ts",
            "start": {
              "line": 152,
              "column": 14
            },
            "end": {
              "line": 176,
              "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>;",
          "(options: ThrottleOptions): <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>;",
          "<A, E, R>(fx: Fx<A, E, R>, options: ThrottleOptions): Fx<A, E, R | Scope.Scope>;"
        ],
        "typeParameters": [
          "A",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/throttle.ts",
            "start": {
              "line": 153,
              "column": 3
            },
            "end": {
              "line": 153,
              "column": 87
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/throttle.ts",
            "start": {
              "line": 154,
              "column": 3
            },
            "end": {
              "line": 154,
              "column": 87
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/throttle.ts",
            "start": {
              "line": 155,
              "column": 3
            },
            "end": {
              "line": 155,
              "column": 83
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/throttle.ts",
            "start": {
              "line": 156,
              "column": 3
            },
            "end": {
              "line": 156,
              "column": 83
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const throttle: {\n    (duration: Duration.Input): <A, E, R>(fx: Fx<A, E, R>) => Fx<A, E, R | Scope.Scope>;\n    (options: ThrottleOptions): <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    <A, E, R>(fx: Fx<A, E, R>, options: ThrottleOptions): Fx<A, E, R | Scope.Scope>;\n};"
    ],
    "typeParameters": [
      "A",
      "E",
      "R"
    ],
    "summary": "Limits emissions to configured leading and trailing edges of fixed windows.\n\nPass `{ duration, leading, trailing }` for trailing or both-edge behavior.\nA duration alone defaults to `{ leading: true, trailing: false }`.",
    "sections": {
      "Why": "Throttling bounds push frequency while allowing immediate feedback, a final\nsettled value, or both, without moving timing state outside the Fx graph.",
      "Ownership and lifetime": "The first value opens a window. Leading mode emits it immediately. Values\narriving while open replace one pending latest value; trailing mode emits\nthat value when the timer closes, except that both-edge mode does not repeat\nthe first value unless another arrived. Windows never overlap. Source errors\npropagate, source completion waits for the active window, and interruption\nstops the scoped timer and discards pending state."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { throttle } from \"@typed/fx/Fx\"\nimport { fromIterable } from \"@typed/fx/Fx\"\n\nconst bounded = throttle(fromIterable([1, 2, 3]), {\n  duration: \"250 millis\",\n  leading: true,\n  trailing: true\n})"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/throttle.ts",
        "start": {
          "line": 152,
          "column": 14
        },
        "end": {
          "line": 176,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/throttle.ts",
        "start": {
          "line": 153,
          "column": 3
        },
        "end": {
          "line": 153,
          "column": 87
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/throttle.ts",
        "start": {
          "line": 154,
          "column": 3
        },
        "end": {
          "line": 154,
          "column": 87
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/throttle.ts",
        "start": {
          "line": 155,
          "column": 3
        },
        "end": {
          "line": 155,
          "column": 83
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/throttle.ts",
        "start": {
          "line": 156,
          "column": 3
        },
        "end": {
          "line": 156,
          "column": 83
        }
      }
    ],
    "since": "1.0.0",
    "category": "Time and rate"
  }
}
