PolicyFactory
PolicyFactory<
TConfig> =RequiredKeys<TConfig> extendsnever? (config?) =>Policy: (config) =>Policy
Defined in: src/policies/sdk/define-policy.ts:167
Conditional policy factory type.
When TConfig has at least one required key, the factory requires
a config argument. When all keys are optional (or TConfig is the
base PolicyConfig), config is optional.
This closes the gap between “type-safe config” and the runtime
validate callback - the editor catches missing required fields
at compile time.
Type Parameters
Section titled “Type Parameters”TConfig
Section titled “TConfig”TConfig extends PolicyConfig