(startAt: Date): ScheduleWindow
(id: string, startAt: Date): ScheduleWindowA point window (open-ended — no stop). The leading id is optional.
Process.at(startDate) // nameless
Process.at("daily-2am", startDate)export function function at(startAt: Date): ScheduleWindow (+1 overload)A point window (open-ended — no stop). The leading id is optional.
Process.at(startDate) // nameless
Process.at("daily-2am", startDate)
at(startAt: DatestartAt: Date): ScheduleWindow;
export function function at(id: string, startAt: Date): ScheduleWindow (+1 overload)A point window (open-ended — no stop). The leading id is optional.
Process.at(startDate) // nameless
Process.at("daily-2am", startDate)
at(id: stringid: string, startAt: DatestartAt: Date): ScheduleWindow;
export function function at(startAt: Date): ScheduleWindow (+1 overload)A point window (open-ended — no stop). The leading id is optional.
Process.at(startDate) // nameless
Process.at("daily-2am", startDate)
at(idOrStartAt: string | DateidOrStartAt: string | Date, maybeStartAt: Date | undefinedmaybeStartAt?: Date): ScheduleWindow {
if (idOrStartAt: string | DateidOrStartAt instanceof var Date: DateConstructorEnables basic storage and retrieval of dates and times.
Date) {
return { ScheduleWindow.id: Option.Option<string>id: import OptionOption.const none: <
string
>() => Option.Option<string>
Creates an Option representing the absence of a value.
When to use
Use to represent a missing or uninitialized value, such as returning "no
result" from a function.
Details
- Returns
Option<never>, which is a subtype of Option<A> for any A
- Always returns the same singleton instance
Example (Creating an empty Option)
import { Option } from "effect"
// ┌─── Option<never>
// ▼
const noValue = Option.none()
console.log(noValue)
// Output: { _id: 'Option', _tag: 'None' }
none(), ScheduleWindow.startAt: DatestartAt: idOrStartAt: DateidOrStartAt, ScheduleWindow.stopAt: Option.Option<Date>stopAt: import OptionOption.const none: <
Date
>() => Option.Option<Date>
Creates an Option representing the absence of a value.
When to use
Use to represent a missing or uninitialized value, such as returning "no
result" from a function.
Details
- Returns
Option<never>, which is a subtype of Option<A> for any A
- Always returns the same singleton instance
Example (Creating an empty Option)
import { Option } from "effect"
// ┌─── Option<never>
// ▼
const noValue = Option.none()
console.log(noValue)
// Output: { _id: 'Option', _tag: 'None' }
none() };
}
if (maybeStartAt: Date | undefinedmaybeStartAt === var undefinedundefined) {
throw new var Error: ErrorConstructor
new (message?: string, options?: ErrorOptions) => Error (+1 overload)
Error("Process.at(id, startAt): startAt is required");
}
return { ScheduleWindow.id: Option.Option<string>id: const toWindowId: (
id: string | undefined
) => Option.Option<string>
toWindowId(idOrStartAt: stringidOrStartAt), ScheduleWindow.startAt: DatestartAt: maybeStartAt: DatemaybeStartAt, ScheduleWindow.stopAt: Option.Option<Date>stopAt: import OptionOption.const none: <
Date
>() => Option.Option<Date>
Creates an Option representing the absence of a value.
When to use
Use to represent a missing or uninitialized value, such as returning "no
result" from a function.
Details
- Returns
Option<never>, which is a subtype of Option<A> for any A
- Always returns the same singleton instance
Example (Creating an empty Option)
import { Option } from "effect"
// ┌─── Option<never>
// ▼
const noValue = Option.none()
console.log(noValue)
// Output: { _id: 'Option', _tag: 'None' }
none() };
}