{
  "id": "@typed/fx/Subject#Subject.Service",
  "canonicalId": "@typed/fx/Subject#Subject.Service",
  "symbol": {
    "id": "@typed/fx/Subject#Subject.Service",
    "packageName": "@typed/fx",
    "moduleName": "Subject",
    "exportName": "Subject.Service",
    "kind": "interface",
    "signatures": [
      "interface Service<Self, Id extends string, A, E> extends Subject<A, E, Self> {\n    readonly id: Id;\n    readonly service: Context.Service<Self, Subject<A, E>>;\n    readonly make: (replay?: number) => Layer.Layer<Self, Cause.IllegalArgumentError, Scope.Scope>;\n}"
    ],
    "summary": "The service-shaped form of a `Subject` created by `Subject.Service`.",
    "sections": {
      "Why": "A service form lets producers and consumers refer to one shared subject through Effect's\ncontext instead of passing the concrete instance through every call.",
      "Ownership and lifetime": "Static Subject operations require `Self` and delegate to the instance installed by `make`.\nThe layer owns that instance in a `Scope` and interrupts it when the layer is released.",
      "Property: id": "The literal context identifier supplied to `Subject.Service`.",
      "Property: id: Why": "Preserves the service's stable identity for diagnostics and layer composition.",
      "Property: id: Ownership and lifetime": "This string literal acquires and retains no resources.",
      "Property: make": "Builds a scoped layer containing one subject with the requested replay capacity.",
      "Property: make: Why": "Packages one shared subject as a normal Effect layer for dependency composition.",
      "Property: make: Ownership and lifetime": "Invalid capacities fail layer construction with `Cause.IllegalArgumentError`. The layer's\nscope owns the subject and interrupts its subscribers and clears its replay buffer on release.",
      "Property: service": "The Effect context service used to retrieve the live subject instance.",
      "Property: service: Why": "Provides the standard Effect service lookup used by every static Subject operation.",
      "Property: service: Ownership and lifetime": "The tag acquires nothing; the layer installed for it owns the concrete subject."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import * as Subject from \"@typed/fx/Subject\"\n\nclass Events extends Subject.Service<Events, string>()(\"Events\") {}\nconst EventsLive = Events.make()"
      },
      {
        "language": "ts",
        "code": "import * as Subject from \"@typed/fx/Subject\"\n\nclass Events extends Subject.Service<Events, string>()(\"Events\") {}\nconst EventsLive = Events.make(1)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Subject/Subject.ts",
      "line": 135
    },
    "since": "1.0.0",
    "category": "Subject services"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Subject#Subject.Service",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": "Subject",
    "consumerSpecifier": "@typed/fx/Subject",
    "exportName": "Subject",
    "qualifiedName": "Subject.Service",
    "declarationKey": "declaration:25486e5281b6e6d47cc2ba20",
    "family": "interface",
    "signatures": [
      "interface Service<Self, Id extends string, A, E> extends Subject<A, E, Self> {\n    readonly id: Id;\n    readonly service: Context.Service<Self, Subject<A, E>>;\n    readonly make: (replay?: number) => Layer.Layer<Self, Cause.IllegalArgumentError, Scope.Scope>;\n}"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Subject/Subject.ts",
        "start": {
          "line": 135,
          "column": 3
        },
        "end": {
          "line": 193,
          "column": 4
        }
      },
      {
        "file": "packages/fx/src/Subject/Subject.ts",
        "start": {
          "line": 151,
          "column": 5
        },
        "end": {
          "line": 151,
          "column": 21
        }
      },
      {
        "file": "packages/fx/src/Subject/Subject.ts",
        "start": {
          "line": 192,
          "column": 5
        },
        "end": {
          "line": 192,
          "column": 100
        }
      },
      {
        "file": "packages/fx/src/Subject/Subject.ts",
        "start": {
          "line": 167,
          "column": 5
        },
        "end": {
          "line": 167,
          "column": 60
        }
      }
    ],
    "aliases": [
      "@typed/fx#Subject.Subject.Service"
    ],
    "isAlias": false,
    "parentId": "@typed/fx/Subject#Subject",
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:25486e5281b6e6d47cc2ba20",
    "name": "Service",
    "family": "interface",
    "facets": [
      {
        "family": "interface",
        "syntaxKind": "InterfaceDeclaration",
        "signatures": [
          "interface Service<Self, Id extends string, A, E> extends Subject<A, E, Self> {\n    readonly id: Id;\n    readonly service: Context.Service<Self, Subject<A, E>>;\n    readonly make: (replay?: number) => Layer.Layer<Self, Cause.IllegalArgumentError, Scope.Scope>;\n}"
        ],
        "typeParameters": [
          "Self",
          "Id extends string",
          "A",
          "E"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Subject/Subject.ts",
            "start": {
              "line": 135,
              "column": 3
            },
            "end": {
              "line": 193,
              "column": 4
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly id: Id;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Subject/Subject.ts",
            "start": {
              "line": 151,
              "column": 5
            },
            "end": {
              "line": 151,
              "column": 21
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly make: (replay?: number) => Layer.Layer<Self, Cause.IllegalArgumentError, Scope.Scope>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Subject/Subject.ts",
            "start": {
              "line": 192,
              "column": 5
            },
            "end": {
              "line": 192,
              "column": 100
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly service: Context.Service<Self, Subject<A, E>>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Subject/Subject.ts",
            "start": {
              "line": 167,
              "column": 5
            },
            "end": {
              "line": 167,
              "column": 60
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      }
    ],
    "signatures": [
      "interface Service<Self, Id extends string, A, E> extends Subject<A, E, Self> {\n    readonly id: Id;\n    readonly service: Context.Service<Self, Subject<A, E>>;\n    readonly make: (replay?: number) => Layer.Layer<Self, Cause.IllegalArgumentError, Scope.Scope>;\n}"
    ],
    "typeParameters": [
      "Self",
      "Id extends string",
      "A",
      "E"
    ],
    "summary": "The service-shaped form of a `Subject` created by `Subject.Service`.",
    "sections": {
      "Why": "A service form lets producers and consumers refer to one shared subject through Effect's\ncontext instead of passing the concrete instance through every call.",
      "Ownership and lifetime": "Static Subject operations require `Self` and delegate to the instance installed by `make`.\nThe layer owns that instance in a `Scope` and interrupts it when the layer is released.",
      "Property: id": "The literal context identifier supplied to `Subject.Service`.",
      "Property: id: Why": "Preserves the service's stable identity for diagnostics and layer composition.",
      "Property: id: Ownership and lifetime": "This string literal acquires and retains no resources.",
      "Property: make": "Builds a scoped layer containing one subject with the requested replay capacity.",
      "Property: make: Why": "Packages one shared subject as a normal Effect layer for dependency composition.",
      "Property: make: Ownership and lifetime": "Invalid capacities fail layer construction with `Cause.IllegalArgumentError`. The layer's\nscope owns the subject and interrupts its subscribers and clears its replay buffer on release.",
      "Property: service": "The Effect context service used to retrieve the live subject instance.",
      "Property: service: Why": "Provides the standard Effect service lookup used by every static Subject operation.",
      "Property: service: Ownership and lifetime": "The tag acquires nothing; the layer installed for it owns the concrete subject."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import * as Subject from \"@typed/fx/Subject\"\n\nclass Events extends Subject.Service<Events, string>()(\"Events\") {}\nconst EventsLive = Events.make()"
      },
      {
        "language": "ts",
        "code": "import * as Subject from \"@typed/fx/Subject\"\n\nclass Events extends Subject.Service<Events, string>()(\"Events\") {}\nconst EventsLive = Events.make(1)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Subject/Subject.ts",
        "start": {
          "line": 135,
          "column": 3
        },
        "end": {
          "line": 193,
          "column": 4
        }
      },
      {
        "file": "packages/fx/src/Subject/Subject.ts",
        "start": {
          "line": 151,
          "column": 5
        },
        "end": {
          "line": 151,
          "column": 21
        }
      },
      {
        "file": "packages/fx/src/Subject/Subject.ts",
        "start": {
          "line": 192,
          "column": 5
        },
        "end": {
          "line": 192,
          "column": 100
        }
      },
      {
        "file": "packages/fx/src/Subject/Subject.ts",
        "start": {
          "line": 167,
          "column": 5
        },
        "end": {
          "line": 167,
          "column": 60
        }
      }
    ],
    "since": "1.0.0",
    "category": "Subject services"
  }
}
