microsoft / microsoft/azure-devops-node-api
Return types do not indicate nullability
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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