Move all packages to a types directory

This commit is contained in:
Andy Hanson
2017-03-24 14:27:52 -07:00
parent f9869dc191
commit 354cec620d
13846 changed files with 0 additions and 0 deletions
@@ -0,0 +1,12 @@
import * as errorHandler from 'api-error-handler';
import * as express from 'express';
var api = express.Router();
api.get('/users/:userid', function (req, res, next) {
});
api.use(errorHandler());
let res: errorHandler.Response;
+29
View File
@@ -0,0 +1,29 @@
// Type definitions for api-error-handler v1.0.0
// Project: https://github.com/expressjs/api-error-handler
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as express from 'express';
declare namespace apiErrorHandler {
// Body response: the JSON returned by api-error-handler
// See https://github.com/expressjs/api-error-handler/blob/1.0.0/index.js
interface Response {
status: number;
stack?: string;
message: string;
// Client errors
code?: any;
name?: string;
type?: any;
}
}
declare function apiErrorHandler(options?: any): express.ErrorRequestHandler;
export = apiErrorHandler;
+22
View File
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"api-error-handler-tests.ts"
]
}