Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/heft-config-file > ProjectConfigurationFile > tryLoadConfigurationFileForProject

ProjectConfigurationFile.tryLoadConfigurationFileForProject() 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 ProjectConfigurationFile.loadConfigurationFileForProject(), except that it returns undefined instead of throwing an error if the configuration file cannot be found.

Signature:

tryLoadConfigurationFileForProject(terminal: ITerminal, projectPath: string, rigConfig?: IRigConfig): TConfigurationFile | undefined;

Parameters

Parameter

Type

Description

terminal

ITerminal

projectPath

string

rigConfig

IRigConfig

(Optional)

Returns:

TConfigurationFile | undefined