Create type definition for 'koa-slow' (#4072)
This commit is contained in:
parent
1b8a35fa1a
commit
5a8660cb76
2 changed files with 15 additions and 1 deletions
14
src/@types/koa-slow.d.ts
vendored
Normal file
14
src/@types/koa-slow.d.ts
vendored
Normal 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;
|
||||
}
|
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue