Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/heft-config-file > NonProjectConfigurationFile > tryLoadConfigurationFile

NonProjectConfigurationFile.tryLoadConfigurationFile() method

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.

This function is identical to NonProjectConfigurationFile.loadConfigurationFile(), except that it returns undefined instead of throwing an error if the configuration file cannot be found.

Signature:

tryLoadConfigurationFile(terminal: ITerminal, filePath: string): TConfigurationFile | undefined;

Parameters

Parameter

Type

Description

terminal

ITerminal

filePath

string

Returns:

TConfigurationFile | undefined