Commit dfebc4c9 authored by nanahira's avatar nanahira

catchup

parent 87c26576
......@@ -11,7 +11,7 @@
"dependencies": {
"reflect-metadata": "^0.1.13",
"schemastery": "^1.0.0",
"schemastery-gen": "^1.0.1",
"schemastery-gen": "^1.0.2",
"typed-reflector": "^1.0.5"
},
"devDependencies": {
......@@ -2729,9 +2729,9 @@
"integrity": "sha512-TwjfFcstdU1rSkV9/dATEk8YFLa1OOxCuGT2mMepZxpMAATQdVm7Fw2tRr4tEsrqAitP+X1/8P5Vv51OUBClAw=="
},
"node_modules/schemastery-gen": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-1.0.1.tgz",
"integrity": "sha512-eArpoM3kSft6Dsx5IIrwUwdyI563WHnar4s7wspWofwTNx2FA6ZDqVcFD1DjCvJUorgTc7f+OMAJRFkNuWNNSg==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-1.0.2.tgz",
"integrity": "sha512-n7JHMWpQbAxh/xFY3Ns7c2TpZEVIV88dt1A3LE/UvFPSH13bowerKpz+OAtNVuSITnisMekGMV6T480H/sYGTw==",
"dependencies": {
"lodash": "^4.17.21",
"reflect-metadata": "^0.1.13",
......@@ -5294,9 +5294,9 @@
"integrity": "sha512-TwjfFcstdU1rSkV9/dATEk8YFLa1OOxCuGT2mMepZxpMAATQdVm7Fw2tRr4tEsrqAitP+X1/8P5Vv51OUBClAw=="
},
"schemastery-gen": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-1.0.1.tgz",
"integrity": "sha512-eArpoM3kSft6Dsx5IIrwUwdyI563WHnar4s7wspWofwTNx2FA6ZDqVcFD1DjCvJUorgTc7f+OMAJRFkNuWNNSg==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-1.0.2.tgz",
"integrity": "sha512-n7JHMWpQbAxh/xFY3Ns7c2TpZEVIV88dt1A3LE/UvFPSH13bowerKpz+OAtNVuSITnisMekGMV6T480H/sYGTw==",
"requires": {
"lodash": "^4.17.21",
"reflect-metadata": "^0.1.13",
......
......@@ -17,7 +17,7 @@ import {
} from './def';
import { reflector } from './meta/meta-fetch';
import { applySelector } from './utility/utility';
import { RegisterSchema } from 'schemastery-gen';
import { ClassType, RegisterSchema } from 'schemastery-gen';
export interface KoishiPluginRegistrationOptions<T = any> {
name?: string;
......@@ -59,7 +59,7 @@ export function KoishiPlugin<T = any>(
const newClass = class extends originalClass implements PluginClass {
static schema = (options.schema as Schema).type
? options.schema
: RegisterSchema()(options.schema);
: RegisterSchema()(options.schema as ClassType<T>);
__ctx: Context;
__config: T;
__pluginOptions: KoishiPluginRegistrationOptions<T>;
......
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