{
  "id": "@typed/fx/Fx#make",
  "canonicalId": "@typed/fx/Fx#make",
  "symbol": {
    "id": "@typed/fx/Fx#make",
    "packageName": "@typed/fx",
    "moduleName": "Fx",
    "exportName": "make",
    "kind": "constant",
    "signatures": [
      "export declare const make: <A, E = never, R = never>(run: <RSink = never>(sink: Sink<A, E, RSink>) => Effect.Effect<unknown, never, R | RSink>) => Fx<A, E, R>;"
    ],
    "summary": "Creates an Fx from a function that provides values to a Sink.\n\nThis is the lowest-level constructor for Fx, giving you full control over\nthe stream's behavior.",
    "sections": {
      "Why": "`make` is the protocol boundary for custom producers. It exposes the real `Sink`\noperation so libraries can define cardinality, ordering, concurrency, causes, and\nservices without an opinionated source wrapper.",
      "Ownership and lifetime": "`make` stores the callback without invoking it. Calling `fx.run(sink)` asks the\ncallback to construct its Effect; executing that Effect performs the subscription.\nKeep acquisition, publication, and cleanup inside the returned Effect or a required\n`Scope`, rather than performing side effects while constructing it. The returned\nEffect has no typed failure channel because producer failures are delivered through\n`sink.onFailure`; defects and interruption can still affect the run."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport { collectAll, make } from \"@typed/fx/Fx\"\n\nconst pair = make<number>((sink) =>\n  Effect.andThen(sink.onSuccess(1), sink.onSuccess(2))\n)\nconst program = collectAll(pair)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/constructors/make.ts",
      "line": 69
    },
    "since": "1.0.0",
    "category": "Callback sources"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Fx#make",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": "Fx",
    "consumerSpecifier": "@typed/fx/Fx",
    "exportName": "make",
    "qualifiedName": "make",
    "declarationKey": "declaration:12b2a3b39212f21e65c75263",
    "family": "variable",
    "signatures": [
      "export declare const make: <A, E = never, R = never>(run: <RSink = never>(sink: Sink<A, E, RSink>) => Effect.Effect<unknown, never, R | RSink>) => Fx<A, E, R>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/constructors/make.ts",
        "start": {
          "line": 69,
          "column": 14
        },
        "end": {
          "line": 71,
          "column": 41
        }
      }
    ],
    "aliases": [
      "@typed/fx#Fx.make"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:12b2a3b39212f21e65c75263",
    "name": "make",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const make: <A, E = never, R = never>(run: <RSink = never>(sink: Sink<A, E, RSink>) => Effect.Effect<unknown, never, R | RSink>) => Fx<A, E, R>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/constructors/make.ts",
            "start": {
              "line": 69,
              "column": 14
            },
            "end": {
              "line": 71,
              "column": 41
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const make: <A, E = never, R = never>(run: <RSink = never>(sink: Sink<A, E, RSink>) => Effect.Effect<unknown, never, R | RSink>) => Fx<A, E, R>;"
    ],
    "typeParameters": [],
    "summary": "Creates an Fx from a function that provides values to a Sink.\n\nThis is the lowest-level constructor for Fx, giving you full control over\nthe stream's behavior.",
    "sections": {
      "Why": "`make` is the protocol boundary for custom producers. It exposes the real `Sink`\noperation so libraries can define cardinality, ordering, concurrency, causes, and\nservices without an opinionated source wrapper.",
      "Ownership and lifetime": "`make` stores the callback without invoking it. Calling `fx.run(sink)` asks the\ncallback to construct its Effect; executing that Effect performs the subscription.\nKeep acquisition, publication, and cleanup inside the returned Effect or a required\n`Scope`, rather than performing side effects while constructing it. The returned\nEffect has no typed failure channel because producer failures are delivered through\n`sink.onFailure`; defects and interruption can still affect the run."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport { collectAll, make } from \"@typed/fx/Fx\"\n\nconst pair = make<number>((sink) =>\n  Effect.andThen(sink.onSuccess(1), sink.onSuccess(2))\n)\nconst program = collectAll(pair)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/constructors/make.ts",
        "start": {
          "line": 69,
          "column": 14
        },
        "end": {
          "line": 71,
          "column": 41
        }
      }
    ],
    "since": "1.0.0",
    "category": "Callback sources"
  }
}
