npm.io
1.1.6 • Published 2 years ago

@types/express-wechat-access

Licence
MIT
Version
1.1.6
Deps
2
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/express-wechat-access

Summary

This package contains type definitions for express-wechat-access (https://github.com/simmons8616/express-wechat-access).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-wechat-access.

index.d.ts

/// <reference types="node" />

import { EventEmitter } from "events";
import { NextFunction, Response } from "express";
import * as http from "http";

type WeMiddleware = (req: any, res: Response | http.ServerResponse, next: NextFunction) => any;

declare function weAccessMiddleware(
    options: {
        accessTokenUrl?: string | undefined;
        ticketUrl?: string | undefined;
        appId: string;
        appSecret: string;
        https?: boolean | undefined;
    },
    errorHandler?: (e: any) => any,
): WeMiddleware;

declare namespace weAccessMiddleware {
    interface WeAccessMidOption {
        accessTokenUrl?: string | undefined;
        ticketUrl?: string | undefined;
        appId: string;
        appSecret: string;
        https?: boolean | undefined;
    }

    interface WeAccessMiddleware extends WeMiddleware, EventEmitter, Function {}
}

export = weAccessMiddleware;

Additional Details

Credits

These definitions were written by .