Commit 59193c4b authored by nanahira's avatar nanahira

fix type again

parent f71c4ca5
import { ModelClassType, ModelFieldDef, PrimaryKeyDef } from '../def';
import { Keys, Tables } from 'koishi';
import { Keys } from 'cosmotype';
export interface MetadataArrayMap {
ModelUnique: string | number;
......@@ -9,7 +9,7 @@ export interface MetadataArrayMap {
export interface MetadataMap {
ModelField: ModelFieldDef;
ModelTableName: Keys<Tables>;
ModelTableName: Keys<any>;
ModelPrimaryKey: PrimaryKeyDef;
ModelForeignKey: [string, string];
ChildModel: ModelClassType;
......
......@@ -168,6 +168,8 @@ export class ModelRegistrar<Tables> {
if (!tableName) {
throw new Error(`Model of ${cls.name} is not defined`);
}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.model.extend(tableName, ...registrar.getModelResult());
Object.assign(
this.model.tables[tableName].internal,
......
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