Skip to content

Commit

Permalink
Fix compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaeumer committed May 14, 2021
1 parent dca3c1a commit 2645fb5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions client/src/common/proposed.diagnostic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {

import {
Proposed, ClientCapabilities, ServerCapabilities, DocumentSelector, DidOpenTextDocumentNotification, DidChangeTextDocumentNotification,
DidSaveTextDocumentNotification, DidCloseTextDocumentNotification, LinkedMap, Touch, RAL, VersionedTextDocumentIdentifier
DidSaveTextDocumentNotification, DidCloseTextDocumentNotification, LinkedMap, Touch, RAL
} from 'vscode-languageserver-protocol';

import {
Expand Down Expand Up @@ -320,13 +320,11 @@ class BackgroundScheduler {
private readonly diagnosticRequestor: DiagnosticRequestor;
private endDocument: TextDocument | undefined;
private readonly documents: LinkedMap<string, TextDocument>;
private interval: number;
private intervalHandle: Disposable | undefined;

public constructor(diagnosticRequestor: DiagnosticRequestor) {
this.diagnosticRequestor = diagnosticRequestor;
this.documents = new LinkedMap();
this.interval = 0;
}

public add(textDocument: TextDocument): void {
Expand Down
10 changes: 5 additions & 5 deletions client/src/common/utils/async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */

import { RAL } from 'vscode-languageserver-protocol';
import { RAL, Disposable } from 'vscode-languageserver-protocol';

export interface ITask<T> {
(): T;
Expand All @@ -12,7 +12,7 @@ export interface ITask<T> {
export class Delayer<T> {

public defaultDelay: number;
private timeout: RAL.TimeoutHandle | undefined;
private timeout: Disposable | undefined;
private completionPromise: Promise<T> | undefined;
private onSuccess: ((value: T | Promise<T> | undefined) => void) | undefined;
private task: ITask<T> | undefined;
Expand Down Expand Up @@ -66,7 +66,7 @@ export class Delayer<T> {
}

public isTriggered(): boolean {
return this.timeout !== void 0;
return this.timeout !== undefined;
}

public cancel(): void {
Expand All @@ -75,8 +75,8 @@ export class Delayer<T> {
}

private cancelTimeout(): void {
if (this.timeout !== void 0) {
RAL().timer.clearTimeout(this.timeout);
if (this.timeout !== undefined) {
this.timeout.dispose();
this.timeout = undefined;
}
}
Expand Down

0 comments on commit 2645fb5

Please sign in to comment.