Adding typing for koa-logger

This commit is contained in:
Joshua DeVinney 2016-09-20 10:55:05 -05:00
parent 8c2d6efe1d
commit 64ffcbce97
3 changed files with 37 additions and 0 deletions

11
koa-logger/index.d.ts vendored Normal file
View File

@ -0,0 +1,11 @@
// Type definitions for koa-logger v2.0
// Project: https://github.com/koajs/logger
// Definitions by: Joshua DeVinney <https://github.com/geoffreak>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="koa"/>
import * as Koa from 'koa';
declare var KoaLogger: () => (ctx: Koa.Context, next: () => Promise<any>) => any;
export = KoaLogger;

View File

@ -0,0 +1,7 @@
/// <reference types="koa"/>
import * as koa from 'koa';
import * as logger from 'koa-logger';
const app = new koa();
app.use(logger());

19
koa-logger/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"koa-logger-tests.ts"
]
}