{
  "id": "@typed/fx#Sink.flip",
  "canonicalId": "@typed/fx/Sink#flip",
  "symbol": {
    "id": "@typed/fx#Sink.flip",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Sink.flip",
    "kind": "constant",
    "signatures": [
      "export declare const flip: <A, E, R>(sink: Sink<A, E, R>) => Sink<E, A, R>;"
    ],
    "summary": "Exchanges a sink's typed success and failure channels.",
    "sections": {
      "Why": "Error-oriented consumers can be reused as value consumers, and vice versa, without changing the\nproducer-side protocol.",
      "Ownership and lifetime": "A successful input becomes `Cause.fail` downstream. For an incoming Cause, the first typed `Fail`\nreason becomes a success and every remaining reason is discarded, including later failures,\ndefects, or interruption reasons. A Cause with no typed failure passes through intact. The adapter\nis synchronous, ordered, and resource-free; use `exit` when the whole Cause must remain observable."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst errorsAsValues = Sink.flip(Sink.make(Effect.logError, (value: number) => Effect.log(value)))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Sink/combinators.ts",
      "line": 1518
    },
    "since": "1.0.0",
    "category": "Failure handling"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Sink.flip",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Sink",
    "qualifiedName": "Sink.flip",
    "declarationKey": "declaration:3d8337b3c3933f6c1bbf64bd",
    "family": "variable",
    "signatures": [
      "export declare const flip: <A, E, R>(sink: Sink<A, E, R>) => Sink<E, A, R>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1518,
          "column": 14
        },
        "end": {
          "line": 1518,
          "column": 88
        }
      }
    ],
    "aliases": [
      "@typed/fx/Sink#flip"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Sink",
    "static": false,
    "importedFrom": "declaration:3d8337b3c3933f6c1bbf64bd"
  },
  "declaration": {
    "declarationKey": "declaration:3d8337b3c3933f6c1bbf64bd",
    "name": "flip",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const flip: <A, E, R>(sink: Sink<A, E, R>) => Sink<E, A, R>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 1518,
              "column": 14
            },
            "end": {
              "line": 1518,
              "column": 88
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const flip: <A, E, R>(sink: Sink<A, E, R>) => Sink<E, A, R>;"
    ],
    "typeParameters": [],
    "summary": "Exchanges a sink's typed success and failure channels.",
    "sections": {
      "Why": "Error-oriented consumers can be reused as value consumers, and vice versa, without changing the\nproducer-side protocol.",
      "Ownership and lifetime": "A successful input becomes `Cause.fail` downstream. For an incoming Cause, the first typed `Fail`\nreason becomes a success and every remaining reason is discarded, including later failures,\ndefects, or interruption reasons. A Cause with no typed failure passes through intact. The adapter\nis synchronous, ordered, and resource-free; use `exit` when the whole Cause must remain observable."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst errorsAsValues = Sink.flip(Sink.make(Effect.logError, (value: number) => Effect.log(value)))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1518,
          "column": 14
        },
        "end": {
          "line": 1518,
          "column": 88
        }
      }
    ],
    "since": "1.0.0",
    "category": "Failure handling"
  }
}
