{
  "id": "@typed/guard#addTag",
  "canonicalId": "@typed/guard#addTag",
  "symbol": {
    "id": "@typed/guard#addTag",
    "packageName": "@typed/guard",
    "moduleName": ".",
    "exportName": "addTag",
    "kind": "constant",
    "signatures": [
      "export declare const addTag: {\n    <B>(value: B): <G extends GuardInput<any, any, any, any>>(guard: G & RecordOutputConstraint<NoInfer<Guard.Output<G>>> & (\"_tag\" extends NoInfer<Guard.Output<G> extends infer O ? (O extends unknown ? keyof O : never) : never> ? never : unknown)) => Guard<Guard.Input<G>, Guard.Output<G> & {\n        readonly _tag: B;\n    }, Guard.Error<G>, Guard.Services<G>>;\n    <G extends GuardInput<any, any, any, any>, B>(guard: G & RecordOutputConstraint<NoInfer<Guard.Output<G>>> & (\"_tag\" extends NoInfer<Guard.Output<G> extends infer O ? (O extends unknown ? keyof O : never) : never> ? never : unknown), value: B): Guard<Guard.Input<G>, Guard.Output<G> & {\n        readonly _tag: B;\n    }, Guard.Error<G>, Guard.Services<G>>;\n};"
    ],
    "summary": "Adds a readonly `_tag` to every matched object output. The output must not\nalready have an `_tag` property.",
    "sections": {
      "Why": "A typed discriminant turns matched record outputs into exhaustively narrowable tagged values while rejecting key collisions.",
      "Ownership and lifetime": "This pure combinator acquires no resources and creates a fresh plain object for every match."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { addTag, bindTo, liftPredicate } from \"@typed/guard\"\nconst tagged = addTag(bindTo(liftPredicate(Boolean), \"value\"), \"Input\")"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/guard/src/index.ts",
      "line": 1119
    },
    "since": "1.0.0",
    "category": "Record construction"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/guard#addTag",
    "packageName": "@typed/guard",
    "packageVersion": "1.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/guard",
    "exportName": "addTag",
    "qualifiedName": "addTag",
    "declarationKey": "declaration:1e7a5b72cb66e1bf9696a2e1",
    "family": "variable",
    "signatures": [
      "export declare const addTag: {\n    <B>(value: B): <G extends GuardInput<any, any, any, any>>(guard: G & RecordOutputConstraint<NoInfer<Guard.Output<G>>> & (\"_tag\" extends NoInfer<Guard.Output<G> extends infer O ? (O extends unknown ? keyof O : never) : never> ? never : unknown)) => Guard<Guard.Input<G>, Guard.Output<G> & {\n        readonly _tag: B;\n    }, Guard.Error<G>, Guard.Services<G>>;\n    <G extends GuardInput<any, any, any, any>, B>(guard: G & RecordOutputConstraint<NoInfer<Guard.Output<G>>> & (\"_tag\" extends NoInfer<Guard.Output<G> extends infer O ? (O extends unknown ? keyof O : never) : never> ? never : unknown), value: B): Guard<Guard.Input<G>, Guard.Output<G> & {\n        readonly _tag: B;\n    }, Guard.Error<G>, Guard.Services<G>>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 1119,
          "column": 14
        },
        "end": {
          "line": 1163,
          "column": 3
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 1120,
          "column": 3
        },
        "end": {
          "line": 1135,
          "column": 5
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 1137,
          "column": 3
        },
        "end": {
          "line": 1151,
          "column": 5
        }
      }
    ],
    "aliases": [],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:1e7a5b72cb66e1bf9696a2e1",
    "name": "addTag",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const addTag: {\n    <B>(value: B): <G extends GuardInput<any, any, any, any>>(guard: G & RecordOutputConstraint<NoInfer<Guard.Output<G>>> & (\"_tag\" extends NoInfer<Guard.Output<G> extends infer O ? (O extends unknown ? keyof O : never) : never> ? never : unknown)) => Guard<Guard.Input<G>, Guard.Output<G> & {\n        readonly _tag: B;\n    }, Guard.Error<G>, Guard.Services<G>>;\n    <G extends GuardInput<any, any, any, any>, B>(guard: G & RecordOutputConstraint<NoInfer<Guard.Output<G>>> & (\"_tag\" extends NoInfer<Guard.Output<G> extends infer O ? (O extends unknown ? keyof O : never) : never> ? never : unknown), value: B): Guard<Guard.Input<G>, Guard.Output<G> & {\n        readonly _tag: B;\n    }, Guard.Error<G>, Guard.Services<G>>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/guard/src/index.ts",
            "start": {
              "line": 1119,
              "column": 14
            },
            "end": {
              "line": 1163,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<B>(value: B): <G extends GuardInput<any, any, any, any>>(guard: G & RecordOutputConstraint<NoInfer<Guard.Output<G>>> & (\"_tag\" extends NoInfer<Guard.Output<G> extends infer O ? (O extends unknown ? keyof O : never) : never> ? never : unknown)) => Guard<Guard.Input<G>, Guard.Output<G> & {\n    readonly _tag: B;\n}, Guard.Error<G>, Guard.Services<G>>;",
          "<G extends GuardInput<any, any, any, any>, B>(guard: G & RecordOutputConstraint<NoInfer<Guard.Output<G>>> & (\"_tag\" extends NoInfer<Guard.Output<G> extends infer O ? (O extends unknown ? keyof O : never) : never> ? never : unknown), value: B): Guard<Guard.Input<G>, Guard.Output<G> & {\n    readonly _tag: B;\n}, Guard.Error<G>, Guard.Services<G>>;"
        ],
        "typeParameters": [
          "B",
          "G extends GuardInput<any, any, any, any>"
        ],
        "sourceSpans": [
          {
            "file": "packages/guard/src/index.ts",
            "start": {
              "line": 1120,
              "column": 3
            },
            "end": {
              "line": 1135,
              "column": 5
            }
          },
          {
            "file": "packages/guard/src/index.ts",
            "start": {
              "line": 1137,
              "column": 3
            },
            "end": {
              "line": 1151,
              "column": 5
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const addTag: {\n    <B>(value: B): <G extends GuardInput<any, any, any, any>>(guard: G & RecordOutputConstraint<NoInfer<Guard.Output<G>>> & (\"_tag\" extends NoInfer<Guard.Output<G> extends infer O ? (O extends unknown ? keyof O : never) : never> ? never : unknown)) => Guard<Guard.Input<G>, Guard.Output<G> & {\n        readonly _tag: B;\n    }, Guard.Error<G>, Guard.Services<G>>;\n    <G extends GuardInput<any, any, any, any>, B>(guard: G & RecordOutputConstraint<NoInfer<Guard.Output<G>>> & (\"_tag\" extends NoInfer<Guard.Output<G> extends infer O ? (O extends unknown ? keyof O : never) : never> ? never : unknown), value: B): Guard<Guard.Input<G>, Guard.Output<G> & {\n        readonly _tag: B;\n    }, Guard.Error<G>, Guard.Services<G>>;\n};"
    ],
    "typeParameters": [
      "B",
      "G extends GuardInput<any, any, any, any>"
    ],
    "summary": "Adds a readonly `_tag` to every matched object output. The output must not\nalready have an `_tag` property.",
    "sections": {
      "Why": "A typed discriminant turns matched record outputs into exhaustively narrowable tagged values while rejecting key collisions.",
      "Ownership and lifetime": "This pure combinator acquires no resources and creates a fresh plain object for every match."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { addTag, bindTo, liftPredicate } from \"@typed/guard\"\nconst tagged = addTag(bindTo(liftPredicate(Boolean), \"value\"), \"Input\")"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 1119,
          "column": 14
        },
        "end": {
          "line": 1163,
          "column": 3
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 1120,
          "column": 3
        },
        "end": {
          "line": 1135,
          "column": 5
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 1137,
          "column": 3
        },
        "end": {
          "line": 1151,
          "column": 5
        }
      }
    ],
    "since": "1.0.0",
    "category": "Record construction"
  }
}
