Cannot use namespace 'Window Location' as a type. code example
Example 1: Property 'editor' does not exist on type 'Window & typeof globalThis'.
declare global {
interface Window { MyNamespace: any; }
}
window.MyNamespace = window.MyNamespace || {};
Example 2: window typescript
(window as any).MyNamespace