pax_global_header 0000666 0000000 0000000 00000000064 14325725122 0014515 g ustar 00root root 0000000 0000000 52 comment=9d5851d7adefde580589a041ebfcbd030d39f6fd
promise-8.3.0/ 0000775 0000000 0000000 00000000000 14325725122 0013203 5 ustar 00root root 0000000 0000000 promise-8.3.0/.github/ 0000775 0000000 0000000 00000000000 14325725122 0014543 5 ustar 00root root 0000000 0000000 promise-8.3.0/.github/FUNDING.yml 0000664 0000000 0000000 00000001343 14325725122 0016361 0 ustar 00root root 0000000 0000000 # These are supported funding model platforms
github: [ForbesLindesay]# Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/promise # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
promise-8.3.0/.github/workflows/ 0000775 0000000 0000000 00000000000 14325725122 0016600 5 ustar 00root root 0000000 0000000 promise-8.3.0/.github/workflows/rollingversions-canary.yml 0000664 0000000 0000000 00000001617 14325725122 0024042 0 ustar 00root root 0000000 0000000 name: Publish Canary
on:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn build
- run: yarn test
publish-canary:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- run: npx rollingversions publish --canary $GITHUB_RUN_NUMBER
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
promise-8.3.0/.github/workflows/rollingversions.yml 0000664 0000000 0000000 00000001604 14325725122 0022563 0 ustar 00root root 0000000 0000000 name: Release
on:
repository_dispatch:
types: [rollingversions_publish_approved]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn build
- run: yarn test
publish:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- run: npx rollingversions publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
promise-8.3.0/.github/workflows/test.yml 0000664 0000000 0000000 00000000662 14325725122 0020306 0 ustar 00root root 0000000 0000000 name: Test
on:
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn build
- run: yarn test
promise-8.3.0/.gitignore 0000664 0000000 0000000 00000000124 14325725122 0015170 0 ustar 00root root 0000000 0000000 components
build
node_modules
/lib
/domains
/setimmediate
coverage
package-lock.json promise-8.3.0/.jshintrc 0000664 0000000 0000000 00000000064 14325725122 0015030 0 ustar 00root root 0000000 0000000 {
"asi": true,
"node": true,
"strict": true
}
promise-8.3.0/.npmignore 0000664 0000000 0000000 00000000110 14325725122 0015172 0 ustar 00root root 0000000 0000000 components
node_modules
test
.gitignore
.github
component.json
coverage
promise-8.3.0/LICENSE 0000664 0000000 0000000 00000002043 14325725122 0014207 0 ustar 00root root 0000000 0000000 Copyright (c) 2014 Forbes Lindesay
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
promise-8.3.0/Readme.md 0000664 0000000 0000000 00000026425 14325725122 0014733 0 ustar 00root root 0000000 0000000
# promise
This is a simple implementation of Promises. It is a super set of ES6 Promises designed to have readable, performant code and to provide just the extensions that are absolutely necessary for using promises today.
For detailed tutorials on its use, see www.promisejs.org
**N.B.** This promise exposes internals via underscore (`_`) prefixed properties. If you use these, your code will break with each new release.
[](https://github.com/then/promise/actions?query=workflow%3APublish%20Canary+branch%3Amaster)
[](https://rollingversions.com/then/promise)
[](https://www.npmjs.com/package/promise)
[](https://www.npmjs.org/package/promise)
## Installation
**Server:**
$ npm install promise
**Client:**
You can use browserify on the client, or use the pre-compiled script that acts as a polyfill.
```html
```
Note that the [es5-shim](https://github.com/es-shims/es5-shim) must be loaded before this library to support browsers pre IE9.
```html
```
## Usage
The example below shows how you can load the promise library (in a way that works on both client and server using node or browserify). It then demonstrates creating a promise from scratch. You simply call `new Promise(fn)`. There is a complete specification for what is returned by this method in [Promises/A+](http://promises-aplus.github.com/promises-spec/).
```javascript
var Promise = require('promise');
var promise = new Promise(function (resolve, reject) {
get('http://www.google.com', function (err, res) {
if (err) reject(err);
else resolve(res);
});
});
```
If you need [domains](https://nodejs.org/api/domain.html) support, you should instead use:
```js
var Promise = require('promise/domains');
```
If you are in an environment that implements `setImmediate` and don't want the optimisations provided by asap, you can use:
```js
var Promise = require('promise/setimmediate');
```
If you only want part of the features, e.g. just a pure ES6 polyfill:
```js
var Promise = require('promise/lib/es6-extensions');
// or require('promise/domains/es6-extensions');
// or require('promise/setimmediate/es6-extensions');
```
## Unhandled Rejections
By default, promises silence any unhandled rejections.
You can enable logging of unhandled ReferenceErrors and TypeErrors via:
```js
require('promise/lib/rejection-tracking').enable();
```
Due to the performance cost, you should only do this during development.
You can enable logging of all unhandled rejections if you need to debug an exception you think is being swallowed by promises:
```js
require('promise/lib/rejection-tracking').enable(
{allRejections: true}
);
```
Due to the high probability of false positives, I only recommend using this when debugging specific issues that you think may be being swallowed. For the preferred debugging method, see `Promise#done(onFulfilled, onRejected)`.
`rejection-tracking.enable(options)` takes the following options:
- allRejections (`boolean`) - track all exceptions, not just reference errors and type errors. Note that this has a high probability of resulting in false positives if your code loads data optimistically
- whitelist (`Array`) - this defaults to `[ReferenceError, TypeError]` but you can override it with your own list of error constructors to track.
- `onUnhandled(id, error)` and `onHandled(id, error)` - you can use these to provide your own customised display for errors. Note that if possible you should indicate that the error was a false positive if `onHandled` is called. `onHandled` is only called if `onUnhandled` has already been called.
To reduce the chance of false-positives there is a delay of up to 2 seconds before errors are logged. This means that if you attach an error handler within 2 seconds, it won't be logged as a false positive. ReferenceErrors and TypeErrors are only subject to a 100ms delay due to the higher likelihood that the error is due to programmer error.
## API
Detailed API reference docs are available at https://www.promisejs.org/api/.
Before all examples, you will need:
```js
var Promise = require('promise');
```
### new Promise(resolver)
This creates and returns a new promise. `resolver` must be a function. The `resolver` function is passed two arguments:
1. `resolve` should be called with a single argument. If it is called with a non-promise value then the promise is fulfilled with that value. If it is called with a promise (A) then the returned promise takes on the state of that new promise (A).
2. `reject` should be called with a single argument. The returned promise will be rejected with that argument.
### Static Functions
These methods are invoked by calling `Promise.methodName`.
#### Promise.resolve(value)
(deprecated aliases: `Promise.from(value)`, `Promise.cast(value)`)
Converts values and foreign promises into Promises/A+ promises. If you pass it a value then it returns a Promise for that value. If you pass it something that is close to a promise (such as a jQuery attempt at a promise) it returns a Promise that takes on the state of `value` (rejected or fulfilled).
#### Promise.reject(value)
Returns a rejected promise with the given value.
#### Promise.all(array)
Returns a promise for an array. If it is called with a single argument that `Array.isArray` then this returns a promise for a copy of that array with any promises replaced by their fulfilled values. e.g.
```js
Promise.all([Promise.resolve('a'), 'b', Promise.resolve('c')])
.then(function (res) {
assert(res[0] === 'a')
assert(res[1] === 'b')
assert(res[2] === 'c')
})
```
#### Promise.any(array)
Returns a single promise that fulfills as soon as any of the promises in the iterable fulfills, with the value of the fulfilled promise. If no promises in the iterable fulfill (if all of the given promises are rejected), then the returned promise is rejected with an `AggregateError`
```js
var rejected = Promise.reject(0);
var first = new Promise(function (resolve){ setTimeout(resolve, 100, 'quick') });
var second = new Promise(function (resolve){ setTimeout(resolve, 500, 'slow') });
var promises = [rejected, first, second];
Promise.any(promises) // => succeeds with `quick`
```
#### Promise.allSettled(array)
Returns a promise that resolves after all of the given promises have either fulfilled or rejected, with an array of objects that each describes the outcome of each promise.
```js
Promise.allSettled([Promise.resolve('a'), Promise.reject('error'), Promise.resolve('c')])
.then(function (res) {
res[0] // { status: "fulfilled", value: 'a' }
res[1] // { status: "rejected", reason: 'error' }
res[2] // { status: "fulfilled", value: 'c' }
})
```
#### Promise.race(array)
Returns a promise that resolves or rejects with the result of the first promise to resolve/reject, e.g.
```js
var rejected = Promise.reject(new Error('Whatever'));
var fulfilled = new Promise(function (resolve) {
setTimeout(() => resolve('success'), 500);
});
var race = Promise.race([rejected, fulfilled]);
// => immediately rejected with `new Error('Whatever')`
var success = Promise.resolve('immediate success');
var first = Promise.race([success, fulfilled]);
// => immediately succeeds with `immediate success`
```
#### Promise.denodeify(fn)
_Non Standard_
Takes a function which accepts a node style callback and returns a new function that returns a promise instead.
e.g.
```javascript
var fs = require('fs')
var read = Promise.denodeify(fs.readFile)
var write = Promise.denodeify(fs.writeFile)
var p = read('foo.json', 'utf8')
.then(function (str) {
return write('foo.json', JSON.stringify(JSON.parse(str), null, ' '), 'utf8')
})
```
#### Promise.nodeify(fn)
_Non Standard_
The twin to `denodeify` is useful when you want to export an API that can be used by people who haven't learnt about the brilliance of promises yet.
```javascript
module.exports = Promise.nodeify(awesomeAPI)
function awesomeAPI(a, b) {
return download(a, b)
}
```
If the last argument passed to `module.exports` is a function, then it will be treated like a node.js callback and not parsed on to the child function, otherwise the API will just return a promise.
### Prototype Methods
These methods are invoked on a promise instance by calling `myPromise.methodName`
### Promise#then(onFulfilled, onRejected)
This method follows the [Promises/A+ spec](http://promises-aplus.github.io/promises-spec/). It explains things very clearly so I recommend you read it.
Either `onFulfilled` or `onRejected` will be called and they will not be called more than once. They will be passed a single argument and will always be called asynchronously (in the next turn of the event loop).
If the promise is fulfilled then `onFulfilled` is called. If the promise is rejected then `onRejected` is called.
The call to `.then` also returns a promise. If the handler that is called returns a promise, the promise returned by `.then` takes on the state of that returned promise. If the handler that is called returns a value that is not a promise, the promise returned by `.then` will be fulfilled with that value. If the handler that is called throws an exception then the promise returned by `.then` is rejected with that exception.
#### Promise#catch(onRejected)
Sugar for `Promise#then(null, onRejected)`, to mirror `catch` in synchronous code.
#### Promise#done(onFulfilled, onRejected)
_Non Standard_
The same semantics as `.then` except that it does not return a promise and any exceptions are re-thrown so that they can be logged (crashing the application in non-browser environments)
#### Promise#nodeify(callback)
_Non Standard_
If `callback` is `null` or `undefined` it just returns `this`. If `callback` is a function it is called with rejection reason as the first argument and result as the second argument (as per the node.js convention).
This lets you write API functions that look like:
```javascript
function awesomeAPI(foo, bar, callback) {
return internalAPI(foo, bar)
.then(parseResult)
.then(null, retryErrors)
.nodeify(callback)
}
```
People who use typical node.js style callbacks will be able to just pass a callback and get the expected behavior. The enlightened people can not pass a callback and will get awesome promises.
## Enterprise Support
Available as part of the Tidelift Subscription
The maintainers of promise and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-promise?utm_source=npm-promise&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
## License
MIT
promise-8.3.0/build.js 0000664 0000000 0000000 00000004363 14325725122 0014646 0 ustar 00root root 0000000 0000000 'use strict';
var fs = require('fs');
var rimraf = require('rimraf');
var acorn = require('acorn');
var walk = require('acorn/dist/walk');
var crypto = require('crypto');
var shasum = crypto.createHash('sha512');
fs.readdirSync(__dirname + '/src').sort().forEach(function (filename) {
shasum.update(fs.readFileSync(__dirname + '/src/' + filename, 'utf8'));
});
const names = {};
const characterSet = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
let i = characterSet.indexOf(shasum.digest('base64').replace(/[^0-9a-zA-Z]/g, '')[0]);
function getIdFor(name) {
if (names[name]) return names[name];
return names[name] = '_' + characterSet[i++ % characterSet.length]
}
function fixup(src) {
var ast = acorn.parse(src);
src = src.split('');
walk.simple(ast, {
MemberExpression: function (node) {
if (node.computed) return;
if (node.property.type !== 'Identifier') return;
if (node.property.name[0] !== '_') return;
replace(node.property, getIdFor(node.property.name));
}
});
function replace(node, str) {
for (var i = node.start; i < node.end; i++) {
src[i] = '';
}
src[node.start] = str;
}
return src.join('');
}
rimraf.sync(__dirname + '/lib/');
fs.mkdirSync(__dirname + '/lib/');
fs.readdirSync(__dirname + '/src').forEach(function (filename) {
var src = fs.readFileSync(__dirname + '/src/' + filename, 'utf8');
var out = fixup(src);
fs.writeFileSync(__dirname + '/lib/' + filename, out);
});
rimraf.sync(__dirname + '/domains/');
fs.mkdirSync(__dirname + '/domains/');
fs.readdirSync(__dirname + '/src').forEach(function (filename) {
var src = fs.readFileSync(__dirname + '/src/' + filename, 'utf8');
var out = fixup(src);
out = out.replace(/require\(\'asap\/raw\'\)/g, "require('asap')");
fs.writeFileSync(__dirname + '/domains/' + filename, out);
});
rimraf.sync(__dirname + '/setimmediate/');
fs.mkdirSync(__dirname + '/setimmediate/');
fs.readdirSync(__dirname + '/src').forEach(function (filename) {
var src = fs.readFileSync(__dirname + '/src/' + filename, 'utf8');
var out = fixup(src);
out = out.replace(/var asap \= require\(\'([a-z\/]+)\'\);/g, '');
out = out.replace(/asap/g, "setImmediate");
fs.writeFileSync(__dirname + '/setimmediate/' + filename, out);
});
promise-8.3.0/component.json 0000664 0000000 0000000 00000000650 14325725122 0016101 0 ustar 00root root 0000000 0000000 {
"name": "promise",
"repo": "then/promise",
"description": "Bare bones Promises/A+ implementation",
"version": "8.1.0",
"keywords": [],
"dependencies": {
"johntron/asap": "*"
},
"development": {},
"license": "MIT",
"main": "index.js",
"scripts": [
"index.js",
"lib/core.js",
"lib/done.js",
"lib/es6-extensions.js",
"lib/node-extensions.js"
],
"twitter": "@ForbesLindesay"
} promise-8.3.0/core.js 0000664 0000000 0000000 00000000235 14325725122 0014471 0 ustar 00root root 0000000 0000000 'use strict';
module.exports = require('./lib/core.js');
console.error('require("promise/core") is deprecated, use require("promise/lib/core") instead.');
promise-8.3.0/index.d.ts 0000664 0000000 0000000 00000043707 14325725122 0015117 0 ustar 00root root 0000000 0000000 /**
* Represents the completion of an asynchronous operation
*/
interface ThenPromise extends Promise {
/**
* Attaches callbacks for the resolution and/or rejection of the ThenPromise.
* @param onfulfilled The callback to execute when the ThenPromise is resolved.
* @param onrejected The callback to execute when the ThenPromise is rejected.
* @returns A ThenPromise for the completion of which ever callback is executed.
*/
then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): ThenPromise;
/**
* Attaches a callback for only the rejection of the ThenPromise.
* @param onrejected The callback to execute when the ThenPromise is rejected.
* @returns A ThenPromise for the completion of the callback.
*/
catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): ThenPromise;
// Extensions specific to then/promise
/**
* Attaches callbacks for the resolution and/or rejection of the ThenPromise, without returning a new promise.
* @param onfulfilled The callback to execute when the ThenPromise is resolved.
* @param onrejected The callback to execute when the ThenPromise is rejected.
*/
done(onfulfilled?: ((value: T) => any) | undefined | null, onrejected?: ((reason: any) => any) | undefined | null): void;
/**
* Calls a node.js style callback. If none is provided, the promise is returned.
*/
nodeify(callback: void | null): ThenPromise;
nodeify(callback: (err: Error, value: T) => void): void;
}
interface PromiseFulfilledResult {
status: "fulfilled";
value: T;
}
interface PromiseRejectedResult {
status: "rejected";
reason: any;
}
type PromiseSettledResult = PromiseFulfilledResult | PromiseRejectedResult;
interface ThenPromiseConstructor {
/**
* A reference to the prototype.
*/
readonly prototype: ThenPromise;
/**
* Creates a new ThenPromise.
* @param executor A callback used to initialize the promise. This callback is passed two arguments:
* a resolve callback used resolve the promise with a value or the result of another promise,
* and a reject callback used to reject the promise with a provided reason or error.
*/
new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => any): ThenPromise;
/**
* The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
* @param values An array or iterable of Promises.
* @returns A new Promise.
*/
any(values: T): Promise>;
/**
* The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
* @param values An array or iterable of Promises.
* @returns A new Promise.
*/
any(values: Iterable>): Promise>
/**
* Creates a Promise that is resolved with an array of results when all
* of the provided Promises resolve or reject.
* @param values An array of Promises.
* @returns A new Promise.
*/
allSettled(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): ThenPromise<[PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult]>;
/**
* Creates a Promise that is resolved with an array of results when all
* of the provided Promises resolve or reject.
* @param values An array of Promises.
* @returns A new Promise.
*/
allSettled(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): ThenPromise<[PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult]>;
/**
* Creates a Promise that is resolved with an array of results when all
* of the provided Promises resolve or reject.
* @param values An array of Promises.
* @returns A new Promise.
*/
allSettled(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): ThenPromise<[PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult]>;
/**
* Creates a Promise that is resolved with an array of results when all
* of the provided Promises resolve or reject.
* @param values An array of Promises.
* @returns A new Promise.
*/
allSettled(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): ThenPromise<[PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult]>;
/**
* Creates a Promise that is resolved with an array of results when all
* of the provided Promises resolve or reject.
* @param values An array of Promises.
* @returns A new Promise.
*/
allSettled(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike]): ThenPromise<[PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult]>;
/**
* Creates a Promise that is resolved with an array of results when all
* of the provided Promises resolve or reject.
* @param values An array of Promises.
* @returns A new Promise.
*/
allSettled(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike]): ThenPromise<[PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult]>;
/**
* Creates a Promise that is resolved with an array of results when all
* of the provided Promises resolve or reject.
* @param values An array of Promises.
* @returns A new Promise.
*/
allSettled(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike ]): ThenPromise<[PromiseSettledResult, PromiseSettledResult, PromiseSettledResult, PromiseSettledResult]>;
/**
* Creates a Promise that is resolved with an array of results when all
* of the provided Promises resolve or reject.
* @param values An array of Promises.
* @returns A new Promise.
*/
allSettled(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): ThenPromise<[PromiseSettledResult, PromiseSettledResult, PromiseSettledResult]>;
/**
* Creates a Promise that is resolved with an array of results when all
* of the provided Promises resolve or reject.
* @param values An array of Promises.
* @returns A new Promise.
*/
allSettled(values: [T1 | PromiseLike, T2 | PromiseLike]): ThenPromise<[PromiseSettledResult, PromiseSettledResult]>;
/**
* Creates a Promise that is resolved with an array of results when all
* of the provided Promises resolve or reject.
* @param values An array of Promises.
* @returns A new Promise.
*/
allSettled(values: (T | PromiseLike)[]): ThenPromise[]>;
/**
* Creates a ThenPromise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any ThenPromise is rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): ThenPromise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
/**
* Creates a ThenPromise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any ThenPromise is rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): ThenPromise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
/**
* Creates a ThenPromise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any ThenPromise is rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): ThenPromise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
/**
* Creates a ThenPromise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any ThenPromise is rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): ThenPromise<[T1, T2, T3, T4, T5, T6, T7]>;
/**
* Creates a ThenPromise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any ThenPromise is rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike]): ThenPromise<[T1, T2, T3, T4, T5, T6]>;
/**
* Creates a ThenPromise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any ThenPromise is rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike]): ThenPromise<[T1, T2, T3, T4, T5]>;
/**
* Creates a ThenPromise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any ThenPromise is rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike ]): ThenPromise<[T1, T2, T3, T4]>;
/**
* Creates a ThenPromise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any ThenPromise is rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): ThenPromise<[T1, T2, T3]>;
/**
* Creates a ThenPromise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any ThenPromise is rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
all(values: [T1 | PromiseLike, T2 | PromiseLike]): ThenPromise<[T1, T2]>;
/**
* Creates a ThenPromise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any ThenPromise is rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
all(values: (T | PromiseLike)[]): ThenPromise;
/**
* Creates a ThenPromise that is resolved or rejected when any of the provided Promises are resolved
* or rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): ThenPromise;
/**
* Creates a ThenPromise that is resolved or rejected when any of the provided Promises are resolved
* or rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): ThenPromise;
/**
* Creates a ThenPromise that is resolved or rejected when any of the provided Promises are resolved
* or rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): ThenPromise;
/**
* Creates a ThenPromise that is resolved or rejected when any of the provided Promises are resolved
* or rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): ThenPromise;
/**
* Creates a ThenPromise that is resolved or rejected when any of the provided Promises are resolved
* or rejected.
* @param values An array of Promises.
* @returns A new ThenPromise.
*/
race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike