{
  "id": "@typed/fx#Fx.skipWhileEffect",
  "canonicalId": "@typed/fx/Fx#skipWhileEffect",
  "symbol": {
    "id": "@typed/fx#Fx.skipWhileEffect",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Fx.skipWhileEffect",
    "kind": "constant",
    "signatures": [
      "export declare const skipWhileEffect: {\n    <A, E2, R2>(predicate: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(fx: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, E2, R2>(fx: Fx<A, E, R>, predicate: (a: A) => Effect.Effect<boolean, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "summary": "Skips elements from an Fx while an effectful predicate returns true.\nEmits from the first element for which the predicate effect succeeds with false (including that element) and all following elements.",
    "sections": {
      "Why": "`skipWhileEffect` performs Effectful prefix decisions. The gate opens at the first false result,\nbut the implementation eagerly constructs and runs `predicate(a)` before reading that gate, so\nthe predicate still runs for every later input even though those values are always forwarded.",
      "Ownership and lifetime": "The gate belongs to one run, while predicate invocation inherits the producer's ordering and\nconcurrency. Predicate failure is delivered even after the gate opened; services remain required\nand interruption cancels whichever callback Effects the producer attached to the run."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Ref } from \"effect\"\nimport { Fx } from \"@typed/fx\"\nconst program = Effect.gen(function* () {\n  const checks = yield* Ref.make(0)\n  const values = yield* Fx.collectAll(\n    Fx.fromIterable([2, 3]).pipe(\n      Fx.skipWhileEffect((n) => Ref.update(checks, (count) => count + 1).pipe(Effect.as(n < 2)))\n    )\n  )\n  return { values, checks: yield* Ref.get(checks) } // { values: [2, 3], checks: 2 }\n})"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/skipWhile.ts",
      "line": 89
    },
    "since": "1.0.0",
    "category": "Selecting values"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Fx.skipWhileEffect",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Fx",
    "qualifiedName": "Fx.skipWhileEffect",
    "declarationKey": "declaration:755fb70b0ae5a70b9fba4b83",
    "family": "variable",
    "signatures": [
      "export declare const skipWhileEffect: {\n    <A, E2, R2>(predicate: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(fx: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, E2, R2>(fx: Fx<A, E, R>, predicate: (a: A) => Effect.Effect<boolean, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/skipWhile.ts",
        "start": {
          "line": 89,
          "column": 14
        },
        "end": {
          "line": 123,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/skipWhile.ts",
        "start": {
          "line": 90,
          "column": 3
        },
        "end": {
          "line": 92,
          "column": 55
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/skipWhile.ts",
        "start": {
          "line": 93,
          "column": 3
        },
        "end": {
          "line": 96,
          "column": 28
        }
      }
    ],
    "aliases": [
      "@typed/fx/Fx#skipWhileEffect"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Fx",
    "static": false,
    "importedFrom": "declaration:755fb70b0ae5a70b9fba4b83"
  },
  "declaration": {
    "declarationKey": "declaration:755fb70b0ae5a70b9fba4b83",
    "name": "skipWhileEffect",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const skipWhileEffect: {\n    <A, E2, R2>(predicate: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(fx: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, E2, R2>(fx: Fx<A, E, R>, predicate: (a: A) => Effect.Effect<boolean, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/skipWhile.ts",
            "start": {
              "line": 89,
              "column": 14
            },
            "end": {
              "line": 123,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<A, E2, R2>(predicate: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(fx: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;",
          "<A, E, R, E2, R2>(fx: Fx<A, E, R>, predicate: (a: A) => Effect.Effect<boolean, E2, R2>): Fx<A, E | E2, R | R2>;"
        ],
        "typeParameters": [
          "A",
          "E2",
          "R2",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/skipWhile.ts",
            "start": {
              "line": 90,
              "column": 3
            },
            "end": {
              "line": 92,
              "column": 55
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/skipWhile.ts",
            "start": {
              "line": 93,
              "column": 3
            },
            "end": {
              "line": 96,
              "column": 28
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const skipWhileEffect: {\n    <A, E2, R2>(predicate: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(fx: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, E2, R2>(fx: Fx<A, E, R>, predicate: (a: A) => Effect.Effect<boolean, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "typeParameters": [
      "A",
      "E2",
      "R2",
      "E",
      "R"
    ],
    "summary": "Skips elements from an Fx while an effectful predicate returns true.\nEmits from the first element for which the predicate effect succeeds with false (including that element) and all following elements.",
    "sections": {
      "Why": "`skipWhileEffect` performs Effectful prefix decisions. The gate opens at the first false result,\nbut the implementation eagerly constructs and runs `predicate(a)` before reading that gate, so\nthe predicate still runs for every later input even though those values are always forwarded.",
      "Ownership and lifetime": "The gate belongs to one run, while predicate invocation inherits the producer's ordering and\nconcurrency. Predicate failure is delivered even after the gate opened; services remain required\nand interruption cancels whichever callback Effects the producer attached to the run."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Ref } from \"effect\"\nimport { Fx } from \"@typed/fx\"\nconst program = Effect.gen(function* () {\n  const checks = yield* Ref.make(0)\n  const values = yield* Fx.collectAll(\n    Fx.fromIterable([2, 3]).pipe(\n      Fx.skipWhileEffect((n) => Ref.update(checks, (count) => count + 1).pipe(Effect.as(n < 2)))\n    )\n  )\n  return { values, checks: yield* Ref.get(checks) } // { values: [2, 3], checks: 2 }\n})"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/skipWhile.ts",
        "start": {
          "line": 89,
          "column": 14
        },
        "end": {
          "line": 123,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/skipWhile.ts",
        "start": {
          "line": 90,
          "column": 3
        },
        "end": {
          "line": 92,
          "column": 55
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/skipWhile.ts",
        "start": {
          "line": 93,
          "column": 3
        },
        "end": {
          "line": 96,
          "column": 28
        }
      }
    ],
    "since": "1.0.0",
    "category": "Selecting values"
  }
}
