(windows: ReadonlyArray<ScheduleWindow>): <Self, S extends Spec>(
tag: HyperlinkTag<Self, S>
) => HyperlinkTag<Self, S & ScheduleGroupSpec>
(source: HyperlinkTag<any, ScheduleHyperlinkSpec>): <
Self,
S extends Spec
>(
tag: HyperlinkTag<Self, S>
) => HyperlinkTag<Self, S>Attach a schedule to a daemon (pipeable). Two forms, distinguished by argument:
- inline windows — the daemon owns an in-memory schedule seeded with
windows, and its contract gains thescheduleverb group (entries/set/add/clear):
class Matches extends Daemon.Tag<Matches>()("app/Matches").pipe(
Daemon.schedule([Daemon.window(kickoff, final)]),
) {}- an external Schedule — the daemon is gated by a shared schedule resource and gains no schedule verbs (they live on the HyperService, which can arm many daemons at once):
class IngestScores extends Daemon.Tag<IngestScores>()("app/IngestScores").pipe(
Daemon.schedule(SeasonSchedule),
) {}export function function schedule(windows: ReadonlyArray<ScheduleWindow>): <Self, S extends Spec>(tag: HyperlinkTag<Self, S>) => HyperlinkTag<Self, S & ScheduleGroupSpec> (+1 overload)Attach a schedule to a daemon (pipeable). Two forms, distinguished by argument:
- inline windows — the daemon owns an in-memory schedule seeded with
windows, and its
contract gains the schedule verb group (entries / set / add / clear):
class Matches extends Daemon.Tag<Matches>()("app/Matches").pipe(
Daemon.schedule([Daemon.window(kickoff, final)]),
) {}
- **an external
Schedule
** — the daemon is gated by a shared schedule resource and
gains no schedule verbs (they live on the HyperService, which can arm many daemons at once):
class IngestScores extends Daemon.Tag<IngestScores>()("app/IngestScores").pipe(
Daemon.schedule(SeasonSchedule),
) {}
schedule(
windows: ReadonlyArray<ScheduleWindow>windows: interface ReadonlyArray<T>ReadonlyArray<ScheduleWindow>,
): <function (type parameter) Self in <Self, S extends Spec>(tag: HyperlinkTag<Self, S>): HyperlinkTag<Self, S & ScheduleGroupSpec>Self, function (type parameter) S in <Self, S extends Spec>(tag: HyperlinkTag<Self, S>): HyperlinkTag<Self, S & ScheduleGroupSpec>S extends Spec>(tag: HyperlinkTag<Self, S>(parameter) tag: {
description: string | undefined;
key: Identifier;
of: (this: void, self: Simplify<{ readonly [K in keyof S]: S[K] extends Hyperlink.FromLocalMethod<infer M> ? Hyperlink.InjectLocal<M, Self> : S[K] extends Hyperlink.LocalMethod<infer T> ? Hyperlink.LocalEffect<T, never, Self> : S[K] extends Hy…;
context: (self: Simplify<{ readonly [K in keyof S]: S[K] extends Hyperlink.FromLocalMethod<infer M> ? Hyperlink.InjectLocal<M, Self> : S[K] extends Hyperlink.LocalMethod<infer T> ? Hyperlink.LocalEffect<T, never, Self> : S[K] extends Hyperlink.Defa…;
use: (f: (service: Simplify<{ readonly [K in keyof S]: S[K] extends Hyperlink.FromLocalMethod<infer M> ? Hyperlink.InjectLocal<M, Self> : S[K] extends Hyperlink.LocalMethod<infer T> ? Hyperlink.LocalEffect<T, never, Self> : S[K] extends Hyperli…;
useSync: (f: (service: Simplify<{ readonly [K in keyof S]: S[K] extends Hyperlink.FromLocalMethod<infer M> ? Hyperlink.InjectLocal<M, Self> : S[K] extends Hyperlink.LocalMethod<infer T> ? Hyperlink.LocalEffect<T, never, Self> : S[K] extends Hyperli…;
Identifier: Identifier;
Service: Shape;
stack: string | undefined;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
tag: interface HyperlinkTag<Self, S extends Spec, Svc = Simplify<{ readonly [K in keyof S]: S[K] extends FromLocalMethod<infer M> ? InjectLocal<M, Self> : S[K] extends LocalMethod<infer T> ? LocalEffect<...> : S[K] extends DefaultMethod<...> ? F : S[K] extends { ...; } ? SuccessOf<...> : S[K] extends { ...; } ? Subscribable<...> : S[K] extends { ...; } ? ClientMethod<...> : S[K] extends Spec ? Simplify<...> : never; }>>The type of a HyperService tag carrying spec S — what
Hyperlink.Tag
produces
(and what you extend). Lets a consumer write
<S extends Spec>(tag: HyperlinkTag<Self, S>) and read the spec through named types
(
specOf
/
groupOf
) instead of a Parameters<typeof specOf> workaround.
HyperlinkTag<function (type parameter) Self in <Self, S extends Spec>(tag: HyperlinkTag<Self, S>): HyperlinkTag<Self, S & ScheduleGroupSpec>Self, function (type parameter) S in <Self, S extends Spec>(tag: HyperlinkTag<Self, S>): HyperlinkTag<Self, S & ScheduleGroupSpec>S>) => interface HyperlinkTag<Self, S extends Spec, Svc = Simplify<{ readonly [K in keyof S]: S[K] extends FromLocalMethod<infer M> ? InjectLocal<M, Self> : S[K] extends LocalMethod<infer T> ? LocalEffect<...> : S[K] extends DefaultMethod<...> ? F : S[K] extends { ...; } ? SuccessOf<...> : S[K] extends { ...; } ? Subscribable<...> : S[K] extends { ...; } ? ClientMethod<...> : S[K] extends Spec ? Simplify<...> : never; }>>The type of a HyperService tag carrying spec S — what
Hyperlink.Tag
produces
(and what you extend). Lets a consumer write
<S extends Spec>(tag: HyperlinkTag<Self, S>) and read the spec through named types
(
specOf
/
groupOf
) instead of a Parameters<typeof specOf> workaround.
HyperlinkTag<function (type parameter) Self in <Self, S extends Spec>(tag: HyperlinkTag<Self, S>): HyperlinkTag<Self, S & ScheduleGroupSpec>Self, function (type parameter) S in <Self, S extends Spec>(tag: HyperlinkTag<Self, S>): HyperlinkTag<Self, S & ScheduleGroupSpec>S & type ScheduleGroupSpec = {
readonly schedule: typeof scheduleGroupSpec
}
The schedule group as a nested
Spec
fragment (what
schedule
's inline form grafts).
ScheduleGroupSpec>;
export function function schedule(source: HyperlinkTag<any, ScheduleHyperlinkSpec>): <Self, S extends Spec>(tag: HyperlinkTag<Self, S>) => HyperlinkTag<Self, S> (+1 overload)Attach a schedule to a daemon (pipeable). Two forms, distinguished by argument:
- inline windows — the daemon owns an in-memory schedule seeded with
windows, and its
contract gains the schedule verb group (entries / set / add / clear):
class Matches extends Daemon.Tag<Matches>()("app/Matches").pipe(
Daemon.schedule([Daemon.window(kickoff, final)]),
) {}
- **an external
Schedule
** — the daemon is gated by a shared schedule resource and
gains no schedule verbs (they live on the HyperService, which can arm many daemons at once):
class IngestScores extends Daemon.Tag<IngestScores>()("app/IngestScores").pipe(
Daemon.schedule(SeasonSchedule),
) {}
schedule(
source: HyperlinkTag<any, ScheduleHyperlinkSpec>(parameter) source: {
key: Identifier;
Service: {
entries: Hyperlink.Subscribable<ReadonlyArray<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>>;
get: (payload: { id: string }) => Effect.Effect<Option.Option<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>, never, never>;
has: (payload: { id: string }) => Effect.Effect<boolean, never, never>;
set: (payload: ReadonlyArray<{ startAt: DateTime.Utc; id?: string | undefined; stopAt?: DateTime.Utc | undefined }>) => Effect.Effect<void, never, never>;
add: (payload: { startAt: DateTime.Utc; id?: string | undefined; stopAt?: DateTime.Utc | undefined }) => Effect.Effect<void, never, never>;
upsert: (payload: { startAt: DateTime.Utc; id?: string | undefined; stopAt?: DateTime.Utc | undefined }) => Effect.Effect<void, never, never>;
remove: (payload: { id: string }) => Effect.Effect<boolean, never, never>;
removeMany: (payload: ReadonlyArray<string>) => Effect.Effect<number, never, never>;
clear: Effect.Effect<void, never, never>;
};
description: string | undefined;
of: (this: void, self: { readonly entries: Hyperlink.Subscribable<ReadonlyArray<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>>; readonly get: (payload: { id: string }) => Effe…;
context: (self: { readonly entries: Hyperlink.Subscribable<ReadonlyArray<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>>; readonly get: (payload: { id: string }) => Effect.Effect<Op…;
use: (f: (service: { readonly entries: Hyperlink.Subscribable<ReadonlyArray<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>>; readonly get: (payload: { id: string }) => Effect.Ef…;
useSync: (f: (service: { readonly entries: Hyperlink.Subscribable<ReadonlyArray<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>>; readonly get: (payload: { id: string }) => Effect.Ef…;
Identifier: Identifier;
stack: string | undefined;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
source: interface HyperlinkTag<Self, S extends Spec, Svc = Simplify<{ readonly [K in keyof S]: S[K] extends FromLocalMethod<infer M> ? InjectLocal<M, Self> : S[K] extends LocalMethod<infer T> ? LocalEffect<...> : S[K] extends DefaultMethod<...> ? F : S[K] extends { ...; } ? SuccessOf<...> : S[K] extends { ...; } ? Subscribable<...> : S[K] extends { ...; } ? ClientMethod<...> : S[K] extends Spec ? Simplify<...> : never; }>>The type of a HyperService tag carrying spec S — what
Hyperlink.Tag
produces
(and what you extend). Lets a consumer write
<S extends Spec>(tag: HyperlinkTag<Self, S>) and read the spec through named types
(
specOf
/
groupOf
) instead of a Parameters<typeof specOf> workaround.
HyperlinkTag<any, type ScheduleHyperlinkSpec = {
entries: Hyperlink.Marked<Hyperlink.Method<undefined, Schema.$Array<Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>;
readonly startAt: Schema.DateTimeUtc;
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>>, Schema.Never, true, Hyperlink.MethodAnnotations & {
description: string;
}, Hyperlink.Derive>, {
readonly _tag: "ref";
}>;
get: Hyperlink.Method<{
readonly id: Schema.String;
}, Schema.Option<Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>;
readonly startAt: Schema.DateTimeUtc;
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>>, Schema.Never, false, Hyperlink.MethodAnnotations & {
...;
}, Hyperlink.Derive>;
... 6 more ...;
clear: Hyperlink.Method<...>;
}
The standalone
Schedule
HyperService's spec.
ScheduleHyperlinkSpec>,
): <function (type parameter) Self in <Self, S extends Spec>(tag: HyperlinkTag<Self, S>): HyperlinkTag<Self, S>Self, function (type parameter) S in <Self, S extends Spec>(tag: HyperlinkTag<Self, S>): HyperlinkTag<Self, S>S extends Spec>(tag: HyperlinkTag<Self, S>(parameter) tag: {
description: string | undefined;
key: Identifier;
of: (this: void, self: Simplify<{ readonly [K in keyof S]: S[K] extends Hyperlink.FromLocalMethod<infer M> ? Hyperlink.InjectLocal<M, Self> : S[K] extends Hyperlink.LocalMethod<infer T> ? Hyperlink.LocalEffect<T, never, Self> : S[K] extends Hy…;
context: (self: Simplify<{ readonly [K in keyof S]: S[K] extends Hyperlink.FromLocalMethod<infer M> ? Hyperlink.InjectLocal<M, Self> : S[K] extends Hyperlink.LocalMethod<infer T> ? Hyperlink.LocalEffect<T, never, Self> : S[K] extends Hyperlink.Defa…;
use: (f: (service: Simplify<{ readonly [K in keyof S]: S[K] extends Hyperlink.FromLocalMethod<infer M> ? Hyperlink.InjectLocal<M, Self> : S[K] extends Hyperlink.LocalMethod<infer T> ? Hyperlink.LocalEffect<T, never, Self> : S[K] extends Hyperli…;
useSync: (f: (service: Simplify<{ readonly [K in keyof S]: S[K] extends Hyperlink.FromLocalMethod<infer M> ? Hyperlink.InjectLocal<M, Self> : S[K] extends Hyperlink.LocalMethod<infer T> ? Hyperlink.LocalEffect<T, never, Self> : S[K] extends Hyperli…;
Identifier: Identifier;
Service: Shape;
stack: string | undefined;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
tag: interface HyperlinkTag<Self, S extends Spec, Svc = Simplify<{ readonly [K in keyof S]: S[K] extends FromLocalMethod<infer M> ? InjectLocal<M, Self> : S[K] extends LocalMethod<infer T> ? LocalEffect<...> : S[K] extends DefaultMethod<...> ? F : S[K] extends { ...; } ? SuccessOf<...> : S[K] extends { ...; } ? Subscribable<...> : S[K] extends { ...; } ? ClientMethod<...> : S[K] extends Spec ? Simplify<...> : never; }>>The type of a HyperService tag carrying spec S — what
Hyperlink.Tag
produces
(and what you extend). Lets a consumer write
<S extends Spec>(tag: HyperlinkTag<Self, S>) and read the spec through named types
(
specOf
/
groupOf
) instead of a Parameters<typeof specOf> workaround.
HyperlinkTag<function (type parameter) Self in <Self, S extends Spec>(tag: HyperlinkTag<Self, S>): HyperlinkTag<Self, S>Self, function (type parameter) S in <Self, S extends Spec>(tag: HyperlinkTag<Self, S>): HyperlinkTag<Self, S>S>) => interface HyperlinkTag<Self, S extends Spec, Svc = Simplify<{ readonly [K in keyof S]: S[K] extends FromLocalMethod<infer M> ? InjectLocal<M, Self> : S[K] extends LocalMethod<infer T> ? LocalEffect<...> : S[K] extends DefaultMethod<...> ? F : S[K] extends { ...; } ? SuccessOf<...> : S[K] extends { ...; } ? Subscribable<...> : S[K] extends { ...; } ? ClientMethod<...> : S[K] extends Spec ? Simplify<...> : never; }>>The type of a HyperService tag carrying spec S — what
Hyperlink.Tag
produces
(and what you extend). Lets a consumer write
<S extends Spec>(tag: HyperlinkTag<Self, S>) and read the spec through named types
(
specOf
/
groupOf
) instead of a Parameters<typeof specOf> workaround.
HyperlinkTag<function (type parameter) Self in <Self, S extends Spec>(tag: HyperlinkTag<Self, S>): HyperlinkTag<Self, S>Self, function (type parameter) S in <Self, S extends Spec>(tag: HyperlinkTag<Self, S>): HyperlinkTag<Self, S>S>;
export function function schedule(windows: ReadonlyArray<ScheduleWindow>): <Self, S extends Spec>(tag: HyperlinkTag<Self, S>) => HyperlinkTag<Self, S & ScheduleGroupSpec> (+1 overload)Attach a schedule to a daemon (pipeable). Two forms, distinguished by argument:
- inline windows — the daemon owns an in-memory schedule seeded with
windows, and its
contract gains the schedule verb group (entries / set / add / clear):
class Matches extends Daemon.Tag<Matches>()("app/Matches").pipe(
Daemon.schedule([Daemon.window(kickoff, final)]),
) {}
- **an external
Schedule
** — the daemon is gated by a shared schedule resource and
gains no schedule verbs (they live on the HyperService, which can arm many daemons at once):
class IngestScores extends Daemon.Tag<IngestScores>()("app/IngestScores").pipe(
Daemon.schedule(SeasonSchedule),
) {}
schedule(
windowsOrSource: | ReadonlyArray<ScheduleWindow>
| HyperlinkTag<any, any, any>
windowsOrSource: interface ReadonlyArray<T>ReadonlyArray<ScheduleWindow> | interface HyperlinkTag<Self, S extends Spec, Svc = Simplify<{ readonly [K in keyof S]: S[K] extends FromLocalMethod<infer M> ? InjectLocal<M, Self> : S[K] extends LocalMethod<infer T> ? LocalEffect<...> : S[K] extends DefaultMethod<...> ? F : S[K] extends { ...; } ? SuccessOf<...> : S[K] extends { ...; } ? Subscribable<...> : S[K] extends { ...; } ? ClientMethod<...> : S[K] extends Spec ? Simplify<...> : never; }>>The type of a HyperService tag carrying spec S — what
Hyperlink.Tag
produces
(and what you extend). Lets a consumer write
<S extends Spec>(tag: HyperlinkTag<Self, S>) and read the spec through named types
(
specOf
/
groupOf
) instead of a Parameters<typeof specOf> workaround.
HyperlinkTag<any, any, any>,
): (tag: HyperlinkTag<any, any, any>(parameter) tag: {
description: string | undefined;
key: Identifier;
of: (this: void, self: any) => any;
context: (self: any) => Context.Context<any>;
use: (f: (service: any) => Effect.Effect<A, E, R>) => Effect.Effect<A, E, any>;
useSync: (f: (service: any) => A) => Effect.Effect<A, never, any>;
Identifier: Identifier;
Service: Shape;
stack: string | undefined;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
tag: interface HyperlinkTag<Self, S extends Spec, Svc = Simplify<{ readonly [K in keyof S]: S[K] extends FromLocalMethod<infer M> ? InjectLocal<M, Self> : S[K] extends LocalMethod<infer T> ? LocalEffect<...> : S[K] extends DefaultMethod<...> ? F : S[K] extends { ...; } ? SuccessOf<...> : S[K] extends { ...; } ? Subscribable<...> : S[K] extends { ...; } ? ClientMethod<...> : S[K] extends Spec ? Simplify<...> : never; }>>The type of a HyperService tag carrying spec S — what
Hyperlink.Tag
produces
(and what you extend). Lets a consumer write
<S extends Spec>(tag: HyperlinkTag<Self, S>) and read the spec through named types
(
specOf
/
groupOf
) instead of a Parameters<typeof specOf> workaround.
HyperlinkTag<any, any, any>) => interface HyperlinkTag<Self, S extends Spec, Svc = Simplify<{ readonly [K in keyof S]: S[K] extends FromLocalMethod<infer M> ? InjectLocal<M, Self> : S[K] extends LocalMethod<infer T> ? LocalEffect<...> : S[K] extends DefaultMethod<...> ? F : S[K] extends { ...; } ? SuccessOf<...> : S[K] extends { ...; } ? Subscribable<...> : S[K] extends { ...; } ? ClientMethod<...> : S[K] extends Spec ? Simplify<...> : never; }>>The type of a HyperService tag carrying spec S — what
Hyperlink.Tag
produces
(and what you extend). Lets a consumer write
<S extends Spec>(tag: HyperlinkTag<Self, S>) and read the spec through named types
(
specOf
/
groupOf
) instead of a Parameters<typeof specOf> workaround.
HyperlinkTag<any, any, any> {
// A type-guard (not bare `Array.isArray`) so the else-branch narrows to the tag: `Array.isArray`
// alone won't remove a `ReadonlyArray` from the union.
const const isWindows: (
x:
| ReadonlyArray<ScheduleWindow>
| HyperlinkTag<any, any, any>
) => x is ReadonlyArray<ScheduleWindow>
isWindows = (
x: | ReadonlyArray<ScheduleWindow>
| HyperlinkTag<any, any, any>
x: interface ReadonlyArray<T>ReadonlyArray<ScheduleWindow> | interface HyperlinkTag<Self, S extends Spec, Svc = Simplify<{ readonly [K in keyof S]: S[K] extends FromLocalMethod<infer M> ? InjectLocal<M, Self> : S[K] extends LocalMethod<infer T> ? LocalEffect<...> : S[K] extends DefaultMethod<...> ? F : S[K] extends { ...; } ? SuccessOf<...> : S[K] extends { ...; } ? Subscribable<...> : S[K] extends { ...; } ? ClientMethod<...> : S[K] extends Spec ? Simplify<...> : never; }>>The type of a HyperService tag carrying spec S — what
Hyperlink.Tag
produces
(and what you extend). Lets a consumer write
<S extends Spec>(tag: HyperlinkTag<Self, S>) and read the spec through named types
(
specOf
/
groupOf
) instead of a Parameters<typeof specOf> workaround.
HyperlinkTag<any, any, any>,
): x: | ReadonlyArray<ScheduleWindow>
| HyperlinkTag<any, any, any>
x is interface ReadonlyArray<T>ReadonlyArray<ScheduleWindow> => var Array: ArrayConstructorArray.ArrayConstructor.isArray(arg: any): arg is any[]isArray(x: | ReadonlyArray<ScheduleWindow>
| HyperlinkTag<any, any, any>
x);
if (const isWindows: (
x:
| ReadonlyArray<ScheduleWindow>
| HyperlinkTag<any, any, any>
) => x is ReadonlyArray<ScheduleWindow>
isWindows(windowsOrSource: | ReadonlyArray<ScheduleWindow>
| HyperlinkTag<any, any, any>
windowsOrSource)) {
const const mode: ScheduleModemode: type ScheduleMode =
| {
readonly _tag: "inline"
readonly windows: ReadonlyArray<ScheduleWindow>
}
| {
readonly _tag: "reference"
readonly source: HyperlinkTag<
unknown,
ScheduleHyperlinkSpec
>
}
How a daemon is scheduled — read by the runtime to build the right impl.
ScheduleMode = { _tag: "inline"_tag: "inline", windows: ReadonlyArray<ScheduleWindow>windows: windowsOrSource: | ReadonlyArray<ScheduleWindow>
| HyperlinkTag<any, any, any>
windowsOrSource };
return (tag: Hyperlink.HyperlinkTag<any, any, any>(parameter) tag: {
description: string | undefined;
key: Identifier;
of: (this: void, self: any) => any;
context: (self: any) => Context.Context<any>;
use: (f: (service: any) => Effect.Effect<A, E, R>) => Effect.Effect<A, E, any>;
useSync: (f: (service: any) => A) => Effect.Effect<A, never, any>;
Identifier: Identifier;
Service: Shape;
stack: string | undefined;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
tag) => const augmentTag: (
tag: HyperlinkTag<any, any, any>,
flatAddition: FlatSpec,
stamp: object
) => HyperlinkTag<any, any, any>
Graft path-keyed leaves onto a tag's flat spec and rebuild its RPC group in place, optionally
stamping combinator metadata. Reuses the tag's already-claimed wire key (no re-claim). Returns
the same (mutated) tag — so class X extends Tag()(...).pipe(combinator) {} extends it.
augmentTag(tag: Hyperlink.HyperlinkTag<any, any, any>(parameter) tag: {
description: string | undefined;
key: Identifier;
of: (this: void, self: any) => any;
context: (self: any) => Context.Context<any>;
use: (f: (service: any) => Effect.Effect<A, E, R>) => Effect.Effect<A, E, any>;
useSync: (f: (service: any) => A) => Effect.Effect<A, never, any>;
Identifier: Identifier;
Service: Shape;
stack: string | undefined;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
tag, const scheduleGroupFlat: Hyperlink.FlatSpecFlatten the one-level schedule group to path keys (schedule.entries, …).
scheduleGroupFlat, { [const scheduleModeSym: typeof scheduleModeSymWhere a daemon tag's schedule mode (inline windows vs external reference) is stowed.
scheduleModeSym]: const mode: {
readonly _tag: "inline"
readonly windows: ReadonlyArray<ScheduleWindow>
}
mode });
}
const const mode: ScheduleModemode: type ScheduleMode =
| {
readonly _tag: "inline"
readonly windows: ReadonlyArray<ScheduleWindow>
}
| {
readonly _tag: "reference"
readonly source: HyperlinkTag<
unknown,
ScheduleHyperlinkSpec
>
}
How a daemon is scheduled — read by the runtime to build the right impl.
ScheduleMode = { _tag: "reference"_tag: "reference", source: Hyperlink.HyperlinkTag<any, any, any>(property) source: {
description: string | undefined;
key: Identifier;
of: (this: void, self: any) => any;
context: (self: any) => Context.Context<any>;
use: (f: (service: any) => Effect.Effect<A, E, R>) => Effect.Effect<A, E, any>;
useSync: (f: (service: any) => A) => Effect.Effect<A, never, any>;
Identifier: Identifier;
Service: Shape;
stack: string | undefined;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
source: windowsOrSource: | ReadonlyArray<ScheduleWindow>
| HyperlinkTag<any, any, any>
(parameter) windowsOrSource: {
description: string | undefined;
key: Identifier;
of: (this: void, self: any) => any;
context: (self: any) => Context.Context<any>;
use: (f: (service: any) => Effect.Effect<A, E, R>) => Effect.Effect<A, E, any>;
useSync: (f: (service: any) => A) => Effect.Effect<A, never, any>;
Identifier: Identifier;
Service: Shape;
stack: string | undefined;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
windowsOrSource };
// reference form: shape is unchanged — just stamp the mode (identity, like `distributed`).
return (tag: Hyperlink.HyperlinkTag<any, any, any>(parameter) tag: {
description: string | undefined;
key: Identifier;
of: (this: void, self: any) => any;
context: (self: any) => Context.Context<any>;
use: (f: (service: any) => Effect.Effect<A, E, R>) => Effect.Effect<A, E, any>;
useSync: (f: (service: any) => A) => Effect.Effect<A, never, any>;
Identifier: Identifier;
Service: Shape;
stack: string | undefined;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
tag) => var Object: ObjectConstructorProvides functionality common to all JavaScript objects.
Object.ObjectConstructor.assign<Hyperlink.HyperlinkTag<any, any, any>, {
[scheduleModeSym]: {
readonly _tag: "reference";
readonly source: HyperlinkTag<unknown, ScheduleHyperlinkSpec>;
};
}>(target: Hyperlink.HyperlinkTag<any, any, any>, source: {
[scheduleModeSym]: {
readonly _tag: "reference";
readonly source: HyperlinkTag<unknown, ScheduleHyperlinkSpec>;
};
}): Hyperlink.HyperlinkTag<any, any, any> & {
[scheduleModeSym]: {
readonly _tag: "reference";
readonly source: HyperlinkTag<unknown, ScheduleHyperlinkSpec>;
};
} (+3 overloads)
Copy the values of all of the enumerable own properties from one or more source objects to a
target object. Returns the target object.
assign(tag: Hyperlink.HyperlinkTag<any, any, any>(parameter) tag: {
description: string | undefined;
key: Identifier;
of: (this: void, self: any) => any;
context: (self: any) => Context.Context<any>;
use: (f: (service: any) => Effect.Effect<A, E, R>) => Effect.Effect<A, E, any>;
useSync: (f: (service: any) => A) => Effect.Effect<A, never, any>;
Identifier: Identifier;
Service: Shape;
stack: string | undefined;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
tag, { [const scheduleModeSym: typeof scheduleModeSymWhere a daemon tag's schedule mode (inline windows vs external reference) is stowed.
scheduleModeSym]: const mode: {
readonly _tag: "reference"
readonly source: HyperlinkTag<
unknown,
ScheduleHyperlinkSpec
>
}
mode });
}