1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-12 05:38:55 +09:00

Create type definition for 'koa-slow' (#4072)

This commit is contained in:
Acid Chicken (硫酸鶏) 2019-02-03 23:01:03 +09:00 committed by GitHub
parent ce576dea8f
commit 5049870b6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

14
src/@types/koa-slow.d.ts vendored Normal file
View File

@ -0,0 +1,14 @@
declare module 'koa-slow' {
import { Middleware } from 'koa';
interface ISlowOptions {
url?: RegExp
delay?: number
}
function slow(options?: ISlowOptions): Middleware;
namespace slow {} // Hack
export = slow;
}

View File

@ -13,7 +13,7 @@ import * as mount from 'koa-mount';
import * as compress from 'koa-compress';
import * as koaLogger from 'koa-logger';
import * as requestStats from 'request-stats';
//const slow = require('koa-slow');
//import * as slow from 'koa-slow';
import activityPub from './activitypub';
import webFinger from './webfinger';