mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
koa-qs: Add types definitions
This commit is contained in:
parent
ffdaa7c3bf
commit
a3766f8dbe
15
types/koa-qs/index.d.ts
vendored
Normal file
15
types/koa-qs/index.d.ts
vendored
Normal 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
types/koa-qs/koa-qs-tests.ts
Normal file
6
types/koa-qs/koa-qs-tests.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import koaQs = require('koa-qs');
|
||||
import Koa = require('koa');
|
||||
|
||||
const app = koaQs(new Koa());
|
||||
|
||||
app.listen(80);
|
||||
23
types/koa-qs/tsconfig.json
Normal file
23
types/koa-qs/tsconfig.json
Normal 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
types/koa-qs/tslint.json
Normal file
1
types/koa-qs/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user