Skip to content

ApplyOptionalOptions

Defined in: projects/ngx-signal-schema/src/lib/structure/optional-block.ts:136

Options for applying rules or schemas to an OptionalBlock.

T

The type of the data inside the block.

K

The type of the enabled property in meta.

optional isEnabled?: (enabled) => boolean

Defined in: projects/ngx-signal-schema/src/lib/structure/optional-block.ts:152

A function to determine if the block is enabled based on the meta.enabled value. Supports complex logic when K is not just a boolean.

K

The value of meta.enabled.

boolean

True if the block should be treated as enabled.


optional otherwise?: SchemaOrSchemaFn<T>

Defined in: projects/ngx-signal-schema/src/lib/structure/optional-block.ts:144

Inline rules or schema applied to the data node when the block is considered disabled.


then: SchemaOrSchemaFn<T>

Defined in: projects/ngx-signal-schema/src/lib/structure/optional-block.ts:140

Inline rules or schema applied to the data node when the block is considered enabled.