Commit 9de2e232 authored by nanahira's avatar nanahira

format

parent 67f7abde
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { AbstractHttpAdapter, HttpAdapterHost, ModuleRef } from '@nestjs/core'; import { AbstractHttpAdapter, HttpAdapterHost, ModuleRef } from '@nestjs/core';
import { AbstractWsAdapter } from '@nestjs/websockets';
@Injectable() @Injectable()
export class KoishiHttpDiscoveryService { export class KoishiHttpDiscoveryService {
......
...@@ -15,7 +15,6 @@ import { ...@@ -15,7 +15,6 @@ import {
CommandPutConfig, CommandPutConfig,
DoRegisterConfig, DoRegisterConfig,
EventName, EventName,
KoishiCommandInterceptor,
KoishiCommandInterceptorRegistration, KoishiCommandInterceptorRegistration,
KoishiModulePlugin, KoishiModulePlugin,
} from '../utility/koishi.interfaces'; } from '../utility/koishi.interfaces';
......
...@@ -5,8 +5,7 @@ import { ...@@ -5,8 +5,7 @@ import {
WebSocketServer, WebSocketServer,
} from '@nestjs/websockets'; } from '@nestjs/websockets';
import { KoishiService } from '../koishi.service'; import { KoishiService } from '../koishi.service';
import type WebSocket from 'ws'; import type WebSocket, { Server } from 'ws';
import type { Server } from 'ws';
import { IncomingMessage } from 'http'; import { IncomingMessage } from 'http';
@WebSocketGateway() @WebSocketGateway()
......
import { Injectable, NestMiddleware, OnModuleInit } from '@nestjs/common'; import { Injectable, NestMiddleware } from '@nestjs/common';
import { NextFunction, Request, Response } from 'express'; import { NextFunction, Request, Response } from 'express';
import { KoishiService } from '../koishi.service'; import { KoishiService } from '../koishi.service';
import { IncomingMessage, ServerResponse } from 'http'; import { IncomingMessage, ServerResponse } from 'http';
......
...@@ -2,12 +2,10 @@ ...@@ -2,12 +2,10 @@
import { import {
CommandDefinitionFun, CommandDefinitionFun,
DoRegisterConfig, DoRegisterConfig,
KoishiCommandInterceptor,
KoishiCommandInterceptorRegistration, KoishiCommandInterceptorRegistration,
OnContextFunction, OnContextFunction,
} from './koishi.interfaces'; } from './koishi.interfaces';
import { Context } from 'koishi'; import { Context } from 'koishi';
import { Type } from '@nestjs/common';
export const KOISHI_MODULE_OPTIONS = 'KOISHI_MODULE_OPTIONS'; export const KOISHI_MODULE_OPTIONS = 'KOISHI_MODULE_OPTIONS';
export const KOISHI_CONTEXT = 'KOISHI_CONTEXT'; export const KOISHI_CONTEXT = 'KOISHI_CONTEXT';
......
import { CustomDecorator, Inject, Type } from '@nestjs/common'; import { CustomDecorator, Inject } from '@nestjs/common';
import { import {
KOISHI_CONTEXT, KOISHI_CONTEXT,
KoishiCommandDefinition, KoishiCommandDefinition,
...@@ -10,22 +10,18 @@ import { ...@@ -10,22 +10,18 @@ import {
KoishiServiceWireKeys, KoishiServiceWireKeys,
KoishiServiceWireProperty, KoishiServiceWireProperty,
MetadataArrayMap, MetadataArrayMap,
MetadataMap,
} from './koishi.constants'; } from './koishi.constants';
import { import {
CommandDefinitionFun, CommandDefinitionFun,
CommandPutConfig, CommandPutConfig,
CommandPutConfigMap, CommandPutConfigMap,
DoRegisterConfig,
EventName, EventName,
GenerateMappingStruct, GenerateMappingStruct,
KoishiCommandInterceptor, KoishiCommandInterceptorRegistration,
KoishiCommandInterceptorDeclaration,
MetadataArrayValue, MetadataArrayValue,
MetadataArrayValueMap, MetadataArrayValueMap,
MetadataGenericMap, MetadataGenericMap,
MetadataKey, MetadataKey,
MetadataMapValue,
OnContextFunction, OnContextFunction,
Selection, Selection,
} from './koishi.interfaces'; } from './koishi.interfaces';
...@@ -283,6 +279,6 @@ export function ProvideContextService( ...@@ -283,6 +279,6 @@ export function ProvideContextService(
// Command interceptor // Command interceptor
export const CommandInterceptors = ( export const CommandInterceptors = (
...interceptors: KoishiCommandInterceptorDeclaration[] ...interceptors: KoishiCommandInterceptorRegistration[]
): MethodDecorator & ClassDecorator => ): MethodDecorator & ClassDecorator =>
ConcatMetadata(KoishiCommandInterceptorDef, interceptors); ConcatMetadata(KoishiCommandInterceptorDef, interceptors);
import { ModuleMetadata, Provider, Type } from '@nestjs/common'; import { ModuleMetadata, Provider, Type } from '@nestjs/common';
import { Channel, User } from 'koishi';
import { import {
App, App,
Argv, Argv,
Channel,
Command, Command,
Context, Context,
EventMap, EventMap,
...@@ -10,6 +10,7 @@ import { ...@@ -10,6 +10,7 @@ import {
MaybeArray, MaybeArray,
Plugin, Plugin,
Session, Session,
User,
} from 'koishi'; } from 'koishi';
import { MetadataArrayMap, MetadataMap } from './koishi.constants'; import { MetadataArrayMap, MetadataMap } from './koishi.constants';
......
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