Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various attempts at implementing transparently composable Promises #41

Merged
merged 2 commits into from
Jul 13, 2017

Conversation

ahamid
Copy link
Collaborator

@ahamid ahamid commented Jun 28, 2017

Gave a shot at implementing this. One desirable (although possibly not mandatory) characteristic would be returning the "previous" value the variable held, while currently holding a Promise value. I wasn't able to follow all the conditions under which this value gets set/returned; i ended up overriding this.value via a setter/getter, although I wasn't successful in capturing/intercepting all possibilities.
Alternative is to just return undefined whenever the Variable holds an unfulfilled Promise, which will work as long as the consuming code knows how to interpret this.

Update: updated with a simple helper that just does the decoupled subscribe/put

@ahamid ahamid force-pushed the promised branch 2 times, most recently from 293692c to 943630a Compare June 29, 2017 00:25
@kriszyp
Copy link
Owner

kriszyp commented Jul 6, 2017

Here is my work so far, I have to do so more work on making transforms not cache stale synchronously retrieved values.
#42

@kriszyp kriszyp merged commit a80db00 into kriszyp:master Jul 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants