{"version":3,"file":"globalObject.mjs","names":[],"sources":["../../src/tools/globalObject.ts"],"sourcesContent":["// eslint-disable-next-line no-restricted-imports\nimport type { BrowserNavigator, CookieStore, ProfilerConstructor } from '../browser/browser.types'\n\n/**\n * Reflects values available in the global object (e.g. window or self). We use our own type to\n * adjust the expectations across the codebase when the native types offered by TypeScript aren't\n * sufficient.\n *\n * For example, we can mark a property as optional when it is not available in all browsers, or add\n * new browser APIs that are not yet typed properly in the typescript lib.\n *\n * Feel free to add more properties as needed, or mark some properties as optional when they are.\n */\nexport interface GlobalObject extends Omit<\n  // eslint-disable-next-line no-restricted-syntax\n  typeof globalThis,\n  'queueMicrotask' | 'cookieStore' | 'Profiler' | 'window'\n> {\n  navigator: BrowserNavigator\n\n  // cookieStore is not available in all browsers yet\n  cookieStore?: CookieStore\n\n  // queueMicrotask is not available in all browsers yet\n  queueMicrotask?: typeof queueMicrotask\n\n  // Profiler is not available in all browsers yet\n  Profiler?: ProfilerConstructor\n\n  // window is not available in SSR environments\n  window?: Window\n}\n\n// eslint-disable-next-line no-restricted-syntax\nexport const globalObject = globalThis as GlobalObject\n\nexport const isWorkerEnvironment = 'WorkerGlobalScope' in globalObject\n"],"mappings":";AAkCA,MAAa,eAAe;AAE5B,MAAa,sBAAsB,uBAAuB"}