mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Adding typing for koa-logger
This commit is contained in:
parent
8c2d6efe1d
commit
64ffcbce97
11
koa-logger/index.d.ts
vendored
Normal file
11
koa-logger/index.d.ts
vendored
Normal 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;
|
||||
7
koa-logger/koa-logger-tests.ts
Normal file
7
koa-logger/koa-logger-tests.ts
Normal 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
19
koa-logger/tsconfig.json
Normal 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"
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user