Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/heft-config-file > CustomValidationFunction

CustomValidationFunction type

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

A function to invoke after schema validation to validate the configuration file. If this function returns any value other than true, the configuration file API will throw an error indicating that custom validation failed. If the function wishes to provide its own error message, it may use any combination of the terminal and throwing its own error.

Signature:

export type CustomValidationFunction<TConfigurationFile> = (configurationFile: TConfigurationFile, resolvedConfigurationFilePathForLogging: string, terminal: ITerminal) => boolean;

References: ITerminal