TypeScript Professional — Medium
Key points
- 'declare global' enhances the global scope from within a module
- It adds or extends declarations on globalThis, Window, or other ambient globals
- Useful for accessing global variables or functions within a module
- Helps avoid importing global declarations unnecessarily
Ready to go further?
Related questions
