mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Revert "Express: improve type of `Request['params']` aka `req.params` (#37502)"
This reverts commit 9aa863ef23.
* Express: use generics for params, default to dictionary
* Lint
* Bump all dependants
* Spacing
* Bump dependants
* Bump dependants
* Bump dependants
* Bump dependants
* Bump dependants
* Bump dependants
* Bump dependants
* Bump dependants
* Bump dependants
* Bump dependants
* Bump dependants (via tests)
* Bump dependants
* Bump dependants (via tests)
* Bump dependants
* Simplify test
* Hoist imports
* Tidy test
* Add tests
* Add reasons
* Remove redundant params
* Add tests
* Format
* Remove redundant params
* Add tests
* Add JSDoc
* Improve comment
* Improve comment
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
// Type definitions for express-wechat-access 1.1
|
|
// Project: https://github.com/simmons8616/express-wechat-access
|
|
// Definitions by: Simmons Zhang <https://github.com/simmons8616>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.3
|
|
|
|
/// <reference types="node" />
|
|
|
|
import { Response, NextFunction } from 'express';
|
|
import * as http from 'http';
|
|
import { EventEmitter } from 'events';
|
|
|
|
type WeMiddleware = (req: any, res: Response | http.ServerResponse, next: NextFunction) => any;
|
|
|
|
declare function weAccessMiddleware(
|
|
options: {
|
|
accessTokenUrl?: string;
|
|
ticketUrl?: string;
|
|
appId: string;
|
|
appSecret: string;
|
|
https?: boolean;
|
|
},
|
|
errorHandler?: (e: any) => any
|
|
): WeMiddleware;
|
|
|
|
declare namespace weAccessMiddleware {
|
|
interface WeAccessMidOption {
|
|
accessTokenUrl?: string;
|
|
ticketUrl?: string;
|
|
appId: string;
|
|
appSecret: string;
|
|
https?: boolean;
|
|
}
|
|
|
|
interface WeAccessMiddleware extends WeMiddleware, EventEmitter, Function {}
|
|
}
|
|
|
|
export = weAccessMiddleware;
|