Callback function for wrapping implementations to new promises.

The callback provides two functions:

  • resolve (T->Void) is to be called with a value of type T when the operation has completed successfully.
  • reject (Any->Void) is to be called with a reason when the operation has failed.