Skip to content

Commit a0f3144

Browse files
committed
have two files to declare globals, allow monaco-edt to see one of them
1 parent 3c372cf commit a0f3144

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

src/tsconfig.monaco.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"include": [
1919
"typings/require.d.ts",
2020
"typings/thenable.d.ts",
21+
"typings/vscode-globals-product.d.ts",
2122
"vs/loader.d.ts",
2223
"vs/monaco.d.ts",
2324
"vs/editor/*",

src/typings/vscode-globals.d.ts renamed to src/typings/vscode-globals-modules.d.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,9 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
declare global {
6+
// AMD2ESM mirgation relevant
77

8-
/**
9-
* @deprecated You MUST use `IProductService` whenever possible.
10-
*/
11-
var _VSCODE_PRODUCT_JSON: Record<string, any>;
12-
/**
13-
* @deprecated You MUST use `IProductService` whenever possible.
14-
*/
15-
var _VSCODE_PACKAGE_JSON: Record<string, any>;
8+
declare global {
169

1710
/**
1811
* @deprecated node modules that are in used in a context that
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
// AMD2ESM mirgation relevant
7+
8+
declare global {
9+
10+
/**
11+
* @deprecated You MUST use `IProductService` whenever possible.
12+
*/
13+
var _VSCODE_PRODUCT_JSON: Record<string, any>;
14+
/**
15+
* @deprecated You MUST use `IProductService` whenever possible.
16+
*/
17+
var _VSCODE_PACKAGE_JSON: Record<string, any>;
18+
19+
}
20+
21+
// fake export to make global work
22+
export { }

0 commit comments

Comments
 (0)