{
  "id": "@typed/fx#Fx.drain",
  "canonicalId": "@typed/fx/Fx#drain",
  "symbol": {
    "id": "@typed/fx#Fx.drain",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Fx.drain",
    "kind": "constant",
    "signatures": [
      "export declare const drain: <A, E, R>(fx: Fx<A, E, R>) => Effect<void, E, R>;"
    ],
    "summary": "Runs an `Fx` stream to completion, discarding all values.\nUseful when the side effects of the stream are all that matter.",
    "sections": {
      "Why": "Some producers perform all useful work in acquisition, effects, or finalization and\nneed execution without retaining their emitted values.",
      "Ownership and lifetime": "Running the Effect owns one source subscription until completion, failure, or\ninterruption. It allocates no collection and adds no per-value effect. Source\nfailures and services remain visible."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { drain, fromIterable } from \"@typed/fx/Fx\"\n\nconst program = drain(fromIterable([1, 2, 3]))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/run/observe.ts",
      "line": 121
    },
    "since": "1.0.0",
    "category": "Running effects"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Fx.drain",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Fx",
    "qualifiedName": "Fx.drain",
    "declarationKey": "declaration:64f8cfd4ca42bfdafb816599",
    "family": "variable",
    "signatures": [
      "export declare const drain: <A, E, R>(fx: Fx<A, E, R>) => Effect<void, E, R>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/run/observe.ts",
        "start": {
          "line": 121,
          "column": 14
        },
        "end": {
          "line": 121,
          "column": 96
        }
      }
    ],
    "aliases": [
      "@typed/fx/Fx#drain"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Fx",
    "static": false,
    "importedFrom": "declaration:64f8cfd4ca42bfdafb816599"
  },
  "declaration": {
    "declarationKey": "declaration:64f8cfd4ca42bfdafb816599",
    "name": "drain",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const drain: <A, E, R>(fx: Fx<A, E, R>) => Effect<void, E, R>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/run/observe.ts",
            "start": {
              "line": 121,
              "column": 14
            },
            "end": {
              "line": 121,
              "column": 96
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const drain: <A, E, R>(fx: Fx<A, E, R>) => Effect<void, E, R>;"
    ],
    "typeParameters": [],
    "summary": "Runs an `Fx` stream to completion, discarding all values.\nUseful when the side effects of the stream are all that matter.",
    "sections": {
      "Why": "Some producers perform all useful work in acquisition, effects, or finalization and\nneed execution without retaining their emitted values.",
      "Ownership and lifetime": "Running the Effect owns one source subscription until completion, failure, or\ninterruption. It allocates no collection and adds no per-value effect. Source\nfailures and services remain visible."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { drain, fromIterable } from \"@typed/fx/Fx\"\n\nconst program = drain(fromIterable([1, 2, 3]))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/run/observe.ts",
        "start": {
          "line": 121,
          "column": 14
        },
        "end": {
          "line": 121,
          "column": 96
        }
      }
    ],
    "since": "1.0.0",
    "category": "Running effects"
  }
}
