{
  "id": "@typed/fx/Sink#slice",
  "canonicalId": "@typed/fx/Sink#slice",
  "symbol": {
    "id": "@typed/fx/Sink#slice",
    "packageName": "@typed/fx",
    "moduleName": "Sink",
    "exportName": "slice",
    "kind": "constant",
    "signatures": [
      "export declare const slice: {\n    <A, E, R, R2>(bounds: Bounds, f: (sink: Sink<A, E, R>) => Effect.Effect<unknown, never, R2>): (sink: Sink<A, E, R>) => Effect.Effect<void, never, R | R2>;\n    <A, E, R, R2>(sink: Sink<A, E, R>, bounds: Bounds, f: (sink: Sink<A, E, R>) => Effect.Effect<unknown, never, R2>): Effect.Effect<void, never, R | R2>;\n};"
    ],
    "summary": "Runs a producer callback through a bounded view of a sink.",
    "sections": {
      "Why": "Consumers can skip an initial prefix and stop after a fixed number of values, allowing the\nsurrounding producer work to finish early.",
      "Ownership and lifetime": "Each execution owns fresh counters and an early-exit callback. Successes remain ordered; at most\n`take` values are delivered after `skip` values. Failures always pass through. Reaching the bound\ncompletes and aborts the callback fiber; negative bounds are not normalized."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst target = Sink.make(Effect.logError, Effect.log)\nconst program = Sink.slice(target, { skip: 1, take: 2 }, (bounded) => bounded.onSuccess(\"kept\"))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Sink/combinators.ts",
      "line": 1154
    },
    "since": "1.0.0",
    "category": "Stopping delivery"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Sink#slice",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": "Sink",
    "consumerSpecifier": "@typed/fx/Sink",
    "exportName": "slice",
    "qualifiedName": "slice",
    "declarationKey": "declaration:3311e5a0813c13480b25c354",
    "family": "variable",
    "signatures": [
      "export declare const slice: {\n    <A, E, R, R2>(bounds: Bounds, f: (sink: Sink<A, E, R>) => Effect.Effect<unknown, never, R2>): (sink: Sink<A, E, R>) => Effect.Effect<void, never, R | R2>;\n    <A, E, R, R2>(sink: Sink<A, E, R>, bounds: Bounds, f: (sink: Sink<A, E, R>) => Effect.Effect<unknown, never, R2>): Effect.Effect<void, never, R | R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1154,
          "column": 14
        },
        "end": {
          "line": 1175,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1155,
          "column": 3
        },
        "end": {
          "line": 1158,
          "column": 66
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1159,
          "column": 3
        },
        "end": {
          "line": 1163,
          "column": 41
        }
      }
    ],
    "aliases": [
      "@typed/fx#Sink.slice"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:3311e5a0813c13480b25c354",
    "name": "slice",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const slice: {\n    <A, E, R, R2>(bounds: Bounds, f: (sink: Sink<A, E, R>) => Effect.Effect<unknown, never, R2>): (sink: Sink<A, E, R>) => Effect.Effect<void, never, R | R2>;\n    <A, E, R, R2>(sink: Sink<A, E, R>, bounds: Bounds, f: (sink: Sink<A, E, R>) => Effect.Effect<unknown, never, R2>): Effect.Effect<void, never, R | R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 1154,
              "column": 14
            },
            "end": {
              "line": 1175,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<A, E, R, R2>(bounds: Bounds, f: (sink: Sink<A, E, R>) => Effect.Effect<unknown, never, R2>): (sink: Sink<A, E, R>) => Effect.Effect<void, never, R | R2>;",
          "<A, E, R, R2>(sink: Sink<A, E, R>, bounds: Bounds, f: (sink: Sink<A, E, R>) => Effect.Effect<unknown, never, R2>): Effect.Effect<void, never, R | R2>;"
        ],
        "typeParameters": [
          "A",
          "E",
          "R",
          "R2"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 1155,
              "column": 3
            },
            "end": {
              "line": 1158,
              "column": 66
            }
          },
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 1159,
              "column": 3
            },
            "end": {
              "line": 1163,
              "column": 41
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const slice: {\n    <A, E, R, R2>(bounds: Bounds, f: (sink: Sink<A, E, R>) => Effect.Effect<unknown, never, R2>): (sink: Sink<A, E, R>) => Effect.Effect<void, never, R | R2>;\n    <A, E, R, R2>(sink: Sink<A, E, R>, bounds: Bounds, f: (sink: Sink<A, E, R>) => Effect.Effect<unknown, never, R2>): Effect.Effect<void, never, R | R2>;\n};"
    ],
    "typeParameters": [
      "A",
      "E",
      "R",
      "R2"
    ],
    "summary": "Runs a producer callback through a bounded view of a sink.",
    "sections": {
      "Why": "Consumers can skip an initial prefix and stop after a fixed number of values, allowing the\nsurrounding producer work to finish early.",
      "Ownership and lifetime": "Each execution owns fresh counters and an early-exit callback. Successes remain ordered; at most\n`take` values are delivered after `skip` values. Failures always pass through. Reaching the bound\ncompletes and aborts the callback fiber; negative bounds are not normalized."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst target = Sink.make(Effect.logError, Effect.log)\nconst program = Sink.slice(target, { skip: 1, take: 2 }, (bounded) => bounded.onSuccess(\"kept\"))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1154,
          "column": 14
        },
        "end": {
          "line": 1175,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1155,
          "column": 3
        },
        "end": {
          "line": 1158,
          "column": 66
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1159,
          "column": 3
        },
        "end": {
          "line": 1163,
          "column": 41
        }
      }
    ],
    "since": "1.0.0",
    "category": "Stopping delivery"
  }
}
