node-jira-client icon indicating copy to clipboard operation
node-jira-client copied to clipboard

TypeScript Definition

Open sgtoj opened this issue 7 years ago • 8 comments

Can you add TypeScript definitions?

  • [ ] create the index.d.ts file
  • [ ] add "typings": "./index.d.ts" to package.json

sgtoj avatar May 18 '17 13:05 sgtoj

I don't have time to do this, but I'm not necessarily opposed to doing so. If you want to submit a PR for this, I'd be happy to look it over.

KanoYugoro avatar May 18 '17 14:05 KanoYugoro

You can also see the typescript implementation in the jira-api-wrapper library

MrRefactoring avatar Feb 17 '19 19:02 MrRefactoring

You can also see the typescript implementation in the jira-api-wrapper library

@MrRefactoring I like your newly created project. It's pity you did not consider putting that effort in this project.

dkokic avatar Feb 18 '19 09:02 dkokic

@dkokic I looked through several wrapper projects for jira api. Everywhere are asked to introduce support for typescript, but the amount of work in such projects is comparable to writing a new project. Therefore, it was decided to write a new project, initially supporting typescript.

At a minimum, current PRs would be incompatible with the project. And we would definitely get breaking changes.

It would also be necessary to rework the entire project, which is much more complicated and takes longer than developing modularly

MrRefactoring avatar Feb 18 '19 09:02 MrRefactoring

There is currently a definition for this library on DefinitelyTyped, it works really well but is not 100% accurate, some methods (createVersion, updateVersion) are listed there as expecting a string, while looking at this library source code it seems they need an object.

dougmaitelli avatar Sep 28 '20 15:09 dougmaitelli

rewriting in typescript?

Seth10001 avatar Oct 02 '22 18:10 Seth10001

Any estimates how much effort would be required to rewrite it in TS? Happy to support the effort, but would need guidance of some more experienced people.

dkokic avatar Oct 03 '22 09:10 dkokic

I good place to start would be the following:

  • Change Jira.js to Jira.ts and update the build npm script to use typescript (tsc)
  • Add input Interfaces for the JiraApi constructor and all methods

Seth10001 avatar Oct 03 '22 14:10 Seth10001