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; 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> { export interface MiRepository<T extends ObjectLiteral> {
createTableColumnNames(this: Repository<T> & MiRepository<T>, queryBuilder: InsertQueryBuilder<T>): string[]; createTableColumnNames(this: Repository<T> & MiRepository<T>, queryBuilder: InsertQueryBuilder<T>): string[];
createTableColumnNamesWithPrimaryKey(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'; import { initTestDb, sendEnvResetRequest } from './utils.js';
beforeAll(async () => { 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([ await Promise.all([
initTestDb(false), initTestDb(false),
sendEnvResetRequest(), sendEnvResetRequest(),