{
  "id": "@typed/fx#Fx.exhaustMapEffect",
  "canonicalId": "@typed/fx/Fx#exhaustMapEffect",
  "symbol": {
    "id": "@typed/fx#Fx.exhaustMapEffect",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Fx.exhaustMapEffect",
    "kind": "constant",
    "signatures": [
      "export declare const exhaustMapEffect: FlatMapEffectLike;"
    ],
    "summary": "Maps each element of an Fx to an Effect, ignoring new elements until the current effect completes.",
    "sections": {
      "Why": "This Effect-producing form of {@link exhaustMap } prevents overlapping command\nEffects while deliberately applying no queue or latest-value replay policy.",
      "Admission and cardinality": "The first value while idle starts one Effect and emits its one successful\nresult. For values received while it runs, `f` is still evaluated to construct\nan Effect, but that Effect is not run or queued.",
      "Ownership and lifetime": "Source and callback Effect failures remain typed and callback services are\nadded to the output requirements. The active Effect is owned by the returned\nFx's required `Scope`; completion waits for it and interruption runs its\nfinalizers."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\nimport { Effect } from \"effect\"\n\nconst accepted = Fx.exhaustMapEffect(Fx.fromIterable([1, 2]), (id) =>\n  Effect.as(Effect.sleep(\"20 millis\"), `saved:${id}`)\n)\n\nEffect.runPromise(Effect.scoped(Fx.collectAll(accepted))).then(console.log)\n// [\"saved:1\"]: the second Effect is constructed but not admitted"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/exhaustMapEffect.ts",
      "line": 49
    },
    "since": "1.0.0",
    "category": "Concurrent work"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Fx.exhaustMapEffect",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Fx",
    "qualifiedName": "Fx.exhaustMapEffect",
    "declarationKey": "declaration:729018043338050d224c7842",
    "family": "variable",
    "signatures": [
      "export declare const exhaustMapEffect: FlatMapEffectLike;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/exhaustMapEffect.ts",
        "start": {
          "line": 49,
          "column": 14
        },
        "end": {
          "line": 55,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/fx/Fx#exhaustMapEffect"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Fx",
    "static": false,
    "importedFrom": "declaration:729018043338050d224c7842"
  },
  "declaration": {
    "declarationKey": "declaration:729018043338050d224c7842",
    "name": "exhaustMapEffect",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const exhaustMapEffect: FlatMapEffectLike;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/exhaustMapEffect.ts",
            "start": {
              "line": 49,
              "column": 14
            },
            "end": {
              "line": 55,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const exhaustMapEffect: FlatMapEffectLike;"
    ],
    "typeParameters": [],
    "summary": "Maps each element of an Fx to an Effect, ignoring new elements until the current effect completes.",
    "sections": {
      "Why": "This Effect-producing form of {@link exhaustMap } prevents overlapping command\nEffects while deliberately applying no queue or latest-value replay policy.",
      "Admission and cardinality": "The first value while idle starts one Effect and emits its one successful\nresult. For values received while it runs, `f` is still evaluated to construct\nan Effect, but that Effect is not run or queued.",
      "Ownership and lifetime": "Source and callback Effect failures remain typed and callback services are\nadded to the output requirements. The active Effect is owned by the returned\nFx's required `Scope`; completion waits for it and interruption runs its\nfinalizers."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\nimport { Effect } from \"effect\"\n\nconst accepted = Fx.exhaustMapEffect(Fx.fromIterable([1, 2]), (id) =>\n  Effect.as(Effect.sleep(\"20 millis\"), `saved:${id}`)\n)\n\nEffect.runPromise(Effect.scoped(Fx.collectAll(accepted))).then(console.log)\n// [\"saved:1\"]: the second Effect is constructed but not admitted"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/exhaustMapEffect.ts",
        "start": {
          "line": 49,
          "column": 14
        },
        "end": {
          "line": 55,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Concurrent work"
  }
}
