mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
# Conflicts: # jsowell-ui/.env.development # jsowell-ui/.env.staging # jsowell-ui/bin/build-sit.bat # jsowell-ui/bin/build.bat # jsowell-ui/src/api/adapayMember/adapayMember.js # jsowell-ui/src/api/pile/merchant.js # jsowell-ui/src/router/index.js # jsowell-ui/src/views/financial/financeDetail.vue # jsowell-ui/src/views/financial/merchant.vue # jsowell-ui/src/views/homeIndex/homeIndex.vue # jsowell-ui/src/views/login.vue # jsowell-ui/src/views/pile/basic/detail.vue # jsowell-ui/src/views/pile/station/components/SiteInfo.vue # jsowell-ui/src/views/pile/station/detail.vue # jsowell-ui/src/views/pile/station/orderReport.vue
47 lines
1.1 KiB
TypeScript
47 lines
1.1 KiB
TypeScript
declare var mitt: mitt.MittStatic;
|
|
|
|
declare module "mitt" {
|
|
export = mitt;
|
|
}
|
|
|
|
declare namespace mitt {
|
|
type Handler = (event?: any) => void;
|
|
|
|
interface MittStatic {
|
|
new(all?: {[key: string]: Handler}): Emitter;
|
|
}
|
|
|
|
interface Emitter {
|
|
/**
|
|
* Register an event handler for the given type.
|
|
*
|
|
* @param {string} type Type of event to listen for, or `"*"` for all events.
|
|
* @param {Handler} handler Function to call in response to the given event.
|
|
*
|
|
* @memberOf Mitt
|
|
*/
|
|
on(type: string, handler: Handler): void;
|
|
|
|
/**
|
|
* Function to call in response to the given event
|
|
*
|
|
* @param {string} type Type of event to unregister `handler` from, or `"*"`
|
|
* @param {Handler} handler Handler function to remove.
|
|
*
|
|
* @memberOf Mitt
|
|
*/
|
|
off(type: string, handler: Handler): void;
|
|
|
|
/**
|
|
* Invoke all handlers for the given type.
|
|
* If present, `"*"` handlers are invoked prior to type-matched handlers.
|
|
*
|
|
* @param {string} type The event type to invoke
|
|
* @param {any} [event] An event object, passed to each handler
|
|
*
|
|
* @memberOf Mitt
|
|
*/
|
|
emit(type: string, event?: any): void;
|
|
}
|
|
}
|