Fixing monaco build errors related to require

This commit is contained in:
Matt Bierner 2018-10-03 14:39:58 -07:00
parent f7456ebf90
commit 45d48f350e
4 changed files with 16 additions and 2 deletions

View file

@ -32,5 +32,8 @@
"include": [
"./typings",
"./vs"
],
"exclude": [
"./typings/require-monaco.d.ts"
]
}

View file

@ -17,6 +17,7 @@
},
"include": [
"typings/require.d.ts",
"./typings/require-monaco.d.ts",
"typings/thenable.d.ts",
"typings/es6-promise.d.ts",
"typings/lib.array-ext.d.ts",
@ -35,4 +36,4 @@
"exclude": [
"node_modules/*"
]
}
}

10
src/typings/require-monaco.d.ts vendored Normal file
View file

@ -0,0 +1,10 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
interface NodeRequire {
(moduleName: string): any;
}
declare var require: NodeRequire;

View file

@ -305,7 +305,7 @@ export function timeout(millis: number, token?: CancellationToken): CancelablePr
});
}
export function disposableTimeout(handler: TimerHandler, timeout = 0): IDisposable {
export function disposableTimeout(handler: Function, timeout = 0): IDisposable {
const timer = setTimeout(handler, timeout);
return {
dispose() {