PromiseLogic.allSettled()

Core Logic GateALLSETTLED Logic - Waits for all Promises to complete (regardless of success or failure)

The PromiseLogic.allSettled() method implements ALLSETTLED (all completed) logic gate semantics, waiting for all Promises to complete (regardless of success or failure), returning an array containing the status of each Promise. It is equivalent to standard Promise.allSettled(), but provides more intuitive logical semantics.

Syntax

javascript
 PromiseLogic.allSettled(iterable)

Parameters

ParameterTypeDescription
iterableIterable<Promise<T>>An iterable collection of Promise objects

Return Value

Returns a Promise that resolves to an array of completion status of all Promises, containing success or failure information for each Promise.

Promise<PromiseSettledResult<T>[]>

Behavior

Completion Condition

Waits for all Promises to complete (regardless of success or failure), returns an array containing the status of each Promise.

Special Case

The allSettled method never fails, always returns a successful result array.

Examples

Basic Usage

ALLSETTLED Logic Example - Waits for all Promises to complete

JAVASCRIPT
Loading...

Result Processing

ALLSETTLED Logic Example - Process completion results

JAVASCRIPT
Loading...

Real Application

Batch operation result analysis

JAVASCRIPT
Loading...

Important Notes

  • ALLSETTLED logic behaves exactly like standard Promise.allSettled()
  • Always returns successful results, containing completion status of all Promises
  • Suitable for scenarios requiring knowledge of all operation results, such as batch operations, result analysis
  • Returned array contains status (fulfilled or rejected) and corresponding value or reason for each Promise