Skip to main content Link Search Menu Expand Document (external link)

castAsBoolean() function

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Utility function for custom functions. Cast resolved option values 'true' and 'false' to their Boolean equivalents. Any other values are untouched.

Signature:

export declare function castAsBoolean(options: RuntimeOptions, ...names: string[]): void;

Parameters

Parameter Type Description
options RuntimeOptions Options object, which may be modified.
names string[] Names of options that should have boolean values.

Returns:

void