Office.IPromiseConstructor interface
Properties
prototype | A reference to the prototype. |
Methods
all(values) | Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected. |
all(values) | Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected. |
all(values) | Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected. |
all(values) | Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected. |
all(values) | Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected. |
all(values) | Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected. |
all(values) | Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected. |
all(values) | Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected. |
all(values) | Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected. |
all(values) | Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected. |
race(values) | Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected. |
race(values) | Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected. |
race(values) | Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected. |
race(values) | Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected. |
race(values) | Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected. |
race(values) | Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected. |
race(values) | Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected. |
race(values) | Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected. |
race(values) | Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected. |
race(values) | Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected. |
reject(reason) | Creates a new rejected promise for the provided reason. |
reject(reason) | Creates a new rejected promise for the provided reason. |
resolve(value) | Creates a new resolved promise for the provided value. |
resolve() | Creates a new resolved promise. |
Property Details
prototype
A reference to the prototype.
readonly prototype: Promise<any>;
Property Value
Promise<any>
Method Details
all(values)
Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]
An array of Promises.
Returns
Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>
A new Promise.
all(values)
Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
all<T>(values: Array<T | PromiseLike<T>>): Promise<T[]>;
Parameters
- values
-
Array<T | PromiseLike<T>>
An array of Promises.
Returns
Promise<T[]>
A new Promise.
all(values)
Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]
An array of Promises.
Returns
Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>
A new Promise.
all(values)
Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]
An array of Promises.
Returns
Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>
A new Promise.
all(values)
Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]
An array of Promises.
Returns
Promise<[T1, T2, T3, T4, T5, T6, T7]>
A new Promise.
all(values)
Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]
An array of Promises.
Returns
Promise<[T1, T2, T3, T4, T5, T6]>
A new Promise.
all(values)
Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]
An array of Promises.
Returns
Promise<[T1, T2, T3, T4, T5]>
A new Promise.
all(values)
Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]): Promise<[T1, T2, T3, T4]>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]
An array of Promises.
Returns
Promise<[T1, T2, T3, T4]>
A new Promise.
all(values)
Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]
An array of Promises.
Returns
Promise<[T1, T2, T3]>
A new Promise.
all(values)
Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]
An array of Promises.
Returns
Promise<[T1, T2]>
A new Promise.
race(values)
Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.
race<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9 | T10>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]
An array of Promises.
Returns
Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9 | T10>
A new Promise.
race(values)
Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.
race<T>(values: Array<T | PromiseLike<T>>): Promise<T>;
Parameters
- values
-
Array<T | PromiseLike<T>>
An array of Promises.
Returns
Promise<T>
A new Promise.
race(values)
Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.
race<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]
An array of Promises.
Returns
Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9>
A new Promise.
race(values)
Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.
race<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]
An array of Promises.
Returns
Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8>
A new Promise.
race(values)
Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.
race<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]
An array of Promises.
Returns
Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7>
A new Promise.
race(values)
Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.
race<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<T1 | T2 | T3 | T4 | T5 | T6>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]
An array of Promises.
Returns
Promise<T1 | T2 | T3 | T4 | T5 | T6>
A new Promise.
race(values)
Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.
race<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]): Promise<T1 | T2 | T3 | T4 | T5>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]
An array of Promises.
Returns
Promise<T1 | T2 | T3 | T4 | T5>
A new Promise.
race(values)
Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.
race<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]): Promise<T1 | T2 | T3 | T4>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]
An array of Promises.
Returns
Promise<T1 | T2 | T3 | T4>
A new Promise.
race(values)
Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.
race<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<T1 | T2 | T3>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]
An array of Promises.
Returns
Promise<T1 | T2 | T3>
A new Promise.
race(values)
Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.
race<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<T1 | T2>;
Parameters
- values
-
[T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]
An array of Promises.
Returns
Promise<T1 | T2>
A new Promise.
reject(reason)
Creates a new rejected promise for the provided reason.
reject(reason: any): Promise<never>;
Parameters
- reason
-
any
The reason the promise was rejected.
Returns
Promise<never>
A new rejected Promise.
reject(reason)
Creates a new rejected promise for the provided reason.
reject<T>(reason: any): Promise<T>;
Parameters
- reason
-
any
The reason the promise was rejected.
Returns
Promise<T>
A new rejected Promise.
resolve(value)
Creates a new resolved promise for the provided value.
resolve<T>(value: T | PromiseLike<T>): Promise<T>;
Parameters
- value
-
T | PromiseLike<T>
A promise.
Returns
Promise<T>
A promise whose internal state matches the provided promise.
resolve()
Creates a new resolved promise.
resolve(): Promise<void>;
Returns
Promise<void>
A resolved promise.
Office Add-ins