{
  "id": "@typed/fx#Fx.tap",
  "canonicalId": "@typed/fx/Fx#tap",
  "symbol": {
    "id": "@typed/fx#Fx.tap",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Fx.tap",
    "kind": "constant",
    "signatures": [
      "export declare const tap: {\n    <A, E2 = never, R2 = never>(f: (a: A) => void | Effect.Effect<unknown, E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, E2 = never, R2 = never>(self: Fx<A, E | E2, R>, f: (a: A) => void | Effect.Effect<unknown, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "summary": "Performs an effect for each element of the Fx, without changing the elements.",
    "sections": {
      "Why": "`tap` sequences an observation or side effect before forwarding each original value. It emits\nexactly once per successful callback, in source order; callback failure prevents that value.",
      "Ownership and lifetime": "Returned Effects run in the consumer path and are interrupted with it; a `void` callback is\ntreated as `Effect.void`. Callback failures and services remain visible in the result type."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport { Fx } from \"@typed/fx\"\nconst logged = Fx.fromIterable([1, 2]).pipe(Fx.tap((n) => Effect.log(n)))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/tapEffect.ts",
      "line": 31
    },
    "since": "1.0.0",
    "category": "Transforming values"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Fx.tap",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Fx",
    "qualifiedName": "Fx.tap",
    "declarationKey": "declaration:d700676f216dab889de89611",
    "family": "variable",
    "signatures": [
      "export declare const tap: {\n    <A, E2 = never, R2 = never>(f: (a: A) => void | Effect.Effect<unknown, E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, E2 = never, R2 = never>(self: Fx<A, E | E2, R>, f: (a: A) => void | Effect.Effect<unknown, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/tapEffect.ts",
        "start": {
          "line": 31,
          "column": 14
        },
        "end": {
          "line": 55,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/tapEffect.ts",
        "start": {
          "line": 32,
          "column": 3
        },
        "end": {
          "line": 34,
          "column": 62
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/tapEffect.ts",
        "start": {
          "line": 36,
          "column": 3
        },
        "end": {
          "line": 39,
          "column": 28
        }
      }
    ],
    "aliases": [
      "@typed/fx/Fx#tap"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Fx",
    "static": false,
    "importedFrom": "declaration:d700676f216dab889de89611"
  },
  "declaration": {
    "declarationKey": "declaration:d700676f216dab889de89611",
    "name": "tap",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const tap: {\n    <A, E2 = never, R2 = never>(f: (a: A) => void | Effect.Effect<unknown, E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, E2 = never, R2 = never>(self: Fx<A, E | E2, R>, f: (a: A) => void | Effect.Effect<unknown, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/tapEffect.ts",
            "start": {
              "line": 31,
              "column": 14
            },
            "end": {
              "line": 55,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<A, E2 = never, R2 = never>(f: (a: A) => void | Effect.Effect<unknown, E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, E | E2, R | R2>;",
          "<A, E, R, E2 = never, R2 = never>(self: Fx<A, E | E2, R>, f: (a: A) => void | Effect.Effect<unknown, E2, R2>): Fx<A, E | E2, R | R2>;"
        ],
        "typeParameters": [
          "A",
          "E2 = never",
          "R2 = never",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/tapEffect.ts",
            "start": {
              "line": 32,
              "column": 3
            },
            "end": {
              "line": 34,
              "column": 62
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/tapEffect.ts",
            "start": {
              "line": 36,
              "column": 3
            },
            "end": {
              "line": 39,
              "column": 28
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const tap: {\n    <A, E2 = never, R2 = never>(f: (a: A) => void | Effect.Effect<unknown, E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, E2 = never, R2 = never>(self: Fx<A, E | E2, R>, f: (a: A) => void | Effect.Effect<unknown, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "typeParameters": [
      "A",
      "E2 = never",
      "R2 = never",
      "E",
      "R"
    ],
    "summary": "Performs an effect for each element of the Fx, without changing the elements.",
    "sections": {
      "Why": "`tap` sequences an observation or side effect before forwarding each original value. It emits\nexactly once per successful callback, in source order; callback failure prevents that value.",
      "Ownership and lifetime": "Returned Effects run in the consumer path and are interrupted with it; a `void` callback is\ntreated as `Effect.void`. Callback failures and services remain visible in the result type."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport { Fx } from \"@typed/fx\"\nconst logged = Fx.fromIterable([1, 2]).pipe(Fx.tap((n) => Effect.log(n)))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/tapEffect.ts",
        "start": {
          "line": 31,
          "column": 14
        },
        "end": {
          "line": 55,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/tapEffect.ts",
        "start": {
          "line": 32,
          "column": 3
        },
        "end": {
          "line": 34,
          "column": 62
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/tapEffect.ts",
        "start": {
          "line": 36,
          "column": 3
        },
        "end": {
          "line": 39,
          "column": 28
        }
      }
    ],
    "since": "1.0.0",
    "category": "Transforming values"
  }
}
