* Type guard that checks if a value is a Window. Uses window self reference checks to * distinguish Window from other values.
(value: unknown)
| 46 | * distinguish Window from other values. |
| 47 | */ |
| 48 | function isWindow(value: unknown): value is Window & typeof globalThis { |
| 49 | return typeof value === 'object' && value != null && 'window' in value && value.window === value; |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Type guard that checks if a value is a Document. Uses nodeType and host property checks to |