Skip to main content

Type Alias: ConfigurationProvider<T>

ConfigurationProvider<T>: object

Implement this type to create a custom configuration provider.

Type Parameters

T

Type declaration

load()

load: (filename) => T & object

A function that loads the configuration from the given file.

Parameters

filename: string

The path to the configuration file (resolved by ConfigurationProvider#resolve).

Returns

T & object

The loaded configuration object.

resolve()

resolve: (configurationRoot) => string | undefined

A function that searches for a configuration file in the given directory and returns the path to the file. Should handle being passed either a directory to search, or a file to check.

Parameters

configurationRoot: string

Returns

string | undefined

The path to the configuration file, or undefined if no applicable file was found.

Defined in

packages/parser/src/lib/config-files/configuration-loader.ts:6