{
  "id": "@typed/fx#Fx.during",
  "canonicalId": "@typed/fx/Fx#during",
  "symbol": {
    "id": "@typed/fx#Fx.during",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Fx.during",
    "kind": "function",
    "signatures": [
      "export declare function during<A, E, R, Start extends Fx.Any, E2, R2>(events: Fx<A, E, R>, signals: Fx<Start, E2, R2>): Fx<A, E | E2 | Fx.Error<Start>, R | R2 | Fx.Services<Start> | Scope.Scope>;"
    ],
    "summary": "Forwards `events` only between a start signal and that signal's first stop event.",
    "sections": {
      "Why": "Push lifetimes are often controlled by other push lifetimes: a pointer move\nmatters between pointer-down and pointer-up, for example. `during` models\nthat gate without converting either side into polling state.",
      "Ownership and lifetime": "`events` and the outer `signals` Fx start concurrently in one child Scope.\nOnly the first outer value is used; that value must itself be an Fx, whose\nfirst value closes the gate. Event values before the start signal and after\nthe stop signal are discarded. Completion of `events` completes the result.\nA failure from events, signals, or the selected stop Fx terminates everything;\nclosing or interrupting the returned Fx interrupts all remaining fibers and\ncloses the private Scope."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { during } from \"@typed/fx/Fx\"\nimport { delay } from \"@typed/fx/Fx\"\nimport { periodic, succeed } from \"@typed/fx/Fx\"\n\nconst pointerMoves = periodic(\"16 millis\")\nconst pointerDown = succeed(delay(succeed(undefined), \"1 second\"))\nconst activeMoves = during(pointerMoves, pointerDown)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/during.ts",
      "line": 48
    },
    "since": "1.0.0",
    "category": "Time and rate"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Fx.during",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Fx",
    "qualifiedName": "Fx.during",
    "declarationKey": "declaration:ed22e394fdb38f3b1282755f",
    "family": "function",
    "signatures": [
      "export declare function during<A, E, R, Start extends Fx.Any, E2, R2>(events: Fx<A, E, R>, signals: Fx<Start, E2, R2>): Fx<A, E | E2 | Fx.Error<Start>, R | R2 | Fx.Services<Start> | Scope.Scope>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/during.ts",
        "start": {
          "line": 48,
          "column": 1
        },
        "end": {
          "line": 135,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/fx/Fx#during"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Fx",
    "static": false,
    "importedFrom": "declaration:ed22e394fdb38f3b1282755f"
  },
  "declaration": {
    "declarationKey": "declaration:ed22e394fdb38f3b1282755f",
    "name": "during",
    "family": "function",
    "facets": [
      {
        "family": "function",
        "syntaxKind": "FunctionDeclaration",
        "signatures": [
          "export declare function during<A, E, R, Start extends Fx.Any, E2, R2>(events: Fx<A, E, R>, signals: Fx<Start, E2, R2>): Fx<A, E | E2 | Fx.Error<Start>, R | R2 | Fx.Services<Start> | Scope.Scope>;"
        ],
        "typeParameters": [
          "A",
          "E",
          "R",
          "Start extends Fx.Any",
          "E2",
          "R2"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/during.ts",
            "start": {
              "line": 48,
              "column": 1
            },
            "end": {
              "line": 135,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare function during<A, E, R, Start extends Fx.Any, E2, R2>(events: Fx<A, E, R>, signals: Fx<Start, E2, R2>): Fx<A, E | E2 | Fx.Error<Start>, R | R2 | Fx.Services<Start> | Scope.Scope>;"
    ],
    "typeParameters": [
      "A",
      "E",
      "R",
      "Start extends Fx.Any",
      "E2",
      "R2"
    ],
    "summary": "Forwards `events` only between a start signal and that signal's first stop event.",
    "sections": {
      "Why": "Push lifetimes are often controlled by other push lifetimes: a pointer move\nmatters between pointer-down and pointer-up, for example. `during` models\nthat gate without converting either side into polling state.",
      "Ownership and lifetime": "`events` and the outer `signals` Fx start concurrently in one child Scope.\nOnly the first outer value is used; that value must itself be an Fx, whose\nfirst value closes the gate. Event values before the start signal and after\nthe stop signal are discarded. Completion of `events` completes the result.\nA failure from events, signals, or the selected stop Fx terminates everything;\nclosing or interrupting the returned Fx interrupts all remaining fibers and\ncloses the private Scope."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { during } from \"@typed/fx/Fx\"\nimport { delay } from \"@typed/fx/Fx\"\nimport { periodic, succeed } from \"@typed/fx/Fx\"\n\nconst pointerMoves = periodic(\"16 millis\")\nconst pointerDown = succeed(delay(succeed(undefined), \"1 second\"))\nconst activeMoves = during(pointerMoves, pointerDown)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/during.ts",
        "start": {
          "line": 48,
          "column": 1
        },
        "end": {
          "line": 135,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Time and rate"
  }
}
