Skip to main content
type CpsatRuleConfigByName<Registry> = { [K in keyof Registry & string]: InferCpsatRuleConfig<Registry[K]> };
Maps a rule registry to a name-to-config lookup type.

Type Parameters

Registry

Registry extends CpsatRuleRegistry

Example

type ConfigByName = CpsatRuleConfigByName<typeof builtInCpsatRuleRegistry>;
//    ^? { "max-hours-day": MaxHoursDayConfig; ... }