Interface JSPromise.Executor<T>

All Superinterfaces:
org.teavm.jso.JSObject
Enclosing class:
JSPromise<T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface JSPromise.Executor<T> extends org.teavm.jso.JSObject
Interface for a function wrapped by a promise.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onExecute(JSConsumer<T> resolveFunc, JSConsumer<Object> rejectFunc)
     

    Methods inherited from interface org.teavm.jso.JSObject

    cast
  • Method Details

    • onExecute

      void onExecute(JSConsumer<T> resolveFunc, JSConsumer<Object> rejectFunc)
      Parameters:
      resolveFunc - Call this function to resolve with success value.
      rejectFunc - Call this function to reject with error value.