- commit
- 57ddfa026f76467f7f2c8e845df03f7943b10f06
- parent
- a5a9cf18087a90c17e1a9101324f26cc49c816ce
- author
- Dami <dami.etoile@gmail.com>
| M | package/ | 12 | +++++------- |
@@ -7,11 +7,9 @@ import { getRuntime, getRuntimeDiagnostics, subscribeRuntimeDiagnostics } from "
77 88 export type LofiDevelopmentBridge = InspectorAdapter;99 10-declare global {11- interface Window {12- __LOFI_INSPECTOR__?: LofiDevelopmentBridge;13- }14-}10+type LofiDevelopmentGlobal = typeof globalThis & {11+ __LOFI_INSPECTOR__?: LofiDevelopmentBridge;12+};1513 1614 const stateListeners = new Set<() => void>();1715 let transportPaused = false;@@ -120,10 +118,10 @@ const bridge: LofiDevelopmentBridge = {
120118 };121119 122120 if (typeof document !== "undefined") {123- (globalThis as typeof globalThis & Window).__LOFI_INSPECTOR__ = bridge;121+ (globalThis as LofiDevelopmentGlobal).__LOFI_INSPECTOR__ = bridge;124122 const mounted = mountInspector(bridge);125123 import.meta.hot?.dispose(() => {126124 mounted.dispose();127- delete (globalThis as typeof globalThis & Window).__LOFI_INSPECTOR__;125+ delete (globalThis as LofiDevelopmentGlobal).__LOFI_INSPECTOR__;128126 });129127 }