new PromiseAdapter(api) → {PromiseAdapter}
Adapter for the primary promise operations.
Provides compatibility with promise libraries that cannot be recognized automatically, via functions that implement the primary operations with promises:
- construct a new promise with a callback function
- resolve a promise with some result data
- reject a promise with a reason
- resolve an array of promises
The type is available from the library's root: pgp.PromiseAdapter
.
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
api |
object | Promise API configuration object. Passing in anything other than an object will throw TypeError = Properties
|
- Source:
Returns:
- Type
- PromiseAdapter