MagicMirror/module-types.ts

32 lines
1.0 KiB
TypeScript
Raw Normal View History

2018-01-06 15:04:54 +02:00
type ModuleProperties = {
2021-09-11 11:55:51 +02:00
defaults?: object;
start?(): void;
getHeader?(): string;
getTemplate?(): string;
getTemplateData?(): object;
notificationReceived?(notification: string, payload: any, sender: object): void;
socketNotificationReceived?(notification: string, payload: any): void;
suspend?(): void;
resume?(): void;
getDom?(): HTMLElement;
getStyles?(): string[];
[key: string]: any;
2018-01-06 15:04:54 +02:00
};
2018-01-06 14:51:32 +02:00
export declare const Module: {
2018-01-06 15:04:54 +02:00
register(moduleName: string, moduleProperties: ModuleProperties): void;
2018-01-06 14:51:32 +02:00
};
export declare const Log: {
2021-09-11 11:55:51 +02:00
info(message?: any, ...optionalParams: any[]): void;
log(message?: any, ...optionalParams: any[]): void;
error(message?: any, ...optionalParams: any[]): void;
warn(message?: any, ...optionalParams: any[]): void;
group(groupTitle?: string, ...optionalParams: any[]): void;
groupCollapsed(groupTitle?: string, ...optionalParams: any[]): void;
groupEnd(): void;
time(timerName?: string): void;
timeEnd(timerName?: string): void;
timeStamp(timerName?: string): void;
};