chore(backend): polyfill position

This commit is contained in:
Acid Chicken (硫酸鶏) 2024-06-01 16:51:07 +09:00
parent 9366515565
commit d02198417b
No known key found for this signature in database
GPG Key ID: 3E87B98A3F6BAB99
2 changed files with 8 additions and 7 deletions

View File

@ -80,6 +80,14 @@ interface AsyncDisposableReference<T> extends AsyncDisposable {
readonly value: T;
}
// SEEALSO: <https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html#using-declarations-and-explicit-resource-management>
// 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<T extends ObjectLiteral> {
createTableColumnNames(this: Repository<T> & MiRepository<T>, queryBuilder: InsertQueryBuilder<T>): string[];
createTableColumnNamesWithPrimaryKey(this: Repository<T> & MiRepository<T>, queryBuilder: InsertQueryBuilder<T>): string[];

View File

@ -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(),