{
  "id": "@typed/fx/Sink#filterMapLoopCauseEffect",
  "canonicalId": "@typed/fx/Sink#filterMapLoopCauseEffect",
  "symbol": {
    "id": "@typed/fx/Sink#filterMapLoopCauseEffect",
    "packageName": "@typed/fx",
    "moduleName": "Sink",
    "exportName": "filterMapLoopCauseEffect",
    "kind": "function",
    "signatures": [
      "export declare function filterMapLoopCauseEffect<A, E, R, B, E2, R2, C>(sink: Sink<A, E2 | C, R>, seed: B, f: (acc: B, a: Cause.Cause<E>) => Effect.Effect<readonly [\n    Option.Option<Cause.Cause<C>>,\n    B\n], E2, R2>): Sink<A, E, R | R2>;"
    ],
    "summary": "Threads state through an effectful failure transition and optionally forwards a cause.",
    "sections": {
      "Why": "It supports service-backed, stateful failure suppression or translation at the consumer boundary.",
      "Ownership and lifetime": "Callback invocation constructs a transition Effect from the seed visible at that moment. The\nadapter does not serialize those Effects: overlapping failures can read the same seed, and\nsuccessful transitions commit in completion order. `Some` forwards one cause, `None` suppresses\nit, and transition failure is forwarded without committing. Successes pass through. The sink\ninstance retains its seed across producer runs; construct a new one to reset it."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Cause, Effect, Option } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst target: Sink.Sink<number, string> = Sink.make(Effect.logError, Effect.log)\nconst sink = Sink.filterMapLoopCauseEffect(target, false, (seen, cause: Cause.Cause<string>) =>\n  Effect.succeed([seen ? Option.none() : Option.some(cause), true] as const))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Sink/combinators.ts",
      "line": 1029
    },
    "since": "1.0.0",
    "category": "Stateful failure handling"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Sink#filterMapLoopCauseEffect",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": "Sink",
    "consumerSpecifier": "@typed/fx/Sink",
    "exportName": "filterMapLoopCauseEffect",
    "qualifiedName": "filterMapLoopCauseEffect",
    "declarationKey": "declaration:530de470c3b8dff8a22b5e1f",
    "family": "function",
    "signatures": [
      "export declare function filterMapLoopCauseEffect<A, E, R, B, E2, R2, C>(sink: Sink<A, E2 | C, R>, seed: B, f: (acc: B, a: Cause.Cause<E>) => Effect.Effect<readonly [\n    Option.Option<Cause.Cause<C>>,\n    B\n], E2, R2>): Sink<A, E, R | R2>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1029,
          "column": 1
        },
        "end": {
          "line": 1038,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/fx#Sink.filterMapLoopCauseEffect"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:530de470c3b8dff8a22b5e1f",
    "name": "filterMapLoopCauseEffect",
    "family": "function",
    "facets": [
      {
        "family": "function",
        "syntaxKind": "FunctionDeclaration",
        "signatures": [
          "export declare function filterMapLoopCauseEffect<A, E, R, B, E2, R2, C>(sink: Sink<A, E2 | C, R>, seed: B, f: (acc: B, a: Cause.Cause<E>) => Effect.Effect<readonly [\n    Option.Option<Cause.Cause<C>>,\n    B\n], E2, R2>): Sink<A, E, R | R2>;"
        ],
        "typeParameters": [
          "A",
          "E",
          "R",
          "B",
          "E2",
          "R2",
          "C"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 1029,
              "column": 1
            },
            "end": {
              "line": 1038,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare function filterMapLoopCauseEffect<A, E, R, B, E2, R2, C>(sink: Sink<A, E2 | C, R>, seed: B, f: (acc: B, a: Cause.Cause<E>) => Effect.Effect<readonly [\n    Option.Option<Cause.Cause<C>>,\n    B\n], E2, R2>): Sink<A, E, R | R2>;"
    ],
    "typeParameters": [
      "A",
      "E",
      "R",
      "B",
      "E2",
      "R2",
      "C"
    ],
    "summary": "Threads state through an effectful failure transition and optionally forwards a cause.",
    "sections": {
      "Why": "It supports service-backed, stateful failure suppression or translation at the consumer boundary.",
      "Ownership and lifetime": "Callback invocation constructs a transition Effect from the seed visible at that moment. The\nadapter does not serialize those Effects: overlapping failures can read the same seed, and\nsuccessful transitions commit in completion order. `Some` forwards one cause, `None` suppresses\nit, and transition failure is forwarded without committing. Successes pass through. The sink\ninstance retains its seed across producer runs; construct a new one to reset it."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Cause, Effect, Option } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst target: Sink.Sink<number, string> = Sink.make(Effect.logError, Effect.log)\nconst sink = Sink.filterMapLoopCauseEffect(target, false, (seen, cause: Cause.Cause<string>) =>\n  Effect.succeed([seen ? Option.none() : Option.some(cause), true] as const))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1029,
          "column": 1
        },
        "end": {
          "line": 1038,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Stateful failure handling"
  }
}
