Skip to content

Commit

Permalink
Merge pull request DefinitelyTyped#34549 from dolezel/multy
Browse files Browse the repository at this point in the history
[multy]: TS definitions for multy
  • Loading branch information
DanielRosenwasser authored Apr 9, 2019
2 parents de261d6 + cb372a6 commit dc8d8c4
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
22 changes: 22 additions & 0 deletions types/multy/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Type definitions for multy 0.1
// Project: https://github.com/eduardorfs/multy
// Definitions by: Jan Dolezel <https://github.com/dolezel>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4

import * as Koa from "koa";
import * as busboy from "busboy";

declare module "koa" {
interface Request {
body: any;
}
}

declare namespace multy {
type Options = busboy.BusboyConfig;
}

declare function multy(opts?: multy.Options): Koa.Middleware;

export = multy;
3 changes: 3 additions & 0 deletions types/multy/multy-tests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import createMultyMiddleware = require("multy");

const middleware = createMultyMiddleware();
24 changes: 24 additions & 0 deletions types/multy/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"multy-tests.ts"
]
}
1 change: 1 addition & 0 deletions types/multy/tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

0 comments on commit dc8d8c4

Please sign in to comment.