Readonly[toAttaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.
The instance-side counterpart to the declare static block above, and for the same reason:
then/catch/finally construct through this (SpeciesConstructor), so each one really
hands back an AveAzul -- but Promise's lib types say plain Promise, so the first link in
any chain loses every bluebird method and callers need as AveAzulInstance<T> to get them
back. These are declare, so nothing is emitted and no runtime behavior changes.
AveAzul<T> still satisfies Promise<T>/PromiseLike<T> after this, since the returned
AveAzul is itself a Promise - await and interop are unaffected.
Static___When fatal error and AveAzul needs to crash the process, this method is used to throw the error.
Triggers an uncaught exception in a safe way by scheduling it on the next event loop tick This is used for fatal errors that should crash the process
The error to throw
Static Optional__Static Optional__Static Readonly[species]StaticallCreates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
StaticDisposerStaticfromBluebird-style fromCallback() for converting callback-based functions to promises
Function to convert
Optionaloptions: FromCallbackOptions
Options object
Promise that resolves with the function's return value
StaticisCheck if an error is an operational error
Error to check
True if the error is operational
StaticisCheck if an error is a programmer error (unexpected, likely a bug)
Error to check
True if the error is a programmer error
StaticOperationalStaticrejectCreates a new rejected promise for the provided reason.
Staticresolveresolve/reject/all are inherited from Promise. Per the ECMAScript
spec they construct through this, so at runtime they already hand back
AveAzul instances -- but PromiseConstructor types them as plain Promise,
which drops every AveAzul method (.spread(), .disposer(), ...). These
ambient re-declarations state the real return types; they add declare, so
nothing is emitted and no behavior changes. They match what the exported
AveAzulClass interface has always promised.
Bluebird-style all() method for array operations Similar to Promise.all() but operates on the resolved value of this promise
Promise that resolves when all items in the array resolve
Bluebird-style any() method for waiting for any promises to resolve
Promise that resolves with the first resolved promise
Bluebird-style asCallback() method Attaches a callback to the promise and returns the promise. The callback is invoked when the promise is resolved or rejected.
Node.js-style callback function (err, value)
Additional options
The same promise instance
Bluebird-style call() method for calling a method on the resolved value
Name of the method to call
Arguments to pass to the method
Promise that resolves with the method's return value
Bluebird-style filtered catch: .catch(filter..., handler).
A filter is an Error class (instanceof), a predicate function, or an object
whose own properties must equal the error's. Unmatched errors are rethrown.
With a single argument it is the native catch.
Bluebird-style filtered catch: .catch(filter..., handler).
A filter is an Error class (instanceof), a predicate function, or an object
whose own properties must equal the error's. Unmatched errors are rethrown.
With a single argument it is the native catch.
Bluebird-style each() method for array iteration Similar to Bluebird's Promise.prototype.each()
Function to execute for each element
Promise that resolves when iteration is complete
Bluebird-style filter() method for array operations Similar to Bluebird's Promise.prototype.filter()
Filter function to apply to each element
Promise that resolves with the filtered array
Bluebird-style map() method for array operations Similar to Bluebird's Promise.prototype.map()
Map function to apply to each element
Promise that resolves with the mapped array
Optionaloptions: AsCallbackOptionsBluebird-style props() for object properties
Promise that resolves with an object of resolved values
Bluebird-style throw() that returns a rejected promise with the given reason
Value to reject the promise with
Promise that rejects with the given reason
StaticallCreates a Promise that is resolved with an array of results when all of the provided Promises resolve or reject.
An array of Promises.
A new Promise.
StaticanyStaticdeferStaticdelayStaticeachStaticfilterStaticfromBluebird-style fromCallback() for converting callback-based functions to promises
Function to convert
Optionaloptions: FromCallbackOptions
Options object
Promise that resolves with the function's return value
StaticjoinBluebird-style join() for joining promises
Promises to join
Promise that resolves with the handler's return value
StaticmapStaticmapStaticmethodStaticpromisifyBluebird-style promisify() for converting callback-based functions to promises
Function to promisify
Optionaloptions: PromisifyOptions
Options object
Promisified function
StaticpromisifyBluebird-style promisifyAll() for converting callback-based functions to promises
Object to promisify
Optionaloptions: PromisifyAllOptions
Options object
Object with promisified methods
StaticpropsStaticraceStaticreduceStaticsomeStatictryStaticusingBluebird-style using() for resource management. There is only a static version of this method. After the handler finish and returns, regardless of whether it resolves or rejects, the resources will be disposed.
Resource disposers, either an array of disposers or a variadic argument list
Handler function that will receive the resources as arguments
Promise that resolves with handler result
Fileoverview
AveAzul ("Blue Bird" in Spanish) - Extended Promise class that provides Bluebird like utility methods This implementation is inspired by and provides similar APIs to the Bluebird Promise library, but built on top of native Promises. The name is a Spanish play on words referencing Bluebird.