@veams/base
Version:
Base Class for Components and Services
32 lines (31 loc) • 996 B
TypeScript
import { mixinType } from '@veams/helpers/lib/function/mixin';
export interface BaseConfig {
namespace?: string;
el?: HTMLElement;
options?: any;
}
declare class Base {
options: any;
_namespace: string;
_instanceId: string | number;
_el: HTMLElement;
mixin: mixinType;
/**
* Constructor
*
* to save standard elements like el and options and
* execute initialize as default method.
*
* @param {Object} BaseConfig - See interface.
* @param {String} BaseConfig.namespace - Add custom namespace to your class.
* @param {Object} BaseConfig.el - Save element in class.
* @param {Object} BaseConfig.options - Options passed by init process.
* @param {Object} opts [{}] - Object which contains options of the extended class.
*/
constructor({namespace, el, options}: BaseConfig, opts?: {});
namespace: string;
instanceId: string | number;
_options: any;
el: HTMLElement;
}
export default Base;