[@types/koa-html-minifier] Add type definitions (#27691)

* Add koa-router's Router to koa's Context

* [@types/koa-html-minifier] Add type definitions

* Fix incorrect TypeScript version
This commit is contained in:
Romain Faust 2018-07-30 22:08:58 +02:00 committed by Sheetal Nandi
parent f20b7f5323
commit bb6b63a59b
4 changed files with 46 additions and 0 deletions

14
types/koa-html-minifier/index.d.ts vendored Normal file
View File

@ -0,0 +1,14 @@
// Type definitions for koa-html-minifier 1.0
// Project: https://github.com/koajs/html-minifier
// Definitions by: Romain Faust <https://github.com/romain-faust>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { Middleware } from 'koa';
import { Options } from 'html-minifier';
declare function minifier(options?: Options): Middleware;
declare namespace minifier {}
export = minifier;

View File

@ -0,0 +1,8 @@
import * as Koa from 'koa';
import * as KoaHtmlMinifier from 'koa-html-minifier';
const app = new Koa()
.use(KoaHtmlMinifier())
.use(KoaHtmlMinifier({
collapseWhitespace: true
}));

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-html-minifier-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }