Documentation ¶
Overview ¶
Notes: https://promisesaplus.com/
Index ¶
- type FinalState
- type Promise
- func (this *Promise) OnFail(rejectedFns ...interface{}) (q *Promise)
- func (this *Promise) OnSuccess(fulfilledFns ...interface{}) (q *Promise)
- func (this *Promise) SetCatch(recoverFn func(error, interface{}))
- func (this *Promise) SetFinally(finallyFn func(FinalState, ...interface{}))
- func (this *Promise) Then(fulfilledFn, rejectedFn interface{}) (q *Promise)
- func (this *Promise) Wait()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FinalState ¶
type FinalState int
const ( FinalUnknown FinalState = iota FinalResolved FinalRejected FinalRecovered )
type Promise ¶
type Promise struct {
// contains filtered or unexported fields
}
func FutureDeferred ¶
func (*Promise) SetFinally ¶
func (this *Promise) SetFinally(finallyFn func(FinalState, ...interface{}))
Click to show internal directories.
Click to hide internal directories.