(Anonymous)

A container for methods of Futures.

Documentation

A container for methods of Futures.

Properties

Converting to other types

toPromise: value()

Converts a Future into a Promise.

Experimental

Debugging

inspect: value()

Returns a textual representation of the Future.

Experimental
toString: value()

Returns a textual representation of the Future.

Experimental

Fantasy Land

ap(that)

Part of the Applicative instance for Fantasy Land 1.x. See the apply method for details.

fantasy-land/ap(that)

Part of the Applicative instance for Fantasy Land 2.x+. See the apply method for details.

fantasy-land/bimap(f, g)

Part of the Bifunctor instance for Fantasy Land 2.x+. See the bimap method for details.

fantasy-land/chain(transformation)

Part of the Monad instance for Fantasy Land 2.x+. See the chain method for details.

fantasy-land/map(transformation)

Part of the Functor instance for Fantasy Land 2.x+. See the map method for details.

Internal Fields

get _listeners

A list of visitors to be invoked when the state of the future changes.

Abstract
get _state

The current state of the Future.

Abstract

Pattern Matching

willMatchWith: value(pattern)

Limited pattern matching for futures.

Experimental

Reacting to Futures

listen: value(pattern)

Adds a visitor to the Future, which will be invoked when the Future's state changes.

Experimental

Recovering From Errors

orElse: value(handler)

Transforms a failed future into a new future.

Experimental
recover: value(handler)

Transforms a failed future into a new future.

Deprecated
swap: value()

Inverts the state of a Future: successes become failures, failures become successes.

Experimental

Transforming

apply: value(future)

Transforms the succesful value of a future by using a function stored in another future.

Experimental
bimap: value(rejectionTransformation, successTransformation)

Transforms both successful and failure values in a Future, without touching its state.

Experimental
chain: value(transformation)

Transforms a Future's successful value along with its state.

Experimental
map: value(transformation)

Transforms the successful value of a Future, without touching its state.

Experimental
mapRejected: value(transformation)

Transforms failure values in a Future without touching its state.

Experimental

Types

constructor()

Models the eventual result of asynchronous computations.

Experimental
Stability
deprecated
Authors
Authors
  • Quildreen Motta
Maintainers
  • Quildreen Motta <queen@robotlolita.me> (http://robotlolita.me/)