Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/heft > HeftConfiguration > tryLoadProjectConfigurationFileAsync

HeftConfiguration.tryLoadProjectConfigurationFileAsync() method

Attempts to load a riggable project configuration file using asynchronous I/O.

Signature:

tryLoadProjectConfigurationFileAsync<TConfigFile>(options: IProjectConfigurationFileSpecification<TConfigFile>, terminal: ITerminal): Promise<TConfigFile | undefined>;

Parameters

Parameter

Type

Description

options

IProjectConfigurationFileSpecification<TConfigFile>

The options for the configuration file loader from @rushstack/heft-config-file. If invoking this function multiple times for the same file, reuse the same object.

terminal

ITerminal

The terminal to log messages during configuration file loading.

Returns:

Promise<TConfigFile | undefined>

A promise that resolves to the configuration file, or undefined if it could not be loaded.