Commit 80fce8ac authored by nanahira's avatar nanahira

fix override thing

parent 71465c7d
...@@ -9,7 +9,7 @@ export function CreatePluginFactory<C, IC, P extends { config: IC }>( ...@@ -9,7 +9,7 @@ export function CreatePluginFactory<C, IC, P extends { config: IC }>(
): <S>(specificConfig?: ClassType<S>) => new ( ): <S>(specificConfig?: ClassType<S>) => new (
ctx: Context, ctx: Context,
config: PartialDeep<S> & C, config: PartialDeep<S> & C,
) => Omit<P, 'config'> & { ) => P & {
config: IC & S; config: IC & S;
}; };
export function CreatePluginFactory( export function CreatePluginFactory(
......
import { Inject, DefinePlugin, UsingService } from '..'; import { DefinePlugin, Inject, UsingService } from '..';
import { Cache, Assets, Bot, Context } from 'koishi'; import { Assets, Bot, Cache, Context } from 'koishi';
describe('InjectUsing', () => { describe('InjectUsing', () => {
@UsingService('router') @UsingService('router')
......
import { SchemaProperty } from 'schemastery-gen'; import { SchemaProperty } from 'schemastery-gen';
import { UseCommand } from 'koishi-decorators'; import { UseCommand } from 'koishi-decorators';
import { CreatePluginFactory } from '../src/plugin-factory'; import { CreatePluginFactory } from '../src/plugin-factory';
import { App, Context } from 'koishi'; import { App } from 'koishi';
import { DefinePlugin } from '../src/register'; import { DefinePlugin } from '../src/register';
import { InjectConfig } from '../src/decorators';
import { BasePlugin } from '../src/base-plugin'; import { BasePlugin } from '../src/base-plugin';
class MessageConfig { class MessageConfig {
......
import { App, Session } from 'koishi'; import { App, Session } from 'koishi';
import { OnGuild, OnPlatform, Registrar, UseCommand } from 'koishi-decorators'; import { OnGuild, OnPlatform, UseCommand } from 'koishi-decorators';
import { DefinePlugin } from '../src/register'; import { DefinePlugin } from '../src/register';
@OnPlatform('discord') @OnPlatform('discord')
......
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