question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API Return Types not typed.

See original GitHub issue

For example the result of client.issueSearch.searchForIssuesUsingJqlGet is typed as Promise<any>.

@MrRefactoring you also seem to be a contributor to https://github.com/floralvikings/jira-connector , which does have return typings, but is used the deprecated request module 😮 , what gives?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
MrRefactoringcommented, Mar 22, 2020

Hi, @NaridaL!

Yes, I really helped develop the jira-connector, but support of the legacy code and the heavy weight of the library inspired me to create jira.js, a lighter and more relevant solution for working with Jira api.

I wrote a small script that from swagger and postman collection generates code for me for this library, but I don’t have enough time to add the part that is responsible for the returned types 😦

I started writing it, but never finished it. If you are suddenly interested to help me, then I am open to communication in this direction

1reaction
MrRefactoringcommented, Jan 4, 2021

@Joseaestevez I think that’s what you’re looking for:

import { Client } from 'jira.js';

const client = new Client({ host: '...' });

async function searchViaJql() {
  const data = await client.issueSearch.searchForIssuesUsingJqlGet({
    jql: 'creator=QB',
  });

  console.log(data);
}

searchViaJql();
Read more comments on GitHub >

github_iconTop Results From Across the Web

Web API Return Types in ASP.NET Core - Code Maze
While using specific types, we do not have to define the [ProducesResponseType] attribute as the return type is visible from the action ...
Read more >
Controller action return types in ASP.NET Core web API
The ActionResult types represent various HTTP status codes. Any non-abstract class deriving from ActionResult qualifies as a valid return type.
Read more >
c# - WebApi 2 return types - Stack Overflow
ToUpper(); //Response will not tolerate setting of some header values if ( keyUpr != "CONTENT-TYPE" && keyUpr !=
Read more >
create Web API response - TutorialsTeacher
It's not necessary that all action methods must return something. It can have void return type. For example, consider the following Delete action...
Read more >
What are the various return types of a controller action in C# ...
The Web API action method can have following return types. ... It's not necessary that all action methods must return something. It can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found