diff --git a/packages/backend/src/models/_.ts b/packages/backend/src/models/_.ts index eccd1a70e4..8f8e5c3cce 100644 --- a/packages/backend/src/models/_.ts +++ b/packages/backend/src/models/_.ts @@ -80,6 +80,14 @@ interface AsyncDisposableReference extends AsyncDisposable { readonly value: T; } +// SEEALSO: +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-expect-error +Symbol.dispose ??= Symbol('Symbol.dispose'); +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-expect-error +Symbol.asyncDispose ??= Symbol('Symbol.asyncDispose'); + export interface MiRepository { createTableColumnNames(this: Repository & MiRepository, queryBuilder: InsertQueryBuilder): string[]; createTableColumnNamesWithPrimaryKey(this: Repository & MiRepository, queryBuilder: InsertQueryBuilder): string[]; diff --git a/packages/backend/test/jest.setup.ts b/packages/backend/test/jest.setup.ts index fdb2f685c9..861bc6db66 100644 --- a/packages/backend/test/jest.setup.ts +++ b/packages/backend/test/jest.setup.ts @@ -6,13 +6,6 @@ import { initTestDb, sendEnvResetRequest } from './utils.js'; beforeAll(async () => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error - Symbol.dispose ??= Symbol('Symbol.dispose'); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error - Symbol.asyncDispose ??= Symbol('Symbol.asyncDispose'); - await Promise.all([ initTestDb(false), sendEnvResetRequest(),