UNPKG

wechaty-puppet

Version:

Abstract Puppet for Wechaty

40 lines 3.17 kB
import type { PuppetSkeleton } from '../puppet/puppet-skeleton.js'; import { WatchdogAgent } from '../agents/watchdog-agent.js'; declare const serviceMixin: <MixinBase extends typeof PuppetSkeleton>(mixinBase: MixinBase) => ((abstract new (...args: any[]) => { readonly __counter: number; readonly __watchdog: WatchdogAgent; start(): Promise<void>; stop(): Promise<void>; state: import("state-switch/dist/esm/src/interfaces.js").StateSwitchInterface; __serviceCtlResettingIndicator: import("state-switch/dist/esm/src/busy-indicator.js").BusyIndicator; __serviceCtlLogger: import("brolog/dist/esm/src/logger.js").Loggable; reset(): Promise<void>; onStart(): Promise<void>; onStop(): Promise<void>; emit: ((..._: any[]) => any) & ((event: any, ...args: any) => boolean); readonly id: string; readonly options: import("../schemas/puppet.js").PuppetOptions; wrapAsync: import("gerror/dist/esm/src/wrap-async-error/wrap-async-error.js").WrapAsync; addListener<E extends keyof import("../puppet/events.js").PuppetEventListener>(event: E, listener: import("../puppet/events.js").PuppetEventListener[E]): any; on<E_1 extends keyof import("../puppet/events.js").PuppetEventListener>(event: E_1, listener: import("../puppet/events.js").PuppetEventListener[E_1]): any; once<E_2 extends keyof import("../puppet/events.js").PuppetEventListener>(event: E_2, listener: import("../puppet/events.js").PuppetEventListener[E_2]): any; prependListener<E_3 extends keyof import("../puppet/events.js").PuppetEventListener>(event: E_3, listener: import("../puppet/events.js").PuppetEventListener[E_3]): any; prependOnceListener<E_4 extends keyof import("../puppet/events.js").PuppetEventListener>(event: E_4, listener: import("../puppet/events.js").PuppetEventListener[E_4]): any; off<E_5 extends keyof import("../puppet/events.js").PuppetEventListener>(event: E_5, listener: import("../puppet/events.js").PuppetEventListener[E_5]): any; removeAllListeners<E_6 extends keyof import("../puppet/events.js").PuppetEventListener>(event?: E_6 | undefined): any; removeListener<E_7 extends keyof import("../puppet/events.js").PuppetEventListener>(event: E_7, listener: import("../puppet/events.js").PuppetEventListener[E_7]): any; eventNames(): (string | symbol)[]; rawListeners<E_8 extends keyof import("../puppet/events.js").PuppetEventListener>(event: E_8): Function[]; listeners<E_9 extends keyof import("../puppet/events.js").PuppetEventListener>(event: E_9): Function[]; listenerCount<E_10 extends keyof import("../puppet/events.js").PuppetEventListener>(event: E_10): number; getMaxListeners(): number; setMaxListeners(maxListeners: number): any; __events: import("../puppet/events.js").PuppetEventListener; }) & { VERSION: string; }) & MixinBase; declare type ServiceMixin = ReturnType<typeof serviceMixin>; declare type ProtectedPropertyServiceMixin = '__counter' | '__watchdog' | '__serviceCtlResettingIndicator' | '__serviceCtlLogger'; export type { ProtectedPropertyServiceMixin, ServiceMixin, }; export { serviceMixin }; //# sourceMappingURL=service-mixin.d.ts.map