Home > @rushstack/heft-config-file > ConfigurationFile > tryLoadConfigurationFileForProjectAsync
ConfigurationFile.tryLoadConfigurationFileForProjectAsync() method
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.
This function is identical to ConfigurationFile.loadConfigurationFileForProjectAsync(), except that it returns undefined
instead of throwing an error if the configuration file cannot be found.
Signature:
tryLoadConfigurationFileForProjectAsync(terminal: ITerminal, projectPath: string, rigConfig?: IRigConfig): Promise<TConfigurationFile | undefined>;
Parameters
Parameter | Type | Description |
---|---|---|
terminal | ITerminal | |
projectPath | string | |
rigConfig | IRigConfig | (Optional) |
Returns:
Promise<TConfigurationFile | undefined>