Merge pull request #22016 from wingsbob/add-koa-etag

Add types for koa-etag
This commit is contained in:
Mine Starks
2017-12-11 10:25:26 -08:00
committed by GitHub
4 changed files with 44 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
// Type definitions for koa-etag 3.0
// Project: https://github.com/koajs/etag#readme
// Definitions by: Matthew Bull <https://github.com/wingsbob>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import * as koa from 'koa';
import * as etag from 'etag';
declare function koaEtag(options?: etag.Options): koa.Middleware;
export = koaEtag;
+8
View File
@@ -0,0 +1,8 @@
import koaEtag = require('koa-etag');
import * as Koa from 'koa';
new Koa().use(koaEtag());
new Koa().use(koaEtag({}));
new Koa().use(koaEtag({ weak: true }));
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"koa-etag-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }