mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Expose setMaximunWorkerIdleTime
This commit is contained in:
parent
b9333be154
commit
867476531d
4 changed files with 51 additions and 12 deletions
|
|
@ -95,11 +95,12 @@ export class DiagnostcsAdapter extends Adapter {
|
|||
|
||||
private _doValidate(resource: Uri): void {
|
||||
this._worker(resource).then(worker => {
|
||||
let promises: Promise<ts.Diagnostic[]>[] = [];
|
||||
if (!this._defaults.diagnosticsOptions.noSyntaxValidation) {
|
||||
const promises: Promise<ts.Diagnostic[]>[] = [];
|
||||
const {noSyntaxValidation, noSemanticValidation} = this._defaults.getDiagnosticsOptions();
|
||||
if (!noSyntaxValidation) {
|
||||
promises.push(worker.getSyntacticDiagnostics(resource.toString()));
|
||||
}
|
||||
if (!this._defaults.diagnosticsOptions.noSemanticValidation) {
|
||||
if (!noSemanticValidation) {
|
||||
promises.push(worker.getSemanticDiagnostics(resource.toString()));
|
||||
}
|
||||
return Promise.join(promises);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue