Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

LikePromiseを強くする #5

Open
yaakaito opened this issue Aug 19, 2013 · 0 comments
Open

LikePromiseを強くする #5

yaakaito opened this issue Aug 19, 2013 · 0 comments

Comments

@yaakaito
Copy link
Owner

interface LikePromise<T> {
  (value: T): void; // success alias
  (error: Error): void; // failure alias
  success(value: T): void;
  failure(error: Error): void;
}
future(complete => {
  complete("aaaa")
})
future((success, failure) => {
  failure(new Error("aaa"));
})
future(promise => {
  promise.success("aaaa");
});
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant