microsoft / microsoft/azure-devops-node-api

Return types do not indicate nullability

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

Nobody has claimed this yet.

Area: NodeApi bug code generation
Dominant language
TypeScript
Stars
502
Forks
244
Avg merge
2h 24m
Merged PRs (30d)
2

Description

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[]>.

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.

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.