bus: remove legacy import * usage support

This commit is contained in:
undefined committed 2025-03-04 09:55:05 +08:00
1 parent bd63331137
commit aeb9d4cf50
17 files changed
+16 -24

No files matched your search

-8
View File
@@ -114,14 +114,6 @@ export function apply(ctx: Context) {
}
export default app;
export const on = (a, b, c?) => app.on(a, b, c);
export const once = (a, b, c?) => app.once(a, b, c);
export const parallel = app.parallel.bind(app);
export const emit = app.parallel.bind(app);
export const bail = app.bail.bind(app);
// For backward compatibility
export const serial: any = app.parallel.bind(app);
export const broadcast = app.broadcast.bind(app);
global.Hydro.service.bus = app as any;
global.bus = app;
+1 -1
View File
@@ -7,7 +7,7 @@ import { Time } from '@hydrooj/utils';
import { ValidationError } from '../error';
import { Logger } from '../logger';
import { load } from '../options';
import * as bus from './bus';
import bus from './bus';
const logger = new Logger('mongo');
export interface Collections { }
+1 -1
View File
@@ -4,7 +4,7 @@ import type { StatusUpdate } from '@hydrooj/utils/lib/sysinfo';
import * as sysinfo from '@hydrooj/utils/lib/sysinfo';
import { Context } from '../context';
import { Logger } from '../logger';
import * as bus from './bus';
import bus from './bus';
import db from './db';
const coll = db.collection('status');