Skip to main content

Call Signature

Create a partial schedule for composition via .with(). Unlike schedule, all fields are optional. Use this for schedule fragments that layer rules, coverage, or other config onto a complete base schedule. The returned value is still a Schedule to preserve the existing public API. TODO: Revisit the public type names for schedule fragments. The current Schedule return type is a workable compromise, but it can obscure that partialSchedule() creates a fragment that may require later declarations.

Type Parameters

TRules

TRules extends readonly unknown[] = readonly []

Config

Config extends BuiltInPartialScheduleConfigInput<TRules> = BuiltInPartialScheduleConfigInput<TRules>

Parameters

config

Config & object

Returns

Schedule<BuiltInCpsatRuleRegistry, ShapeFromPartialConfig<Config>>

Example

Call Signature

Create a partial schedule for composition via .with(). Unlike schedule, all fields are optional. Use this for schedule fragments that layer rules, coverage, or other config onto a complete base schedule. The returned value is still a Schedule to preserve the existing public API. TODO: Revisit the public type names for schedule fragments. The current Schedule return type is a workable compromise, but it can obscure that partialSchedule() creates a fragment that may require later declarations.

Type Parameters

TCustomRuleRegistry

TCustomRuleRegistry extends CpsatRuleRegistry

TRules

TRules extends readonly unknown[] = readonly []

Config

Config extends CustomPartialScheduleConfigInput<TCustomRuleRegistry, TRules> = CustomPartialScheduleConfigInput<TCustomRuleRegistry, TRules>

Parameters

config

Config & object

Returns

Schedule<BuiltInCpsatRuleRegistry & TCustomRuleRegistry, ShapeFromPartialConfig<Config>>

Example