microsoft / microsoft/TypeScript
API: expose getOptionalType and getNonOptionalType
Nobody has claimed this yet.
- 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
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 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