UNPKG

@resk/core

Version:

An innovative TypeScript framework that empowers developers to build applications with a fully decorator-based architecture for efficient resource management. By combining the power of decorators with a resource-oriented design, DecorRes enhances code cla

25 lines (24 loc) 920 B
/** * The global object that provides access to the global scope in various environments. * This object is determined based on the following checks: * - If `window` is defined, it returns `window` (for browsers). * - If `self` is defined, it returns `self` (for web workers). * - If `global` is defined, it returns `global` (for Node.js). * - If `globalThis` is defined, it returns `globalThis` (for modern environments). * - If none of the above are defined, it returns an empty object. * * @returns {object} The global object or an empty object if none are found. * * @example * // Accessing the global object * const globalScope = gbl; * console.log(globalScope); // Logs the global object based on the environment * * @example * // Using the global object to access a global variable * if (gbl.myGlobalVar) { * console.log(gbl.myGlobalVar); * } */ declare const gbl: {}; export default gbl;