NMV 0.8.0 - Big refactor and linting fixes

This commit is contained in:
Casper Warden
2025-01-17 23:37:54 +00:00
parent 3870861b0a
commit 53659008ac
210 changed files with 17588 additions and 18300 deletions

View File

@@ -3,8 +3,8 @@ import { Subject } from 'rxjs';
export class BatchQueue<T>
{
private running = false;
private pending: Set<T> = new Set<T>();
private onResult = new Subject<{
private readonly pending: Set<T> = new Set<T>();
private readonly onResult = new Subject<{
batch: Set<T>,
failed?: Set<T>,
exception?: unknown
@@ -26,7 +26,7 @@ export class BatchQueue<T>
if (!this.running)
{
this.processBatch().catch((_e) =>
this.processBatch().catch((_e: unknown) =>
{
// ignore
});
@@ -61,7 +61,7 @@ export class BatchQueue<T>
if (results.exception !== undefined)
{
subs.unsubscribe();
reject(results.exception);
reject(new Error(String(results.exception)));
return;
}
if (waiting.size === 0)
@@ -116,7 +116,7 @@ export class BatchQueue<T>
this.running = false;
if (this.pending.size > 0)
{
this.processBatch().catch((_e) =>
this.processBatch().catch((_e: unknown) =>
{
// ignore
});