es-guard
Version:
A tool to check JavaScript compatibility with target environments
45 lines • 1.32 kB
TypeScript
import type { ProjectType } from "./types.js";
interface GlobalState {
verbose: boolean;
debug: boolean;
projectType?: ProjectType;
projectTypeDetected: boolean;
}
export declare let verboseMode: boolean;
export declare let debugMode: boolean;
export declare let projectType: ProjectType | undefined;
export declare let projectTypeDetected: boolean;
/**
* Set the global verbose mode
*/
export declare const setVerboseMode: (enabled: boolean) => void;
/**
* Set the global debug mode
*/
export declare const setDebugMode: (enabled: boolean) => void;
/**
* Get the entire global state
*/
export declare const getGlobalState: () => GlobalState;
/**
* Set multiple global state options at once
*/
export declare const setGlobalState: (options: Partial<GlobalState>) => void;
/**
* Reset global state to defaults
*/
export declare const resetGlobalState: () => void;
/**
* Set the detected project type globally
*/
export declare const setProjectType: (detectedType: ProjectType) => void;
/**
* Get the detected project type (lazy detection if not already done)
*/
export declare const getProjectType: () => ProjectType | undefined;
/**
* Check if project type has been detected
*/
export declare const isProjectTypeDetected: () => boolean;
export {};
//# sourceMappingURL=globalState.d.ts.map