Skip to content

Consider changing return types of EntryQueryable methods #167

Closed
@mccarthyk

Description

@mccarthyk

Please consider changing the return types of the only and except methods from EntryQueryable to this to allow proper chaining.

only(fieldUid: string|string[]): this {
// ...
return this
}

except(fieldUid: string|string[]): this {
// ...
return this
}

The above should fix the issue of Property 'query' does not exist on type 'EntryQueryable'. when chaining other methods on entries afterward.

const entries = await stack
      .contentType("contentTypeUid")
      .entry()
      .only(["title", "url"])
      .query() // Property 'query' does not exist on type 'EntryQueryable'.
      .where("tags", QueryOperation.EQUALS, "tech")
      .find();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions