Return types do not indicate nullability

Open
#616 15 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
api

Research direction

Start by locating GitApi.getRepositories(project) and tracing how its return type is declared and documented. Review the other API methods that can return null, then verify that their public TypeScript return types reflect that behavior. Done means the affected API surface no longer promises non-null results where null is possible.

Written by the indexing model from the issue text.

Description

Area: NodeApi bug code generation

Many methods can return null, but the API surface does not reflect this.

For example, GitApi.getRepositories(project) returns null if the project doesn't exist, but the return type is misleadingly listed as Promise<GitRepository[]>.

Dominant language
TypeScript
Stars
502
Forks
244
Avg merge
2h 24m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/azure-devops-node-api

All issues in microsoft/azure-devops-node-api

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.