Commit b8d56f0c authored by nanahira's avatar nanahira

catchup minato

parent c7984f5e
This diff is collapsed.
......@@ -46,7 +46,7 @@
"typescript": "^4.8.2"
},
"dependencies": {
"minato-decorators": "^2.1.0",
"minato-decorators": "^2.2.0",
"rxjs": "^7.5.6",
"satori-decorators": "^1.1.1"
},
......@@ -69,6 +69,6 @@
"testEnvironment": "node"
},
"peerDependencies": {
"koishi": "^4.9.7"
"koishi": "^4.10.3"
}
}
......@@ -7,7 +7,9 @@ export * from 'satori-decorators/dist/src/decorators/plugin';
export const { DefinePlugin } = koishiRegistrar.pluginDecorators();
export const UseModel = koishiRegistrar.decorateTopLevelAction(
(ctx, obj, ...models: ModelClassType[]) => {
const registrar = new ModelRegistrar(ctx.model);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const registrar = new ModelRegistrar<Tables>(ctx.model);
models.forEach((m) => registrar.registerModel(m));
},
);
......@@ -19,7 +21,9 @@ export const MixinModel = <K extends Keys<Tables>>(
},
): ClassDecorator =>
koishiRegistrar.decorateTopLevelAction((ctx, obj) => {
const registrar = new ModelRegistrar(ctx.model);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const registrar = new ModelRegistrar<Tables>(ctx.model);
registrar.mixinModel(tableName, classDict);
})();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment