You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 6, 2018. It is now read-only.
When using async/await on an ember Route model, awaiting the result of store.findRecord throws the following typescript exception. (in the comment below)
asyncmodel(): Promise<any>{conststore=get(this,'store');awaitstore.findRecord('someStoreRecord',1);// Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method}
Using a .then works as expected. This issue arises with as mentioned, using async/await
Could this be an issue with the return type definition for store.findRecord which is PromiseObject<T> & T?
The text was updated successfully, but these errors were encountered:
I had a quick look. It's caused by the self-recursive nature of PromiseObject and PromiseArray (they are promises which resolve to themselves). To fix this we might have to break some pathological scenarios around promise proxies, but I won't lose any sleep over it.
I'll open a PR in the next couple of days if nobody else gets to it.
When using async/await on an ember Route model, awaiting the result of
store.findRecord
throws the following typescript exception. (in the comment below)Using a
.then
works as expected. This issue arises with as mentioned, usingasync/await
Could this be an issue with the return type definition for
store.findRecord
which isPromiseObject<T> & T
?The text was updated successfully, but these errors were encountered: