microsoft / microsoft/TypeScript

API: expose getOptionalType and getNonOptionalType

Open
#33,875 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Domain: API In Discussion Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

Suggestion

As API user I need to distinguish the optionalType and the real undefined type when handling optional chaining.
getOptionalType and getNonOptionalType are already present on TypeChecker, but not exposed in the public API.

/cc @rbuckton

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 the public TypeChecker API and the existing getOptionalType and getNonOptionalType implementations. Check how other TypeChecker methods are exposed and where compiler API tests are maintained. Done means both methods are publicly available with behavior covering optional chaining and the distinction from the real undefined type.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.