mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 10:25:42 +01:00
Fix compilation errors
This commit is contained in:
parent
84bdc31efe
commit
f21d9494a2
5 changed files with 8 additions and 8 deletions
|
|
@ -21,7 +21,7 @@ export class WorkerManager {
|
||||||
constructor(defaults: LanguageServiceDefaults) {
|
constructor(defaults: LanguageServiceDefaults) {
|
||||||
this._defaults = defaults;
|
this._defaults = defaults;
|
||||||
this._worker = null;
|
this._worker = null;
|
||||||
this._idleCheckInterval = setInterval(() => this._checkIfIdle(), 30 * 1000);
|
this._idleCheckInterval = window.setInterval(() => this._checkIfIdle(), 30 * 1000);
|
||||||
this._lastUsedTime = 0;
|
this._lastUsedTime = 0;
|
||||||
this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker());
|
this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,10 @@ export class DiagnosticsAdapter {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let handle: any;
|
let handle: number;
|
||||||
this._listener[model.uri.toString()] = model.onDidChangeContent(() => {
|
this._listener[model.uri.toString()] = model.onDidChangeContent(() => {
|
||||||
clearTimeout(handle);
|
clearTimeout(handle);
|
||||||
handle = setTimeout(() => this._doValidate(model.uri, modeId), 500);
|
handle = window.setTimeout(() => this._doValidate(model.uri, modeId), 500);
|
||||||
});
|
});
|
||||||
|
|
||||||
this._doValidate(model.uri, modeId);
|
this._doValidate(model.uri, modeId);
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ export class WorkerManager {
|
||||||
constructor(defaults: LanguageServiceDefaults) {
|
constructor(defaults: LanguageServiceDefaults) {
|
||||||
this._defaults = defaults;
|
this._defaults = defaults;
|
||||||
this._worker = null;
|
this._worker = null;
|
||||||
this._idleCheckInterval = setInterval(() => this._checkIfIdle(), 30 * 1000);
|
this._idleCheckInterval = window.setInterval(() => this._checkIfIdle(), 30 * 1000);
|
||||||
this._lastUsedTime = 0;
|
this._lastUsedTime = 0;
|
||||||
this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker());
|
this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -206,10 +206,10 @@ export class DiagnosticsAdapter extends Adapter {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let handle: any;
|
let handle: number;
|
||||||
const changeSubscription = model.onDidChangeContent(() => {
|
const changeSubscription = model.onDidChangeContent(() => {
|
||||||
clearTimeout(handle);
|
clearTimeout(handle);
|
||||||
handle = setTimeout(maybeValidate, 500);
|
handle = window.setTimeout(maybeValidate, 500);
|
||||||
});
|
});
|
||||||
|
|
||||||
const visibleSubscription = model.onDidChangeAttached(() => {
|
const visibleSubscription = model.onDidChangeAttached(() => {
|
||||||
|
|
|
||||||
|
|
@ -490,7 +490,7 @@ class LanguageServiceDefaultsImpl implements LanguageServiceDefaults {
|
||||||
private _compilerOptions!: CompilerOptions;
|
private _compilerOptions!: CompilerOptions;
|
||||||
private _diagnosticsOptions!: DiagnosticsOptions;
|
private _diagnosticsOptions!: DiagnosticsOptions;
|
||||||
private _workerOptions!: WorkerOptions;
|
private _workerOptions!: WorkerOptions;
|
||||||
private _onDidExtraLibsChangeTimeout: any;
|
private _onDidExtraLibsChangeTimeout: number;
|
||||||
private _inlayHintsOptions!: InlayHintsOptions;
|
private _inlayHintsOptions!: InlayHintsOptions;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
|
@ -606,7 +606,7 @@ class LanguageServiceDefaultsImpl implements LanguageServiceDefaults {
|
||||||
// already scheduled
|
// already scheduled
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._onDidExtraLibsChangeTimeout = setTimeout(() => {
|
this._onDidExtraLibsChangeTimeout = window.setTimeout(() => {
|
||||||
this._onDidExtraLibsChangeTimeout = -1;
|
this._onDidExtraLibsChangeTimeout = -1;
|
||||||
this._onDidExtraLibsChange.fire(undefined);
|
this._onDidExtraLibsChange.fire(undefined);
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue