type ConfiguredFeature<S> = object & { [K in keyof S["settings"]]: { schema: FeatureSettingSchema; value: FeatureValue<S["settings"][K]> | ((context: FeatureSettingContext<S["settings"][K]>) => FeatureValue<S["settings"][K]>) } };A feature as configured, nothing run: what get and list return. Each setting is
{ schema, value }, with the last value written, or the default.
Type Declaration#
| Name | Type | Description |
|---|---|---|
id? |
string |
The feature id; options have none. |
title? |
string |
From the definition. |
description? |
string |
From the definition. |
enabled |
boolean |
The last enabled written, or the definition’s. |
requires |
((context) => boolean) |
null |
when |
object |
The rules for where it shows: base is the starting rule or the last one that replaced it (null for none, 'inherit' for an option that follows its parent), then every extend and narrow written since. |
when.base |
FeatureRule |
|
when.extend |
FeatureRule[] |
- |
when.narrow |
FeatureRule[] |
- |
options |
{ [K in keyof S["options"]]: ConfiguredFeature<S["options"][K]> } |
The options inside it, by name. |
Type Parameters#
| Type Parameter | Default type |
|---|---|
S extends FeatureShape |
FeatureShape |