@paraswap/sdk / Exports / <internal> / PromiEvent
Name |
---|
T |
-
Promise
<T
>↳
PromiEvent
• Readonly
[toStringTag]: string
Promise.__@toStringTag@167
node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:174
▸ catch<TResult
>(onrejected?
): Promise
<T
| TResult
>
Attaches a callback for only the rejection of the Promise.
Name | Type |
---|---|
TResult |
never |
Name | Type | Description |
---|---|---|
onrejected? |
null | (reason : any ) => TResult | PromiseLike <TResult > |
The callback to execute when the Promise is rejected. |
Promise
<T
| TResult
>
A Promise for the completion of the callback.
Promise.catch
▸ finally(onfinally?
): Promise
<T
>
Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.
Name | Type | Description |
---|---|---|
onfinally? |
null | () => void |
The callback to execute when the Promise is settled (fulfilled or rejected). |
Promise
<T
>
A Promise for the completion of the callback.
Promise.finally
▸ on(type
, handler
): PromiEvent
<T
>
Name | Type |
---|---|
type |
"sending" |
handler |
(payload : object ) => void |
PromiEvent
<T
>
▸ on(type
, handler
): PromiEvent
<T
>
Name | Type |
---|---|
type |
"sent" |
handler |
(payload : object ) => void |
PromiEvent
<T
>
▸ on(type
, handler
): PromiEvent
<T
>
Name | Type |
---|---|
type |
"transactionHash" |
handler |
(receipt : string ) => void |
PromiEvent
<T
>
▸ on(type
, handler
): PromiEvent
<T
>
Name | Type |
---|---|
type |
"receipt" |
handler |
(receipt : TransactionReceipt ) => void |
PromiEvent
<T
>
▸ on(type
, handler
): PromiEvent
<T
>
Name | Type |
---|---|
type |
"confirmation" |
handler |
(confNumber : number , receipt : TransactionReceipt , latestBlockHash? : string ) => void |
PromiEvent
<T
>
▸ on(type
, handler
): PromiEvent
<T
>
Name | Type |
---|---|
type |
"error" |
handler |
(error : Error ) => void |
PromiEvent
<T
>
▸ on(type
, handler
): PromiEvent
<T
>
Name | Type |
---|---|
type |
"sending" | "sent" | "transactionHash" | "receipt" | "confirmation" | "error" |
handler |
(error : string | object | Error | TransactionReceipt ) => void |
PromiEvent
<T
>
▸ once(type
, handler
): PromiEvent
<T
>
Name | Type |
---|---|
type |
"sending" |
handler |
(payload : object ) => void |
PromiEvent
<T
>
▸ once(type
, handler
): PromiEvent
<T
>
Name | Type |
---|---|
type |
"sent" |
handler |
(payload : object ) => void |
PromiEvent
<T
>
▸ once(type
, handler
): PromiEvent
<T
>
Name | Type |
---|---|
type |
"transactionHash" |
handler |
(transactionHash : string ) => void |
PromiEvent
<T
>
▸ once(type
, handler
): PromiEvent
<T
>
Name | Type |
---|---|
type |
"receipt" |
handler |
(receipt : TransactionReceipt ) => void |
PromiEvent
<T
>
▸ once(type
, handler
): PromiEvent
<T
>
Name | Type |
---|---|
type |
"confirmation" |
handler |
(confirmationNumber : number , receipt : TransactionReceipt , latestBlockHash? : string ) => void |
PromiEvent
<T
>
▸ once(type
, handler
): PromiEvent
<T
>
Name | Type |
---|---|
type |
"error" |
handler |
(error : Error ) => void |
PromiEvent
<T
>
▸ once(type
, handler
): PromiEvent
<T
>
Name | Type |
---|---|
type |
"sending" | "sent" | "transactionHash" | "receipt" | "confirmation" | "error" |
handler |
(error : string | object | Error | TransactionReceipt ) => void |
PromiEvent
<T
>
▸ then<TResult1
, TResult2
>(onfulfilled?
, onrejected?
): Promise
<TResult1
| TResult2
>
Attaches callbacks for the resolution and/or rejection of the Promise.
Name | Type |
---|---|
TResult1 |
T |
TResult2 |
never |
Name | Type | Description |
---|---|---|
onfulfilled? |
null | (value : T ) => TResult1 | PromiseLike <TResult1 > |
The callback to execute when the Promise is resolved. |
onrejected? |
null | (reason : any ) => TResult2 | PromiseLike <TResult2 > |
The callback to execute when the Promise is rejected. |
Promise
<TResult1
| TResult2
>
A Promise for the completion of which ever callback is executed.
Promise.then