{
  "id": "@typed/fx#Fx.exhaustLatestMapEffect",
  "canonicalId": "@typed/fx/Fx#exhaustLatestMapEffect",
  "symbol": {
    "id": "@typed/fx#Fx.exhaustLatestMapEffect",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Fx.exhaustLatestMapEffect",
    "kind": "constant",
    "signatures": [
      "export declare const exhaustLatestMapEffect: FlatMapEffectLike;"
    ],
    "summary": "Maps each element to an Effect, running one now and retaining only the latest waiting value.",
    "sections": {
      "Why": "This is the Effect-producing form of {@link exhaustLatestMap }: it serializes\nEffects while bounding pending work to one replaceable latest request.",
      "Admission, buffering, and cardinality": "The first value while idle starts one Effect. While it runs, each callback is\nevaluated and the constructed Effect replaces the single pending Effect. Each\nadmitted Effect emits exactly one successful result; superseded pending\nEffects never run and emit nothing.",
      "Ownership and lifetime": "Source and admitted Effect failures remain typed, as do callback service\nrequirements. The required `Scope` owns the active Effect; source completion\ndrains the final pending value, while interruption discards pending work and\nruns active finalizers."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\nimport { Effect } from \"effect\"\n\nconst refreshes = Fx.mergeAll(\n  Fx.at(\"v1\", \"0 millis\"),\n  Fx.at(\"v2\", \"5 millis\"),\n  Fx.at(\"v3\", \"10 millis\")\n)\nconst indexed = Fx.exhaustLatestMapEffect(refreshes, (version) =>\n  Effect.as(Effect.sleep(\"20 millis\"), `indexed:${version}`)\n)\n\nEffect.runPromise(Effect.scoped(Fx.collectAll(indexed))).then(console.log)\n// [\"indexed:v1\", \"indexed:v3\"]"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/exhaustLatestMapEffect.ts",
      "line": 55
    },
    "since": "1.0.0",
    "category": "Concurrent work"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Fx.exhaustLatestMapEffect",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Fx",
    "qualifiedName": "Fx.exhaustLatestMapEffect",
    "declarationKey": "declaration:9da863c2226be61b105b8701",
    "family": "variable",
    "signatures": [
      "export declare const exhaustLatestMapEffect: FlatMapEffectLike;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/exhaustLatestMapEffect.ts",
        "start": {
          "line": 55,
          "column": 14
        },
        "end": {
          "line": 61,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/fx/Fx#exhaustLatestMapEffect"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Fx",
    "static": false,
    "importedFrom": "declaration:9da863c2226be61b105b8701"
  },
  "declaration": {
    "declarationKey": "declaration:9da863c2226be61b105b8701",
    "name": "exhaustLatestMapEffect",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const exhaustLatestMapEffect: FlatMapEffectLike;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/exhaustLatestMapEffect.ts",
            "start": {
              "line": 55,
              "column": 14
            },
            "end": {
              "line": 61,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const exhaustLatestMapEffect: FlatMapEffectLike;"
    ],
    "typeParameters": [],
    "summary": "Maps each element to an Effect, running one now and retaining only the latest waiting value.",
    "sections": {
      "Why": "This is the Effect-producing form of {@link exhaustLatestMap }: it serializes\nEffects while bounding pending work to one replaceable latest request.",
      "Admission, buffering, and cardinality": "The first value while idle starts one Effect. While it runs, each callback is\nevaluated and the constructed Effect replaces the single pending Effect. Each\nadmitted Effect emits exactly one successful result; superseded pending\nEffects never run and emit nothing.",
      "Ownership and lifetime": "Source and admitted Effect failures remain typed, as do callback service\nrequirements. The required `Scope` owns the active Effect; source completion\ndrains the final pending value, while interruption discards pending work and\nruns active finalizers."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\nimport { Effect } from \"effect\"\n\nconst refreshes = Fx.mergeAll(\n  Fx.at(\"v1\", \"0 millis\"),\n  Fx.at(\"v2\", \"5 millis\"),\n  Fx.at(\"v3\", \"10 millis\")\n)\nconst indexed = Fx.exhaustLatestMapEffect(refreshes, (version) =>\n  Effect.as(Effect.sleep(\"20 millis\"), `indexed:${version}`)\n)\n\nEffect.runPromise(Effect.scoped(Fx.collectAll(indexed))).then(console.log)\n// [\"indexed:v1\", \"indexed:v3\"]"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/exhaustLatestMapEffect.ts",
        "start": {
          "line": 55,
          "column": 14
        },
        "end": {
          "line": 61,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Concurrent work"
  }
}
