UNPKG

@leafer/debug

Version:
49 lines (44 loc) 1.37 kB
import { IBooleanMap } from '@leafer/interface'; interface ids { [name: string]: number; } interface names { [name: string]: string; } declare const Run: { currentId: number; currentName: string; idMap: ids; nameMap: names; nameToIdMap: ids; start(name: string, microsecond?: boolean): number; end(id: number, microsecond?: boolean): void; endOfName(name: string, microsecond?: boolean): void; }; declare class Debug { static enable: boolean; static filterList: string[]; static excludeList: string[]; static showWarn: boolean; static showRepaint: boolean; static showHitView: boolean | string | string[]; static showBoundsView: boolean | string | string[]; name: string; repeatMap: IBooleanMap; constructor(name: string); static get(name: string): Debug; static set filter(name: string | string[]); static set exclude(name: string | string[]); log(...messages: unknown[]): void; tip(...messages: unknown[]): void; warn(...messages: unknown[]): void; repeat(name: string, ...messages: unknown[]): void; error(...messages: unknown[]): void; } declare const Plugin: { list: IBooleanMap; add(name: string, ...needPlugins: string[]): void; has(name: string, tip?: boolean): boolean; need(name: string): any; }; export { Debug, Plugin, Run };