Open
Description
Which package(s) does this problem pertain to?
- @types/ember
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.2- Perform a query, try to access
meta
key, typescript will say it doesn't exist
const booksResult = await this.store.query('book-library/book', bookSearchQuery)
console.log(booksResult.meta) // Property 'meta' does not exist on type 'ArrayProxy<BookLibraryBook>'
Reproduction 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 error
Now about that bug. What did you expect to see?
meta
property should exist on ArrayProxy
and not cause a TS error
What happened instead?
Typescript says meta
property does not exist
Thought I would try a different key update()
that was mentioned in an issue that I think might be related?
#1525