import { IScope } from '../Scope'; import { TplElem } from '../TplElem'; export type ScopedElement = (HTMLElement | SVGElement) & { $scope: any; $bindKeys?: string[]; $orgDisplay?: string; $ani?: any; __initScope: { parentScope: any; scope: any; }; }; export type IPluginsTplParserFunc = (tplEl: TplElem) => Promise | void; export type IPluginsTplFunc = (tplDoc: DocumentFragment) => Promise | void; export type IPluginsWcPreFunc = (rootScope: IScope, doc: DocumentFragment) => Promise | void; export type IPluginsWcPostFunc = (rootScope: IScope) => Promise | void; export type IPluginsWcApplyFunc = (localScope: IScope, propName: string, flags: string[], value: any) => Promise | void; export type IPluginsWcDestroyFunc = () => Promise | void; export interface IPlugins { name: string; priority?: number; tplPre?: IPluginsTplFunc; tplParse?: IPluginsTplParserFunc; tplPost?: IPluginsTplFunc; wcPre?: IPluginsWcPreFunc; wcPost?: IPluginsWcPostFunc; wcApply?: IPluginsWcApplyFunc; wcDestroy?: IPluginsWcDestroyFunc; scope?: { [k: string]: any; }; }