{
  "id": "@typed/fx#Fx.fail",
  "canonicalId": "@typed/fx/Fx#fail",
  "symbol": {
    "id": "@typed/fx#Fx.fail",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Fx.fail",
    "kind": "constant",
    "signatures": [
      "export declare const fail: <E>(error: E) => Fx<never, E, never>;"
    ],
    "summary": "Creates an Fx that immediately fails with the specified error.",
    "sections": {
      "Why": "`fail` introduces an expected domain error into the typed `E` channel without\nemitting a value.",
      "Ownership and lifetime": "Construction is inert. Each run delivers one typed failure cause to the sink and\nacquires no resources."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport { fail, first } from \"@typed/fx/Fx\"\n\nconst program = first(fail(\"offline\")).pipe(\n  Effect.catch((error) => Effect.succeed(`failed: ${error}`))\n)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/constructors/fail.ts",
      "line": 35
    },
    "since": "1.0.0",
    "category": "Failure sources"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Fx.fail",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Fx",
    "qualifiedName": "Fx.fail",
    "declarationKey": "declaration:be98e5848951a5f7596228c7",
    "family": "variable",
    "signatures": [
      "export declare const fail: <E>(error: E) => Fx<never, E, never>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/constructors/fail.ts",
        "start": {
          "line": 35,
          "column": 14
        },
        "end": {
          "line": 35,
          "column": 100
        }
      }
    ],
    "aliases": [
      "@typed/fx/Fx#fail"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Fx",
    "static": false,
    "importedFrom": "declaration:be98e5848951a5f7596228c7"
  },
  "declaration": {
    "declarationKey": "declaration:be98e5848951a5f7596228c7",
    "name": "fail",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const fail: <E>(error: E) => Fx<never, E, never>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/constructors/fail.ts",
            "start": {
              "line": 35,
              "column": 14
            },
            "end": {
              "line": 35,
              "column": 100
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const fail: <E>(error: E) => Fx<never, E, never>;"
    ],
    "typeParameters": [],
    "summary": "Creates an Fx that immediately fails with the specified error.",
    "sections": {
      "Why": "`fail` introduces an expected domain error into the typed `E` channel without\nemitting a value.",
      "Ownership and lifetime": "Construction is inert. Each run delivers one typed failure cause to the sink and\nacquires no resources."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport { fail, first } from \"@typed/fx/Fx\"\n\nconst program = first(fail(\"offline\")).pipe(\n  Effect.catch((error) => Effect.succeed(`failed: ${error}`))\n)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/constructors/fail.ts",
        "start": {
          "line": 35,
          "column": 14
        },
        "end": {
          "line": 35,
          "column": 100
        }
      }
    ],
    "since": "1.0.0",
    "category": "Failure sources"
  }
}
