This commit is contained in:
Xu Chang 2024-11-12 11:00:39 +08:00
parent e4d3b31b39
commit 2b087d9df5
2 changed files with 4 additions and 4 deletions

4
lib/AppLoader.d.ts vendored
View File

@ -15,14 +15,14 @@ export declare class AppLoader<ED extends EntityDict & BaseEntityDict, Cxt exten
protected dataSubscriber?: DataSubscriber<ED, Cxt>;
protected synchronizer?: Synchronizer<ED, Cxt>;
protected contextBuilder: (store: DbStore<ED, Cxt>) => Cxt;
private nsSocket;
private nsSocket?;
private requireSth;
protected makeContext(cxtStr?: string, headers?: IncomingHttpHeaders): Promise<Cxt>;
/**
* configuration
*/
private getConfiguration;
constructor(path: string, nsSubscribe: Namespace, nsSocket: Namespace, nsServer?: Namespace);
constructor(path: string, nsSubscribe?: Namespace, nsSocket?: Namespace, nsServer?: Namespace);
protected registerTrigger(trigger: Trigger<ED, keyof ED, Cxt>): void;
protected initTriggers(): void;
protected initSocket(): void;

View File

@ -29,7 +29,7 @@ export class AppLoader<ED extends EntityDict & BaseEntityDict, Cxt extends Backe
protected dataSubscriber?: DataSubscriber<ED, Cxt>;
protected synchronizer?: Synchronizer<ED, Cxt>;
protected contextBuilder: (store: DbStore<ED, Cxt>) => Cxt;
private nsSocket: Namespace;
private nsSocket?: Namespace;
private requireSth(filePath: string): any {
const depFilePath = join(this.path, filePath);
@ -85,7 +85,7 @@ export class AppLoader<ED extends EntityDict & BaseEntityDict, Cxt extends Backe
};
}
constructor(path: string, nsSubscribe: Namespace, nsSocket: Namespace, nsServer?: Namespace) {
constructor(path: string, nsSubscribe?: Namespace, nsSocket?: Namespace, nsServer?: Namespace) {
super(path);
const { dbConfig } = this.getConfiguration();
const { storageSchema } = require(`${path}/lib/oak-app-domain/Storage`);