Closed dougmaitelli closed 4 years ago
@dougmaitelli Seems like a mistake. Can you create a PR to change string to object?
You mean like this? https://github.com/jira-node/node-jira-client/pull/309 That would be a simple / short comment doc change then.
Does anyone have experience contributing to DefinitelyTyped to fix the types there? https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/jira-client/index.d.ts#L59
Thanks for the PR. I updated the package.
I personnaly never contributed to DefinitelyTyped. It's out of our control, so you have to check with them directly 💦
Looking at the source code here: https://github.com/jira-node/node-jira-client/blob/22b39c6844d43b898b9976cbc86ac1b0f53549ba/src/jira.js#L532
It seems there is some unclear information between the methods createVersion and updateVersion, the first says on comments the parameter is an object, the second says it is a string. But looking at the code it seems both are actually expecting an object in fact.
This caused the types from DefinitelyTyped to list both of them as string somehow, and when using this library on typescript it is impossible to use the createVersion method.
Can you please provide some light on that?