Merge pull request #30322 from RemyJeancolas/master

koa-qs: Add types definitions
This commit is contained in:
Armando Aguirre
2018-11-06 13:36:29 -08:00
committed by GitHub
4 changed files with 45 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
// Type definitions for koa-qs 2.0
// Project: https://github.com/koajs/qs#readme
// Definitions by: Rémy Jeancolas <https://github.com/RemyJeancolas>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import * as koa from 'koa';
declare namespace koaQs {
type ParseMode = 'extended'|'strict'|'first';
}
declare function koaQs(app: koa, mode?: koaQs.ParseMode): koa;
export = koaQs;
+6
View File
@@ -0,0 +1,6 @@
import koaQs = require('koa-qs');
import Koa = require('koa');
const app = koaQs(new Koa());
app.listen(80);
+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-qs-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }