From d02198417b7ec38cbaf8f92904592b43a2ce8a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Sat, 1 Jun 2024 16:51:07 +0900 Subject: [PATCH] chore(backend): polyfill position --- packages/backend/src/models/_.ts | 8 ++++++++ packages/backend/test/jest.setup.ts | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) 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(),