| 1 |
/*--------------------------------------------------------------------------------------------- |
| 2 |
* Copyright (c) Microsoft Corporation. All rights reserved. |
| 3 |
* Licensed under the MIT License. See License.txt in the project root for license information. |
| 4 |
*--------------------------------------------------------------------------------------------*/ |
| 5 |
|
| 6 |
export type CodeWindow = Window & typeof globalThis & { |
| 7 |
readonly vscodeWindowId: number; |
| 8 |
}; |
| 9 |
|
| 10 |
export function ensureCodeWindow(targetWindow: Window, fallbackWindowId: number): asserts targetWindow is CodeWindow { |
| 11 |
} |
| 12 |
|
| 13 |
// eslint-disable-next-line no-restricted-globals |
| 14 |
export const mainWindow = (typeof window === 'object' ? window : globalThis) as CodeWindow; |