{
  "id": "@typed/guard#tap",
  "canonicalId": "@typed/guard#tap",
  "symbol": {
    "id": "@typed/guard#tap",
    "packageName": "@typed/guard",
    "moduleName": ".",
    "exportName": "tap",
    "kind": "constant",
    "signatures": [
      "export declare const tap: {\n    <O>(f: (o: O) => void): <I, R, E>(guard: GuardInput<I, O, E, R>) => Guard<I, O, E, R>;\n    <O, B, E2, R2>(f: (o: O) => Effect.Effect<B, E2, R2>): <I, R, E>(guard: GuardInput<I, O, E, R>) => Guard<I, O, E | E2, R | R2>;\n    <I, O, E, R>(guard: GuardInput<I, O, E, R>, f: (o: O) => void): Guard<I, O, E, R>;\n    <I, O, E, R, B, E2, R2>(guard: GuardInput<I, O, E, R>, f: (o: O) => Effect.Effect<B, E2, R2>): Guard<I, O, E | E2, R | R2>;\n};"
    ],
    "summary": "Runs a synchronous or Effectful observation for each matched value and returns the value unchanged.",
    "sections": {
      "Why": "Observation composes without changing output, while Effect callbacks correctly contribute their errors and services.",
      "Ownership and lifetime": "Construction acquires no resources; callback lifetime is bounded by each matching Guard invocation."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { liftPredicate, tap } from \"@typed/guard\"\nconst observed = tap(liftPredicate((u: unknown): u is string => typeof u === \"string\"), console.log)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/guard/src/index.ts",
      "line": 388
    },
    "since": "1.0.0",
    "category": "Effectful observation"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/guard#tap",
    "packageName": "@typed/guard",
    "packageVersion": "1.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/guard",
    "exportName": "tap",
    "qualifiedName": "tap",
    "declarationKey": "declaration:d70caefc3ba5305d4cbd257d",
    "family": "variable",
    "signatures": [
      "export declare const tap: {\n    <O>(f: (o: O) => void): <I, R, E>(guard: GuardInput<I, O, E, R>) => Guard<I, O, E, R>;\n    <O, B, E2, R2>(f: (o: O) => Effect.Effect<B, E2, R2>): <I, R, E>(guard: GuardInput<I, O, E, R>) => Guard<I, O, E | E2, R | R2>;\n    <I, O, E, R>(guard: GuardInput<I, O, E, R>, f: (o: O) => void): Guard<I, O, E, R>;\n    <I, O, E, R, B, E2, R2>(guard: GuardInput<I, O, E, R>, f: (o: O) => Effect.Effect<B, E2, R2>): Guard<I, O, E | E2, R | R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 388,
          "column": 14
        },
        "end": {
          "line": 417,
          "column": 3
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 389,
          "column": 3
        },
        "end": {
          "line": 389,
          "column": 89
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 390,
          "column": 3
        },
        "end": {
          "line": 392,
          "column": 78
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 393,
          "column": 3
        },
        "end": {
          "line": 393,
          "column": 85
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 394,
          "column": 3
        },
        "end": {
          "line": 397,
          "column": 34
        }
      }
    ],
    "aliases": [],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:d70caefc3ba5305d4cbd257d",
    "name": "tap",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const tap: {\n    <O>(f: (o: O) => void): <I, R, E>(guard: GuardInput<I, O, E, R>) => Guard<I, O, E, R>;\n    <O, B, E2, R2>(f: (o: O) => Effect.Effect<B, E2, R2>): <I, R, E>(guard: GuardInput<I, O, E, R>) => Guard<I, O, E | E2, R | R2>;\n    <I, O, E, R>(guard: GuardInput<I, O, E, R>, f: (o: O) => void): Guard<I, O, E, R>;\n    <I, O, E, R, B, E2, R2>(guard: GuardInput<I, O, E, R>, f: (o: O) => Effect.Effect<B, E2, R2>): Guard<I, O, E | E2, R | R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/guard/src/index.ts",
            "start": {
              "line": 388,
              "column": 14
            },
            "end": {
              "line": 417,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<O>(f: (o: O) => void): <I, R, E>(guard: GuardInput<I, O, E, R>) => Guard<I, O, E, R>;",
          "<O, B, E2, R2>(f: (o: O) => Effect.Effect<B, E2, R2>): <I, R, E>(guard: GuardInput<I, O, E, R>) => Guard<I, O, E | E2, R | R2>;",
          "<I, O, E, R>(guard: GuardInput<I, O, E, R>, f: (o: O) => void): Guard<I, O, E, R>;",
          "<I, O, E, R, B, E2, R2>(guard: GuardInput<I, O, E, R>, f: (o: O) => Effect.Effect<B, E2, R2>): Guard<I, O, E | E2, R | R2>;"
        ],
        "typeParameters": [
          "O",
          "B",
          "E2",
          "R2",
          "I",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/guard/src/index.ts",
            "start": {
              "line": 389,
              "column": 3
            },
            "end": {
              "line": 389,
              "column": 89
            }
          },
          {
            "file": "packages/guard/src/index.ts",
            "start": {
              "line": 390,
              "column": 3
            },
            "end": {
              "line": 392,
              "column": 78
            }
          },
          {
            "file": "packages/guard/src/index.ts",
            "start": {
              "line": 393,
              "column": 3
            },
            "end": {
              "line": 393,
              "column": 85
            }
          },
          {
            "file": "packages/guard/src/index.ts",
            "start": {
              "line": 394,
              "column": 3
            },
            "end": {
              "line": 397,
              "column": 34
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const tap: {\n    <O>(f: (o: O) => void): <I, R, E>(guard: GuardInput<I, O, E, R>) => Guard<I, O, E, R>;\n    <O, B, E2, R2>(f: (o: O) => Effect.Effect<B, E2, R2>): <I, R, E>(guard: GuardInput<I, O, E, R>) => Guard<I, O, E | E2, R | R2>;\n    <I, O, E, R>(guard: GuardInput<I, O, E, R>, f: (o: O) => void): Guard<I, O, E, R>;\n    <I, O, E, R, B, E2, R2>(guard: GuardInput<I, O, E, R>, f: (o: O) => Effect.Effect<B, E2, R2>): Guard<I, O, E | E2, R | R2>;\n};"
    ],
    "typeParameters": [
      "O",
      "B",
      "E2",
      "R2",
      "I",
      "E",
      "R"
    ],
    "summary": "Runs a synchronous or Effectful observation for each matched value and returns the value unchanged.",
    "sections": {
      "Why": "Observation composes without changing output, while Effect callbacks correctly contribute their errors and services.",
      "Ownership and lifetime": "Construction acquires no resources; callback lifetime is bounded by each matching Guard invocation."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { liftPredicate, tap } from \"@typed/guard\"\nconst observed = tap(liftPredicate((u: unknown): u is string => typeof u === \"string\"), console.log)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 388,
          "column": 14
        },
        "end": {
          "line": 417,
          "column": 3
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 389,
          "column": 3
        },
        "end": {
          "line": 389,
          "column": 89
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 390,
          "column": 3
        },
        "end": {
          "line": 392,
          "column": 78
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 393,
          "column": 3
        },
        "end": {
          "line": 393,
          "column": 85
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 394,
          "column": 3
        },
        "end": {
          "line": 397,
          "column": 34
        }
      }
    ],
    "since": "1.0.0",
    "category": "Effectful observation"
  }
}
