(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.

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.

Reacting to Futures

listen: value(pattern)

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

Recovering From Errors

orElse: value(handler)

Transforms a failed future into a new future.

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.

Transforming

apply: value(future)

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

bimap: value(rejectionTransformation, successTransformation)

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

chain: value(transformation)

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

map: value(transformation)

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

mapRejected: value(transformation)

Transforms failure values in a Future without touching its state.

Types

constructor()

Models the eventual result of asynchronous computations.

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