Skip to content

Instantly share code, notes, and snippets.

@benmerckx
Created June 25, 2019 11:21
Show Gist options
  • Save benmerckx/156346af5fedef873d92c4b1ae5505d1 to your computer and use it in GitHub Desktop.
Save benmerckx/156346af5fedef873d92c4b1ae5505d1 to your computer and use it in GitHub Desktop.
import haxe.extern.EitherType;
@:expose @:keep interface PromiseLike<T> {
function then<T, T2>(
onfulfilled: (value: T) -> haxe.extern.EitherType<T, PromiseLike<T>>,
?onrejected: (reason: Any) -> haxe.extern.EitherType<T2, PromiseLike<T2>>
): PromiseLike<haxe.extern.EitherType<T, T2>>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment