Skip to main content
Version: Next

searchConfiguration

Callable

  • searchConfiguration<Driver, EM, Entities>(configExports, contextName, path): Promise<Options<Driver, EM, Entities>>

  • Search a config file for a given contextName.


    Parameters

    • configExports: unknown

      The exports from a config file. Importing is left to the caller.

    • contextName: string = 'default'

      The context name to search the config for.

    • path: string = ''

      Path to display in error messages. Callers can use this to match the path the exports were imported from.

    Returns Promise<Options<Driver, EM, Entities>>

    A promise that resolves with The matching configuration options, as defined in the configExports. The caller is responsible for further adjustments or dependency imports.