microsoft / microsoft/TypeScript
'utilities.ts' is an API surface hazard
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
utilities.ts consists of 4 different namespaces:
- one which seems to be entirely internal
- one which is entirely exposed
- one which is entirely exposed and is entirely type predicate functions
- one which is a random assortment of internal and exposed functions that have no consistent usage
Just from my intuition and experience, I don't think this is a good idea. It's just too easy to put a new helper in some random section of the file and forget whether or not it's being exposed.
As a naive first approximation, here's what I think would be more appropriate for each respective namespace:
utilities.tspublicUtilities.tspublicPredicates.ts- I don't know, TBD.
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 reading utilities.ts and catalog the four namespaces, noting which functions are internal, exposed, or type predicates. Define a consistent destination for each group, including the currently unresolved mixed namespace. Done means the utility organization and exposure boundaries are clear and consistently applied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100