Skip to content

Commit 093e81b

Browse files
committed
Fix build, lint
1 parent e04dd25 commit 093e81b

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/common/buffer/Buffer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,7 @@ describe('Buffer', () => {
11991199
let timeoutId = 0;
12001200
let now = 0;
12011201
const clearedTimeouts: number[] = [];
1202-
const scheduledTimeouts = new Map<number, { delay: number; fire: () => void }>();
1202+
const scheduledTimeouts = new Map<number, { delay: number, fire: () => void }>();
12031203
(globalThis as any).setTimeout = ((handler: (...args: any[]) => void, timeout?: number) => {
12041204
const id = ++timeoutId;
12051205
scheduledTimeouts.set(id, {

src/common/buffer/BufferLineStringCache.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55

66
import type { IBufferLineStringCache, IBufferLineStringCacheEntry } from 'common/buffer/BufferLine';
77
import { disposableTimeout } from 'common/Async';
8-
import { Disposable, MutableDisposable, toDisposable } from 'common/Lifecycle';
9-
import type { IDisposable } from 'common/Lifecycle';
8+
import { Disposable, MutableDisposable, toDisposable, type IDisposable } from 'common/Lifecycle';
109

1110
const enum Constants {
12-
CacheTtlMs = 15000
11+
CACHE_TTL_MS = 15000
1312
}
1413

1514
export class BufferLineStringCache extends Disposable implements IBufferLineStringCache {
@@ -54,17 +53,17 @@ export class BufferLineStringCache extends Disposable implements IBufferLineStri
5453
if (this._clearTimeout.value) {
5554
return;
5655
}
57-
this._scheduleClearTimeout(Constants.CacheTtlMs);
56+
this._scheduleClearTimeout(Constants.CACHE_TTL_MS);
5857
}
5958

6059
private _scheduleClearTimeout(timeoutMs: number): void {
6160
this._clearTimeout.value = disposableTimeout(() => {
6261
const elapsed = Date.now() - this._lastAccessTimestamp;
63-
if (elapsed >= Constants.CacheTtlMs) {
62+
if (elapsed >= Constants.CACHE_TTL_MS) {
6463
this.clear();
6564
return;
6665
}
67-
this._scheduleClearTimeout(Constants.CacheTtlMs - elapsed);
66+
this._scheduleClearTimeout(Constants.CACHE_TTL_MS - elapsed);
6867
}, timeoutMs);
6968
}
7069
}

src/headless/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"compilerOptions": {
44
"lib": [
55
"es2015",
6-
"es2016.Array.Include"
6+
"es2016.Array.Include",
7+
"es2021.weakref"
78
],
89
"outDir": "../../out",
910
"types": [

0 commit comments

Comments
 (0)