UNPKG

@kwiz/common

Version:

KWIZ common utilities and helpers for M365 platform

34 lines (33 loc) 1.28 kB
interface IKWizComGlobalDebug { _debug: boolean; _consoleLoggerFilter: string[]; On: (Permanent?: boolean) => void; Off: () => void; ToggleLogs: (categoryName: string, silent?: boolean) => void; /** purge all cache storage (SPFx may keep scripts cached) */ PurgeCache: (options?: { skipCookies?: boolean; skipStorage?: boolean; onlyKWizComCaches?: boolean; }) => Promise<{ success: boolean; error?: any; message?: string; }>; } /** Get the global debug object. it will only be on the top window so don't put it in the IKWizComGlobals */ export declare function GetGlobalDebug(): { Debug?: IKWizComGlobalDebug; } & IKWizComGlobals; export declare function isDebug(): boolean; /** returns true if this is a kwizcom production/test tenant */ export declare function isKWizComTenant(): boolean; export declare function isDebugOnKWizComTenant(): boolean; export declare function consoleLoggerFilter(): string[]; export declare function waitIfDebug(seconds?: number): Promise<void>; export declare function trackChangesToObject<T>(parent: unknown, objectName: string, tracker: { onBeforeGet?: (v: T) => void; onBeforeSet?: (v: T) => void; onAfterSet?: (v: T) => void; }): void; export {};