{
  "id": "@typed/fx#Sink.compact",
  "canonicalId": "@typed/fx/Sink#compact",
  "symbol": {
    "id": "@typed/fx#Sink.compact",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Sink.compact",
    "kind": "function",
    "signatures": [
      "export declare function compact<A, E, R>(sink: Sink<A, E, R>): Sink<Option.Option<A>, E, R>;"
    ],
    "summary": "Forwards `Some` values and discards `None` values.",
    "sections": {
      "Why": "`compact` consumes optional producer output with the same zero-or-one cardinality as `filterMap`.",
      "Ownership and lifetime": "Option inspection is synchronous and resource-free. Present values retain arrival order; failure\ncauses pass through unchanged."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Option } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst sink = Sink.compact(Sink.make(Effect.logError, (n: number) => Effect.log(n)))\nsink.onSuccess(Option.some(1))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Sink/combinators.ts",
      "line": 258
    },
    "since": "1.0.0",
    "category": "Selecting inputs"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Sink.compact",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Sink",
    "qualifiedName": "Sink.compact",
    "declarationKey": "declaration:2ecd62c208856b7cfd98e1ff",
    "family": "function",
    "signatures": [
      "export declare function compact<A, E, R>(sink: Sink<A, E, R>): Sink<Option.Option<A>, E, R>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 258,
          "column": 1
        },
        "end": {
          "line": 260,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/fx/Sink#compact"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Sink",
    "static": false,
    "importedFrom": "declaration:2ecd62c208856b7cfd98e1ff"
  },
  "declaration": {
    "declarationKey": "declaration:2ecd62c208856b7cfd98e1ff",
    "name": "compact",
    "family": "function",
    "facets": [
      {
        "family": "function",
        "syntaxKind": "FunctionDeclaration",
        "signatures": [
          "export declare function compact<A, E, R>(sink: Sink<A, E, R>): Sink<Option.Option<A>, E, R>;"
        ],
        "typeParameters": [
          "A",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 258,
              "column": 1
            },
            "end": {
              "line": 260,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare function compact<A, E, R>(sink: Sink<A, E, R>): Sink<Option.Option<A>, E, R>;"
    ],
    "typeParameters": [
      "A",
      "E",
      "R"
    ],
    "summary": "Forwards `Some` values and discards `None` values.",
    "sections": {
      "Why": "`compact` consumes optional producer output with the same zero-or-one cardinality as `filterMap`.",
      "Ownership and lifetime": "Option inspection is synchronous and resource-free. Present values retain arrival order; failure\ncauses pass through unchanged."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Option } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst sink = Sink.compact(Sink.make(Effect.logError, (n: number) => Effect.log(n)))\nsink.onSuccess(Option.some(1))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 258,
          "column": 1
        },
        "end": {
          "line": 260,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Selecting inputs"
  }
}
