Skip to content

Mismatched types #398

Closed
Closed
@zomchak-code

Description

@zomchak-code

Describe the Bug
Types are not matching actual values returned

Example Code

const ticket = await client.tickets.show(392005);
console.log({ id: ticket.id, response: ticket.response });

Screenshot 2023-12-15 at 00 26 43

Expected Behavior
Either .id reported as type error or following output:

{
  id: 392005,
  response: undefined
}

Actual Behavior
Either .resource reported as type error and following output:

{
  id: undefined,
  response: {
    json: [Function: json],
    status: 200,
    headers: {
      get: [Function: get]
    },
    statusText: "OK"
  }
}

Environment Information

  • node-zendesk version: 5.0.7
  • Node.js version: 20.2.0
  • Operating System: MacOS
  • Any other relevant software versions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions