Skip to content

get

get<K>(configOpt): configOpts[K]

Retrieves the value of a specified configuration option.

K extends string | number

configOpt: K

The key of the configuration option to retrieve.

configOpts[K]

The value of the configuration option.

Throws an error if the requested configuration option is not set.

// Retrieve the current API instance
const apiInstance = get('api');

| Generic not configured error.

config/src/Service.ts:55