import { Component } from '../../../components'; import { DetectedComponent } from '../../../decorators/internal'; import { PluginAPI } from '../../PluginAPI'; /** * Abstract loader class containing an interface to the outside and core functionality */ export declare abstract class ComponentLoader { /** * The currently attached Bento instance */ api: PluginAPI; /** * This method can and will be called by components desiring to load peer components * * @param args Loader specific implementation */ abstract loadComponents(...args: Array): Promise; /** * Detects if a value is component-like. * Component-like values are objects that are not null and functions * * @param v The value to check * @returns boolean */ private componentLike; /** * Detects if a value is class-like. * Class-like values are functions that have a prototype object on them * * @param v The value to check * @returns boolean */ private classLike; /** * Tries to find a component in a node module. A component can be a class or an object. * The instantiate() method will attempt an instantiation if it's a class. * * @param nodeModule The node module that should be checked * * @returns DetectedComponent */ protected findComponent(nodeModule: any): DetectedComponent; /** * Instantiates a component if it is a class. If it isn't the object is returned. * * @param component The detected component * * @returns Instantiated Component */ protected instantiate(component: DetectedComponent): T; }