interface / @typed/fx/Push

Push.Class

Constructable static type produced by Push.Service.

Package version
2.0.0-beta.7
Category
Push services
Since
1.0.0
Member of
Push

Import

import { Push } from "@typed/fx/Push";

Access Push.Class through the imported Push export. Its declaration below describes the member.

Signatures

interface Class<Self, Id extends string, A, E, B, E2> extends Service<Self, Id, A, E, B, E2> {
    new (): Service<Self, Id, A, E, B, E2>;
}

Why

The construct signature supports the class-extension pattern used by Effect services while retaining the complete static Push API.

Ownership and lifetime

Constructing the class returns its static service value; it does not acquire, subscribe to, or dispose the installed Push.

Construct signatures

Returns the static service value when used through the class pattern.

Construct signatures: Why

The construct signature allows class X extends Push.Service(...) while preserving the service’s precise static type.

Construct signatures: Ownership and lifetime

Construction acquires nothing; the resulting value still resolves its concrete Push from the current Effect Context.

Examples

import * as Push from "@typed/fx/Push"

class Events extends Push.Service<Events, string, never, string>()("Events") {}
const ServiceClass: Push.Push.Class<Events, "Events", string, never, string, never> = Events
import * as Push from "@typed/fx/Push"
class Events extends Push.Service<Events, string, never, string>()("Events") {}
const events = new Events()

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source