-
Notifications
You must be signed in to change notification settings - Fork 99
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
Cant find meta
on PromiseManyArray
#1539
Comments
meta
on ArrayProxy
in @types/ember
4.0.2meta
on ArrayProxy
Meta property does exist in my case, but I can't figure out how to specify type for it, without casting after query. |
Sorry for the long delay in responding! This is a gap/error in the definition of the |
Ah, a further and more important update: the types for |
meta
on ArrayProxy
meta
on PromiseManyArray
Thanks for the response Chris (I just watched some of your Glint videos with Dan Freeman very informative thankyou!) It has been some time since I opened this issue and with various updates it has changed somewhat. It seems that the record type is now const booksResult = await this.store.query('book-library/book', bookSearchQuery)
const { groups = [] }: { groups: BookSearchResultsGroup[] } = booksResult.meta Is there somewhere that I am supposed to add a type for the meta property here? I am running Ember 4.12.3 and ember-data 4.12.3. If this issue goes away in Ember 5 or ember-data 5 let me know and I'm happy to continue ignoring it until we upgrade |
+1 |
Which package(s) does this problem pertain to?
Maybe others?
What are instructions we can follow to reproduce the issue?
Update toEDIT: This error appeared for me when I updated types/ember to 4.0.2, but the sandbox link below shows the issue and it's on types/ember 3.x, so not sure what's going on@types/ember
4.0.2meta
key, typescript will say it doesn't existReproduction Case
I've done my best to create a sandbox here.
https://codesandbox.io/s/my-app-forked-4v11p8?file=/app/routes/index.ts
The sandbox IDE does not show redline errors, but if you open a terminal and type
yarn tsc --build
you'll see the errorNow about that bug. What did you expect to see?
meta
property should exist onArrayProxy
and not cause a TS errorWhat happened instead?
Typescript says
meta
property does not existThought I would try a different key
update()
that was mentioned in an issue that I think might be related?#1525
The text was updated successfully, but these errors were encountered: