@cowprotocol/events
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -10,4 +10,4 @@ import { CowEvents, CowEventPayloadMap } from './types'; | ||
export interface CowEventEmitter { | ||
on(listener: CowEventListener<CowEvents>): void; | ||
off(listener: CowEventListener<CowEvents>): void; | ||
on(listener: CowEventListener<CowEvents>): CowEventListener<CowEvents>; | ||
off(listener: CowEventListener<CowEvents>): CowEventListener<CowEvents>; | ||
emit<T extends CowEvents>(event: T, payload: CowEventPayloadMap[T]): void; | ||
@@ -17,5 +17,5 @@ } | ||
private subscriptions; | ||
on(listener: CowEventListener<CowEvents>): void; | ||
off(listener: CowEventListener<CowEvents>): void; | ||
on(listener: CowEventListener<CowEvents>): CowEventListener<CowEvents>; | ||
off(listener: CowEventListener<CowEvents>): CowEventListener<CowEvents>; | ||
emit<T extends CowEvents>(event: T, payload: CowEventPayloadMap[T]): void; | ||
} |
@@ -1,1 +0,1 @@ | ||
"use strict";var I=Object.defineProperty;var S=(E,_,R)=>_ in E?I(E,_,{enumerable:!0,configurable:!0,writable:!0,value:R}):E[_]=R;var O=(E,_,R)=>(S(E,typeof _!="symbol"?_+"":_,R),R);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var D=(E=>(E.SWAP_ETH_FLOW_SENT_TX="SWAP_ETH_FLOW_SENT_TX",E.ORDER_CREATED="ORDER_CREATED",E.SWAP_SIGNING_ERROR="SWAP_SIGNING_ERROR",E.ORDER_FULFILLED="ORDER_FULFILLED",E.ORDER_CANCELLED="ORDER_CANCELLED",E.ORDER_EXPIRED="ORDER_EXPIRED",E.ORDER_PRESIGNED="ORDER_PRESIGNED",E.ONCHAIN_TRANSACTION_MINED="ONCHAIN_TRANSACTION_MINED",E.ONCHAIN_TRANSACTION_FAILED="ONCHAIN_TRANSACTION_FAILED",E))(D||{}),A=(E=>(E.ON_TOAST_MESSAGE="ON_TOAST_MESSAGE",E.ON_POSTED_ORDER="ON_POSTED_ORDER",E.ON_FULFILLED_ORDER="ON_FULFILLED_ORDER",E.ON_CANCELLED_ORDER="ON_CANCELLED_ORDER",E.ON_EXPIRED_ORDER="ON_EXPIRED_ORDER",E.ON_PRESIGNED_ORDER="ON_PRESIGNED_ORDER",E.ON_ONCHAIN_TRANSACTION="ON_ONCHAIN_TRANSACTION",E.ON_CHANGE_TRADE_PARAMS="ON_CHANGE_TRADE_PARAMS",E))(A||{});class r{constructor(){O(this,"subscriptions",{})}on(_){const{event:R,handler:N}=_;this.subscriptions[R]||(this.subscriptions[R]=[]),this.subscriptions[R].push(N)}off(_){const{event:R,handler:N}=_;this.subscriptions[R]&&(this.subscriptions[R]=this.subscriptions[R].filter(i=>i!==N))}emit(_,R){this.subscriptions[_]&&this.subscriptions[_].forEach(N=>N(R))}}exports.CowEvents=A;exports.SimpleCowEventEmitter=r;exports.ToastMessageType=D; | ||
"use strict";var I=Object.defineProperty;var S=(E,R,_)=>R in E?I(E,R,{enumerable:!0,configurable:!0,writable:!0,value:_}):E[R]=_;var O=(E,R,_)=>(S(E,typeof R!="symbol"?R+"":R,_),_);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var D=(E=>(E.SWAP_ETH_FLOW_SENT_TX="SWAP_ETH_FLOW_SENT_TX",E.ORDER_CREATED="ORDER_CREATED",E.SWAP_SIGNING_ERROR="SWAP_SIGNING_ERROR",E.ORDER_FULFILLED="ORDER_FULFILLED",E.ORDER_CANCELLED="ORDER_CANCELLED",E.ORDER_EXPIRED="ORDER_EXPIRED",E.ORDER_PRESIGNED="ORDER_PRESIGNED",E.ONCHAIN_TRANSACTION_MINED="ONCHAIN_TRANSACTION_MINED",E.ONCHAIN_TRANSACTION_FAILED="ONCHAIN_TRANSACTION_FAILED",E))(D||{}),A=(E=>(E.ON_TOAST_MESSAGE="ON_TOAST_MESSAGE",E.ON_POSTED_ORDER="ON_POSTED_ORDER",E.ON_FULFILLED_ORDER="ON_FULFILLED_ORDER",E.ON_CANCELLED_ORDER="ON_CANCELLED_ORDER",E.ON_EXPIRED_ORDER="ON_EXPIRED_ORDER",E.ON_PRESIGNED_ORDER="ON_PRESIGNED_ORDER",E.ON_ONCHAIN_TRANSACTION="ON_ONCHAIN_TRANSACTION",E.ON_CHANGE_TRADE_PARAMS="ON_CHANGE_TRADE_PARAMS",E))(A||{});class r{constructor(){O(this,"subscriptions",{})}on(R){const{event:_,handler:N}=R;return this.subscriptions[_]||(this.subscriptions[_]=[]),this.subscriptions[_].push(N),R}off(R){const{event:_,handler:N}=R;return this.subscriptions[_]&&(this.subscriptions[_]=this.subscriptions[_].filter(i=>i!==N)),R}emit(R,_){this.subscriptions[R]&&this.subscriptions[R].forEach(N=>N(_))}}exports.CowEvents=A;exports.SimpleCowEventEmitter=r;exports.ToastMessageType=D; |
{ | ||
"name": "@cowprotocol/events", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "description": "CoW Swap events", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10650