Promise<T> constructor

Promise<T>({
  1. Future<Object> then<TResult1, TResult2>([
    1. FutureOr<TResult1> (
      1. dynamic
      )?,
    2. FutureOr<TResult2> ([
      1. dynamic
      ])?
    ])?,
  2. Future<Object> catch$<TResult>([
    1. FutureOr<TResult> ([
      1. dynamic
      ])?
    ])?,
  3. Future finally$([
    1. void ()?
    ])?,
})

Implementation

factory Promise({
  _i2.Future<_i2.Object> Function<TResult1, TResult2>([
    _i4.FutureOr<TResult1> Function(_i2.dynamic)?,
    _i4.FutureOr<TResult2> Function([_i2.dynamic])?,
  ])? then,
  _i2.Future<_i2.Object> Function<TResult>(
          [_i4.FutureOr<TResult> Function([_i2.dynamic])?])?
      catch$,
  _i2.Future<_i2.dynamic> Function([void Function()?])? finally$,
}) =>
    Promise._(
      then: then == null ? null : _i6.allowInterop(then),
      catch$: catch$ == null ? null : _i6.allowInterop(catch$),
      finally$: finally$ == null ? null : _i6.allowInterop(finally$),
    );