{
  "id": "@typed/guard#decode",
  "canonicalId": "@typed/guard#decode",
  "symbol": {
    "id": "@typed/guard#decode",
    "packageName": "@typed/guard",
    "moduleName": ".",
    "exportName": "decode",
    "kind": "constant",
    "signatures": [
      "export declare const decode: {\n    <S extends Schema.Top>(schema: S): <I, E = never, R = never>(guard: GuardInput<I, S[\"Encoded\"], E, R>) => Guard<I, S[\"Type\"], Schema.SchemaError | E, R | S[\"DecodingServices\"]>;\n    <I, E, R, S extends Schema.Top>(guard: GuardInput<I, S[\"Encoded\"], E, R>, schema: S): Guard<I, S[\"Type\"], Schema.SchemaError | E, R | S[\"DecodingServices\"]>;\n};"
    ],
    "summary": "Decodes each matched encoded value through an Effect Schema.",
    "sections": {
      "Why": "The composed Guard preserves source non-match and errors while adding schema failures and decoding service requirements.",
      "Ownership and lifetime": "Construction acquires no resources; decoding starts only for `Some` and follows that invocation's lifetime."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { decode, liftPredicate } from \"@typed/guard\"\nimport { Schema } from \"effect\"\nconst number = decode(liftPredicate((u: unknown): u is string => typeof u === \"string\"), Schema.NumberFromString)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/guard/src/index.ts",
      "line": 970
    },
    "since": "1.0.0",
    "category": "Schema decoding and encoding"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/guard#decode",
    "packageName": "@typed/guard",
    "packageVersion": "1.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/guard",
    "exportName": "decode",
    "qualifiedName": "decode",
    "declarationKey": "declaration:603fd36bc399c9c9cab5c727",
    "family": "variable",
    "signatures": [
      "export declare const decode: {\n    <S extends Schema.Top>(schema: S): <I, E = never, R = never>(guard: GuardInput<I, S[\"Encoded\"], E, R>) => Guard<I, S[\"Type\"], Schema.SchemaError | E, R | S[\"DecodingServices\"]>;\n    <I, E, R, S extends Schema.Top>(guard: GuardInput<I, S[\"Encoded\"], E, R>, schema: S): Guard<I, S[\"Type\"], Schema.SchemaError | E, R | S[\"DecodingServices\"]>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 970,
          "column": 14
        },
        "end": {
          "line": 993,
          "column": 3
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 971,
          "column": 3
        },
        "end": {
          "line": 975,
          "column": 79
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 977,
          "column": 3
        },
        "end": {
          "line": 980,
          "column": 77
        }
      }
    ],
    "aliases": [],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:603fd36bc399c9c9cab5c727",
    "name": "decode",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const decode: {\n    <S extends Schema.Top>(schema: S): <I, E = never, R = never>(guard: GuardInput<I, S[\"Encoded\"], E, R>) => Guard<I, S[\"Type\"], Schema.SchemaError | E, R | S[\"DecodingServices\"]>;\n    <I, E, R, S extends Schema.Top>(guard: GuardInput<I, S[\"Encoded\"], E, R>, schema: S): Guard<I, S[\"Type\"], Schema.SchemaError | E, R | S[\"DecodingServices\"]>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/guard/src/index.ts",
            "start": {
              "line": 970,
              "column": 14
            },
            "end": {
              "line": 993,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<S extends Schema.Top>(schema: S): <I, E = never, R = never>(guard: GuardInput<I, S[\"Encoded\"], E, R>) => Guard<I, S[\"Type\"], Schema.SchemaError | E, R | S[\"DecodingServices\"]>;",
          "<I, E, R, S extends Schema.Top>(guard: GuardInput<I, S[\"Encoded\"], E, R>, schema: S): Guard<I, S[\"Type\"], Schema.SchemaError | E, R | S[\"DecodingServices\"]>;"
        ],
        "typeParameters": [
          "S extends Schema.Top",
          "I",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/guard/src/index.ts",
            "start": {
              "line": 971,
              "column": 3
            },
            "end": {
              "line": 975,
              "column": 79
            }
          },
          {
            "file": "packages/guard/src/index.ts",
            "start": {
              "line": 977,
              "column": 3
            },
            "end": {
              "line": 980,
              "column": 77
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const decode: {\n    <S extends Schema.Top>(schema: S): <I, E = never, R = never>(guard: GuardInput<I, S[\"Encoded\"], E, R>) => Guard<I, S[\"Type\"], Schema.SchemaError | E, R | S[\"DecodingServices\"]>;\n    <I, E, R, S extends Schema.Top>(guard: GuardInput<I, S[\"Encoded\"], E, R>, schema: S): Guard<I, S[\"Type\"], Schema.SchemaError | E, R | S[\"DecodingServices\"]>;\n};"
    ],
    "typeParameters": [
      "S extends Schema.Top",
      "I",
      "E",
      "R"
    ],
    "summary": "Decodes each matched encoded value through an Effect Schema.",
    "sections": {
      "Why": "The composed Guard preserves source non-match and errors while adding schema failures and decoding service requirements.",
      "Ownership and lifetime": "Construction acquires no resources; decoding starts only for `Some` and follows that invocation's lifetime."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { decode, liftPredicate } from \"@typed/guard\"\nimport { Schema } from \"effect\"\nconst number = decode(liftPredicate((u: unknown): u is string => typeof u === \"string\"), Schema.NumberFromString)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 970,
          "column": 14
        },
        "end": {
          "line": 993,
          "column": 3
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 971,
          "column": 3
        },
        "end": {
          "line": 975,
          "column": 79
        }
      },
      {
        "file": "packages/guard/src/index.ts",
        "start": {
          "line": 977,
          "column": 3
        },
        "end": {
          "line": 980,
          "column": 77
        }
      }
    ],
    "since": "1.0.0",
    "category": "Schema decoding and encoding"
  }
}
