{
  "id": "@typed/guard#catchAll",
  "canonicalId": "@typed/guard#catchAll",
  "symbol": {
    "id": "@typed/guard#catchAll",
    "packageName": "@typed/guard",
    "moduleName": ".",
    "exportName": "catchAll",
    "kind": "constant",
    "signatures": [
      "export declare const catchAll: {\n    <E, O2, E2, R2>(f: (e: E) => Effect.Effect<O2, E2, R2>): <I, O, R>(guard: GuardInput<I, O, E, R>) => Guard<I, O | O2, E2, R | R2>;\n    <I, O, E, R, O2, E2, R2>(guard: GuardInput<I, O, E, R>, f: (e: E) => Effect.Effect<O2, E2, R2>): Guard<I, O | O2, E2, R | R2>;\n};"
    ],
    "summary": "Recovers typed failures and lifts the recovery result into `Some`.",
    "sections": {
      "Why": "Typed recovery leaves defects and interruption untouched and does not confuse successful `None` with failure. The exported `catch` name is an alias of this declaration.",
      "Ownership and lifetime": "Construction acquires no resources; recovery starts only for typed failure during the source invocation."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { catchAll } from \"@typed/guard\"\nimport type { Guard } from \"@typed/guard\"\nimport { Effect } from \"effect\"\nconst source: Guard<string, string, string> = (input) => input ? Effect.succeedSome(input) : Effect.fail(\"empty\")\nconst recovered = catchAll(source, (error) => Effect.succeed(error.length))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/guard/src/index.ts",
      "line": 666
    },
    "since": "1.0.0",
    "category": "Error recovery"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/guard#catchAll",
    "packageName": "@typed/guard",
    "packageVersion": "1.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/guard",
    "exportName": "catchAll",
    "qualifiedName": "catchAll",
    "declarationKey": "declaration:b3631c56d8064fa275e1fbe9",
    "family": "variable",
    "signatures": [
      "export declare const catchAll: {\n    <E, O2, E2, R2>(f: (e: E) => Effect.Effect<O2, E2, R2>): <I, O, R>(guard: GuardInput<I, O, E, R>) => Guard<I, O | O2, E2, R | R2>;\n    <I, O, E, R, O2, E2, R2>(guard: GuardInput<I, O, E, R>, f: (e: E) => Effect.Effect<O2, E2, R2>): Guard<I, O | O2, E2, R | R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 666,
          "column": 14
        },
        "end": {
          "line": 690,
          "column": 3
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 667,
          "column": 3
        },
        "end": {
          "line": 669,
          "column": 79
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 670,
          "column": 3
        },
        "end": {
          "line": 673,
          "column": 35
        }
      }
    ],
    "aliases": [
      "@typed/guard#catch"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:b3631c56d8064fa275e1fbe9",
    "name": "catchAll",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const catchAll: {\n    <E, O2, E2, R2>(f: (e: E) => Effect.Effect<O2, E2, R2>): <I, O, R>(guard: GuardInput<I, O, E, R>) => Guard<I, O | O2, E2, R | R2>;\n    <I, O, E, R, O2, E2, R2>(guard: GuardInput<I, O, E, R>, f: (e: E) => Effect.Effect<O2, E2, R2>): Guard<I, O | O2, E2, R | R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/guard/src/index.ts",
            "start": {
              "line": 666,
              "column": 14
            },
            "end": {
              "line": 690,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<E, O2, E2, R2>(f: (e: E) => Effect.Effect<O2, E2, R2>): <I, O, R>(guard: GuardInput<I, O, E, R>) => Guard<I, O | O2, E2, R | R2>;",
          "<I, O, E, R, O2, E2, R2>(guard: GuardInput<I, O, E, R>, f: (e: E) => Effect.Effect<O2, E2, R2>): Guard<I, O | O2, E2, R | R2>;"
        ],
        "typeParameters": [
          "E",
          "O2",
          "E2",
          "R2",
          "I",
          "O",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/guard/src/index.ts",
            "start": {
              "line": 667,
              "column": 3
            },
            "end": {
              "line": 669,
              "column": 79
            }
          },
          {
            "file": "packages/guard/src/index.ts",
            "start": {
              "line": 670,
              "column": 3
            },
            "end": {
              "line": 673,
              "column": 35
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const catchAll: {\n    <E, O2, E2, R2>(f: (e: E) => Effect.Effect<O2, E2, R2>): <I, O, R>(guard: GuardInput<I, O, E, R>) => Guard<I, O | O2, E2, R | R2>;\n    <I, O, E, R, O2, E2, R2>(guard: GuardInput<I, O, E, R>, f: (e: E) => Effect.Effect<O2, E2, R2>): Guard<I, O | O2, E2, R | R2>;\n};"
    ],
    "typeParameters": [
      "E",
      "O2",
      "E2",
      "R2",
      "I",
      "O",
      "R"
    ],
    "summary": "Recovers typed failures and lifts the recovery result into `Some`.",
    "sections": {
      "Why": "Typed recovery leaves defects and interruption untouched and does not confuse successful `None` with failure. The exported `catch` name is an alias of this declaration.",
      "Ownership and lifetime": "Construction acquires no resources; recovery starts only for typed failure during the source invocation."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { catchAll } from \"@typed/guard\"\nimport type { Guard } from \"@typed/guard\"\nimport { Effect } from \"effect\"\nconst source: Guard<string, string, string> = (input) => input ? Effect.succeedSome(input) : Effect.fail(\"empty\")\nconst recovered = catchAll(source, (error) => Effect.succeed(error.length))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 666,
          "column": 14
        },
        "end": {
          "line": 690,
          "column": 3
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 667,
          "column": 3
        },
        "end": {
          "line": 669,
          "column": 79
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 670,
          "column": 3
        },
        "end": {
          "line": 673,
          "column": 35
        }
      }
    ],
    "since": "1.0.0",
    "category": "Error recovery"
  }
}
