Merge VS Code 1.23.1 (#1520)

This commit is contained in:
Matt Irvine
2018-06-05 11:24:51 -07:00
committed by GitHub
parent e3baf5c443
commit 0c58f09e59
3651 changed files with 74249 additions and 48599 deletions

View File

@@ -42,7 +42,7 @@ declare let self: any;
export const LANGUAGE_DEFAULT = 'en';
// OS detection
if (typeof process === 'object' && typeof process.nextTick === 'function') {
if (typeof process === 'object' && typeof process.nextTick === 'function' && typeof process.platform === 'string') {
_isWindows = (process.platform === 'win32');
_isMacintosh = (process.platform === 'darwin');
_isLinux = (process.platform === 'linux');
@@ -120,6 +120,20 @@ export const translationsConfigFile = _translationsConfigFile;
const _globals = (typeof self === 'object' ? self : typeof global === 'object' ? global : {} as any);
export const globals: any = _globals;
let _setImmediate: (callback: (...args: any[]) => void) => number = null;
export function setImmediate(callback: (...args: any[]) => void): number {
if (_setImmediate === null) {
if (globals.setImmediate) {
_setImmediate = globals.setImmediate.bind(globals);
} else if (typeof process !== 'undefined' && typeof process.nextTick === 'function') {
_setImmediate = process.nextTick.bind(process);
} else {
_setImmediate = globals.setTimeout.bind(globals);
}
}
return _setImmediate(callback);
}
export const enum OperatingSystem {
Windows = 1,
Macintosh = 2,