Skip to content

Return value of Store.query is incorrect #1446

Open
@lolmaus

Description

@lolmaus

Which package(s) does this problem pertain to?

  • @types/ember-data

Reproduction Case

const result = await store.query('products');

Now about that bug. What did you expect to see?

result.meta // => a `Record` with metadata

What happened instead?

TypeScript says that property meta does not exist.

Comment

meta exists exists in type ManyArray and, by inherence, PromiseManyArray.

But Store.query is typed to return PromiseArray that does not contain meta.

CC @chriskrycho @dfreeman @jamescdavis @mike-north @dwickern @catz

Issue migrated from DefinitelyTyped/DefinitelyTyped#55562

Metadata

Metadata

Assignees

No one assigned

    Labels

    types:coreSomething is wrong with the Ember type definitionstypes:core:dataSomething is wrong with the Ember Data type definitions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions