-
-
Notifications
You must be signed in to change notification settings - Fork 237
Closed
Labels
Description
Describe the Bug
The types are broken, the TypeScript code doesn't compile. I took an example from node_modules/node-zendesk/dist/types/clients/core/tickets.d.ts. Note the @example:
* Create a new ticket.
* @example
* const newTicket = await client.tickets.create({ subject: 'New ticket', description: 'Ticket description' });
*/
create(ticket: CreateOrUpdateTicket): Promise<{
result: Ticket;
}>;
I took this code and created an app:
Example Code
import { createClient } from "node-zendesk";
async function test123() {
const client = createClient({});
const newTicket = await client.tickets.create({ subject: 'New ticket', description: 'Ticket description' });
}Expected Behavior
The code to compile successfully.
Actual Behavior
There is a compilation error:
Object literal may only specify known properties, and 'subject' does not exist in type 'CreateOrUpdateTicket'.ts(2353)
(property) subject: string
Environment Information
node-zendeskversion: 5.0.13- Node.js version: v20.9.0
- Operating System: MacOS
- Any other relevant software versions?
Additional Context
"dependencies": {
"node-zendesk": "^5.0.13",
"typescript": "^5.6.2"
}
Maybe the problem is in the TypeScript version?
michal-boruczkowski and stasinua
