/**
 * Use this Globals object in lieu of `window` (browser) or `global` (node). This provides typesafety!
 *
 * Fields from `window` are provided via typescript `Partial<>`. This means that code using Globals must
 * dynamically check for the existence of the window (because it's possible we could be running outside of a browser, such as in node or a unit test).
 *
 * If you are certain to be running in FEA then use FEAGlobals.
 *
 * @example
 * import { Globals } from "../common/Globals";
 *
 * // Check to make sure the window function exists
 * if(Globals.addEventListener) Globals.addEventListener("onload", handler)
 *
 * // Globals contains types for Finsemble's globals
 * if(Globals.fin) console.log("we're in a desktop");
 *
 */
export let Globals = (typeof window === "undefined" ? global : window);
/**
 * Use this Globals object *only* when you are certain to be running inside FEA. This object has guaranteed
 * fin and finsembleWindow members.
 */
export let FEAGlobals = (typeof window === "undefined" ? global : window);
/**
 * Use this Globals object *only* when you are certain to be running as a Freestanding app. This object has guaranteed
 * fin and finsembleWindow members.
 */
export let FreestandingGlobals = (typeof window === "undefined" ? global : window);
//# sourceMappingURL=Globals.js.map