Search Docs
Loading...
Skip to content

Type Alias: FeatureNodeDefinitionOf

type FeatureNodeDefinitionOf<S> = object & { [K in keyof S["settings"]]: FeatureSettingSchema & { default: FeatureValue<S["settings"][K]> } } & keyof S["options"] extends never ? object : object;

A feature or option as define takes it for a registered shape: the settings and options of its FeatureRegistry entry, each setting with its JSON Schema and a default of the registered type.

Type Declaration#

Name Type
enabled? boolean
when? FeatureRule
requires()? (context) => boolean

Type Parameters#

Type Parameter
S extends FeatureShape