{
  "id": "@typed/fx/Fx#concatMapEffect",
  "canonicalId": "@typed/fx/Fx#concatMapEffect",
  "symbol": {
    "id": "@typed/fx/Fx#concatMapEffect",
    "packageName": "@typed/fx",
    "moduleName": "Fx",
    "exportName": "concatMapEffect",
    "kind": "constant",
    "signatures": [
      "export declare const concatMapEffect: FlatMapEffectLike;"
    ],
    "summary": "Maps each element to an Effect and concatenates the results sequentially.",
    "sections": {
      "Why": "This is the Effect-producing form of {@link concatMap}. It makes serialized\ncommands explicit without requiring callers to wrap each Effect with\n`Fx.fromEffect`.",
      "Ordering and cardinality": "Each source value starts one Effect only after the previous Effect has\ncompleted. Each successful Effect emits exactly one value, so output order is\nsource order and there is no overlap or buffering of successful results.",
      "Ownership and lifetime": "Source failures and Effect failures remain typed; callback services are added\nto the output requirements. The returned Fx requires `Scope`, which owns the\nactive callback Effect and interrupts it when observation ends."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\nimport { Effect } from \"effect\"\n\nconst saved = Fx.concatMapEffect(Fx.fromIterable([\n  { id: \"first\", wait: \"20 millis\" as const },\n  { id: \"second\", wait: \"1 millis\" as const }\n]), ({ id, wait }) => Effect.as(Effect.sleep(wait), id))\n\nconst program = Effect.scoped(Fx.collectAll(saved))\nEffect.runPromise(program).then(console.log)\n// [\"first\", \"second\"]"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/concatMap.ts",
      "line": 100
    },
    "since": "1.0.0",
    "category": "Concurrent work"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Fx#concatMapEffect",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": "Fx",
    "consumerSpecifier": "@typed/fx/Fx",
    "exportName": "concatMapEffect",
    "qualifiedName": "concatMapEffect",
    "declarationKey": "declaration:9e53c4594779a59e4b3277d0",
    "family": "variable",
    "signatures": [
      "export declare const concatMapEffect: FlatMapEffectLike;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/concatMap.ts",
        "start": {
          "line": 100,
          "column": 14
        },
        "end": {
          "line": 106,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/fx#Fx.concatMapEffect"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:9e53c4594779a59e4b3277d0",
    "name": "concatMapEffect",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const concatMapEffect: FlatMapEffectLike;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/concatMap.ts",
            "start": {
              "line": 100,
              "column": 14
            },
            "end": {
              "line": 106,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const concatMapEffect: FlatMapEffectLike;"
    ],
    "typeParameters": [],
    "summary": "Maps each element to an Effect and concatenates the results sequentially.",
    "sections": {
      "Why": "This is the Effect-producing form of {@link concatMap}. It makes serialized\ncommands explicit without requiring callers to wrap each Effect with\n`Fx.fromEffect`.",
      "Ordering and cardinality": "Each source value starts one Effect only after the previous Effect has\ncompleted. Each successful Effect emits exactly one value, so output order is\nsource order and there is no overlap or buffering of successful results.",
      "Ownership and lifetime": "Source failures and Effect failures remain typed; callback services are added\nto the output requirements. The returned Fx requires `Scope`, which owns the\nactive callback Effect and interrupts it when observation ends."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\nimport { Effect } from \"effect\"\n\nconst saved = Fx.concatMapEffect(Fx.fromIterable([\n  { id: \"first\", wait: \"20 millis\" as const },\n  { id: \"second\", wait: \"1 millis\" as const }\n]), ({ id, wait }) => Effect.as(Effect.sleep(wait), id))\n\nconst program = Effect.scoped(Fx.collectAll(saved))\nEffect.runPromise(program).then(console.log)\n// [\"first\", \"second\"]"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/concatMap.ts",
        "start": {
          "line": 100,
          "column": 14
        },
        "end": {
          "line": 106,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Concurrent work"
  }
}
