-
Notifications
You must be signed in to change notification settings - Fork 56
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
Make async/await available to the code base #43
Comments
I think this should be addressed sooner rather than later. During Ratings Prompt testing, I could get into a state where I would manually delete a storage value (e.g., This is a pretty dev-specific scenario where I was internally messing with storage internals, but I'm afraid leaving this paradigm around could encourage more use of it by engineers and lead to bigger unexpected behaviors. |
While true that async/await won't be supported by native JavaScript until at least ES8 (ES2017), Typescript 1.7+ has implemented So here are the steps we need to take to close this issue:
|
Investigation/implementation notes:
Syntactical changes in ES6:
|
If we can hold on just a little longer, TypeScript 2.1 will support ES5/ES3 (currently scheduled for November 2016). It's already implemented in TypeScript@next if we wanted to play around with it. https://github.com/Microsoft/TypeScript/wiki/Roadmap |
PR #22 introduced a
getCachedValue
method on the Storage abstraction infrontEndGlobals.ts
. It was created to avoid the asynchronicity of callinggetValue
inside of the ratings helper feature, which was makingratingsPanel.tsx
much less unit testable.See full discussion.
getCachedValue
could be avoided if we couldawait
the completion of some asynchronous tasks before moving on with execution in the calling method.So this task tracks investigation and work needed to polyfill
async
/await
. Some initial questions:async
/await
polyfill module available if we don't wish to upgrade to ES8?The text was updated successfully, but these errors were encountered: