UNPKG

slightning-coco-widget

Version:

SLIGHTNING 的 CoCo 控件框架。

20 lines (19 loc) 816 B
import { ExportConfig } from "../export"; import { StandardTypes, Types } from "../types"; import { Utils } from "../utils/utils"; import { Widget } from "../widget"; export interface Adapter { getSuperWidget(types: Types): Widget; exportWidget(types: StandardTypes, widget: Widget, config?: ExportConfig | null | undefined): void; emit(this: {}, key: string, ...args: unknown[]): void; Logger: new (types: Types, widget: {}) => LoggerAdapter; utils: Utils; } export interface LoggerAdapter { log(this: this, message: string): void; info(this: this, message: string): void; warn(this: this, message: string): void; error(this: this, message: string): void; } export declare function getDefaultAdapter(): Adapter; export declare function setDefaultAdapter(adapter: Adapter): void;