{
  "id": "@typed/fx#Fx.runPromise",
  "canonicalId": "@typed/fx/Fx#runPromise",
  "symbol": {
    "id": "@typed/fx#Fx.runPromise",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Fx.runPromise",
    "kind": "constant",
    "signatures": [
      "export declare const runPromise: <A, E>(fx: Fx<A, E>, options?: RunOptions) => Promise<unknown>;"
    ],
    "summary": "Runs an `Fx` stream to completion and returns a Promise.\nRejects if the stream fails.",
    "sections": {
      "Why": "`runPromise` is the direct boundary for Promise-oriented hosts that treat stream\ncompletion as resolution and typed failure as rejection.",
      "Ownership and lifetime": "Calling it starts the source immediately on Effect's default runtime, so the `Fx`\ncannot require services. The root fiber owns the subscription until completion;\n`RunOptions` controls launch and cancellation. Values are discarded. Typed failures,\ndefects, and interruption reject according to Effect's `runPromise` semantics."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { fromIterable, runPromise } from \"@typed/fx/Fx\"\n\nconst completion = runPromise(fromIterable([1, 2, 3]))\nconst settled = completion.then(() => \"done\")"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/run/runPromise.ts",
      "line": 74
    },
    "since": "1.0.0",
    "category": "Running effects"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Fx.runPromise",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Fx",
    "qualifiedName": "Fx.runPromise",
    "declarationKey": "declaration:cd9299206a80edaccd19020f",
    "family": "variable",
    "signatures": [
      "export declare const runPromise: <A, E>(fx: Fx<A, E>, options?: RunOptions) => Promise<unknown>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/run/runPromise.ts",
        "start": {
          "line": 74,
          "column": 14
        },
        "end": {
          "line": 75,
          "column": 40
        }
      }
    ],
    "aliases": [
      "@typed/fx/Fx#runPromise"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Fx",
    "static": false,
    "importedFrom": "declaration:cd9299206a80edaccd19020f"
  },
  "declaration": {
    "declarationKey": "declaration:cd9299206a80edaccd19020f",
    "name": "runPromise",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const runPromise: <A, E>(fx: Fx<A, E>, options?: RunOptions) => Promise<unknown>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/run/runPromise.ts",
            "start": {
              "line": 74,
              "column": 14
            },
            "end": {
              "line": 75,
              "column": 40
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const runPromise: <A, E>(fx: Fx<A, E>, options?: RunOptions) => Promise<unknown>;"
    ],
    "typeParameters": [],
    "summary": "Runs an `Fx` stream to completion and returns a Promise.\nRejects if the stream fails.",
    "sections": {
      "Why": "`runPromise` is the direct boundary for Promise-oriented hosts that treat stream\ncompletion as resolution and typed failure as rejection.",
      "Ownership and lifetime": "Calling it starts the source immediately on Effect's default runtime, so the `Fx`\ncannot require services. The root fiber owns the subscription until completion;\n`RunOptions` controls launch and cancellation. Values are discarded. Typed failures,\ndefects, and interruption reject according to Effect's `runPromise` semantics."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { fromIterable, runPromise } from \"@typed/fx/Fx\"\n\nconst completion = runPromise(fromIterable([1, 2, 3]))\nconst settled = completion.then(() => \"done\")"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/run/runPromise.ts",
        "start": {
          "line": 74,
          "column": 14
        },
        "end": {
          "line": 75,
          "column": 40
        }
      }
    ],
    "since": "1.0.0",
    "category": "Running effects"
  }
}
