import { Component } from './components'; import { ComponentManager } from './components/internal'; import { BentoState, EventEmitterLike } from './interfaces'; import { Plugin } from './plugins'; import { PluginManager } from './plugins/internal'; import { PropertyManager } from './properties/internal'; import { VariableManager } from './variables/internal'; import { ComponentReference, PluginReference } from './references'; export interface BentoOptions { createID?(len?: number): string; eventEmitter?(): EventEmitterLike; } export declare class Bento { readonly properties: PropertyManager; readonly variables: VariableManager; readonly plugins: PluginManager; readonly components: ComponentManager; readonly options: BentoOptions; readonly version: string; constructor(options?: BentoOptions); /** * Alias for Bento.components.addComponent() * @param component Component * * @see ComponentManager#addComponent * @returns See Bento.components.addComponent() */ addComponent(component: Component): Promise; /** * Alias for Bento.components.getComponent() * @param reference Component name or reference * * @see ComponentManager#getComponent * @returns See Bento.components.getComponent() */ getComponent(reference: ComponentReference): Promise; /** * Alias for Bento.components.removeComponent() * @param name Component name * * @see ComponentManager#removeComponent * @returns See Bento.components.removeComponent() */ removeComponent(name: string): Promise; /** * Alias for Bento.plugins.addPlugin() * @param plugin Plugin * * @see PluginManager#addPlugin * @returns See Bento.plugins.addPlugin() */ addPlugin(plugin: Plugin): Promise; /** * Alias for Bento.plugins.getPlugin() * @param reference Plugin name or reference * * @see PluginManager#getPlugin * @returns See Bento.plugins.getPlugin() */ getPlugin(reference: PluginReference): Promise; /** * Alias for Bento.plugins.removePlugin() * @param name Plugin name * * @see PluginManager#removePlugin * @returns See Bento.plugins.removePlugin() */ removePlugin(name: string): Promise; /** * Alias for Bento.plugins.addPlugins() * @param plugins Array of Plugins * * @see PluginManager#addPlugins * @returns See Bento.plugins.addPlugins() */ addPlugins(plugins: Array): Promise; /** * Alias for Bento.properties.hasProperty() * @param name Property name * * @see PropertyManager#hasProperty * @returns See Bento.properties.hasProperty() */ hasProperty(name: string): boolean; /** * Alias for Bento.properties.setProperty() * @param name Property name * @param value Property value * * @see PropertyManager#setProperty * @returns See Bento.properties.setProperty() */ setProperty(name: string, value: any): void; /** * Alias for Bento.properties.getProperty() * @param name Property name * * @see PropertyManager#getProperty * @returns See Bento.properties.getProperty() */ getProperty(name: string): any; /** * Alias for Bento.properties.setProperties() * @param properties Object with property key: value pairs * * @see PropertyManager#setProperties * @returns See Bento.properties.setProperties() */ setProperties(properties: { [key: string]: any; }): void; /** * Alias for Bento.variables.hasVariable() * @param name Variable name * * @see VariableManager#hasVariable * @returns See Bento.variables.hasVariable() */ hasVariable(name: string): boolean; /** * Alias for Bento.variables.getVariable() * @param name Variable name * * @see VariableManager#getVariable * @returns See Bento.variables.getVariable() */ getVariable(name: string): string; /** * Alias for Bento.variables.setVariable() * @param name Variable name * @param value Variable value * * @see VariableManager#setVariable * @returns See Bento.variables.setVariable() */ setVariable(name: string, value: any): void; /** * Alias for Bento.variables.deleteVariable() * @param name Variable name * * @see VariableManager#deleteVariable * @returns See Bento.variables.deleteVariable() */ deleteVariable(name: string): void; /** * Verifies the state of your Application, Will throw an error at anything * "weird" looking. For example if any components are pending when this is * called it will throw * * @returns Application state Object */ verify(): Promise; }