重构代码, 移除一些warning
This commit is contained in:
parent
f51fcc00d4
commit
5c4cecd820
@ -186,7 +186,6 @@ interface Number {
|
||||
* @param {number} min
|
||||
* @param {number} max
|
||||
* @returns {boolean}
|
||||
* @memberof Number
|
||||
*/
|
||||
between?(min: number, max: number): boolean;
|
||||
}
|
||||
@ -207,7 +206,6 @@ interface String {
|
||||
/**
|
||||
* 替换字符串中{0}{1}{2}{a} {b}这样的数据,用obj对应key替换,或者是数组中对应key的数据替换
|
||||
*/
|
||||
substitute?(...args: any): string;
|
||||
substitute?(args: any[]): string;
|
||||
/**
|
||||
* 对数字进行补0操作
|
||||
|
@ -39,11 +39,11 @@ export class FileServer {
|
||||
}
|
||||
|
||||
private registerRouter() {
|
||||
logger.log('register api routers');
|
||||
logger.log('register file routers');
|
||||
let self = this;
|
||||
for (let [controller, config] of RouterMap.decoratedRouters) {
|
||||
for(let data of config.data) {
|
||||
logger.info('find api router', data.method || 'all',
|
||||
logger.info('find file router', data.method || 'all',
|
||||
data.path, controller.name);
|
||||
// @ts-ignore
|
||||
self.server[data.method || 'all'](data.path, {
|
||||
|
@ -14,6 +14,9 @@ declare module 'fastify' {
|
||||
user?: any,
|
||||
token?: string
|
||||
}
|
||||
interface FastifyInstance {
|
||||
apiAuth: (request: FastifyRequest, reply: FastifyReply) => {};
|
||||
}
|
||||
}
|
||||
|
||||
export interface ApiAuthOptions {
|
||||
|
@ -15,6 +15,9 @@ declare module 'fastify' {
|
||||
interface FastifyRequest {
|
||||
jwtVerify: Function;
|
||||
}
|
||||
interface FastifyInstance {
|
||||
zAuth: (request: FastifyRequest, reply: FastifyReply) => {};
|
||||
}
|
||||
}
|
||||
|
||||
const zAuthPlugin: FastifyPluginAsync = async function (
|
||||
|
@ -11,16 +11,10 @@ import { BaseConst } from '../constants/BaseConst'
|
||||
import { QCategoryCache } from './QCategoryCache'
|
||||
import { PuzzleSession } from '../models/match/PuzzleSession'
|
||||
import { GameEnv } from '../config/GameEnv'
|
||||
import { PuzzleRank } from '../models/match/PuzzleRank'
|
||||
import { Shop } from '../models/shop/Shop'
|
||||
import { mission_vo } from '../config/parsers/mission_vo'
|
||||
import { ShopActivity } from '../models/shop/ShopActivity'
|
||||
import {
|
||||
getAccountRank,
|
||||
getAccountScore,
|
||||
getRankList,
|
||||
updateRank
|
||||
} from './Rank'
|
||||
import { getAccountRank, getRankList, updateRank } from './Rank'
|
||||
|
||||
|
||||
export function transformRecord(records: any[]) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user