import { Constructor, Path } from '@boost/common'; import { Debugger } from '@boost/debug'; import Tool from './Tool'; export interface OptionsObject { [key: string]: any; } export default class ModuleLoader { contract: Constructor | null; debug: Debugger; scopes: string[]; tool: Tool; typeName: string; constructor(tool: Tool, typeName: string, contract?: Constructor | null, scopes?: string[]); /** * Import a class definition from a Node module and instantiate the class * with the provided options object. */ importModule(name: string | Path, args?: any[]): Tm; /** * If loading from an object, extract the module name and use the remaining object * as options for the class instance. */ importModuleFromOptions(baseOptions: OptionsObject, args?: any[]): Tm; /** * Load and or instantiate a module for the `typeName` configuration property. * If a class instance, use directly. If a string, attempt to load and * instantiate from a module. If an object, extract the name and run the previous. */ loadModule(module: string | OptionsObject | Tm, args?: any[]): Tm; /** * Load multiple modules. */ loadModules(modules?: (string | OptionsObject | Tm)[], args?: any[]): Tm[]; } //# sourceMappingURL=ModuleLoader.d.ts.map