Eliminate API reliance on Object.toString()
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5k
- Forks
- 162
- Avg merge
- 17h 24m
- Merged PRs (30d)
- 8
Description
Overloading Object.toString() seemed like a sensible way to provide functions for rendering various objects as strings. However, in practice this is confusing because every object has this method, so you never know whether it will actually work or not.
If we used some other method name (e.g. toText()) then IntelliSense would tell you whether there is a converter or not.
See https://github.com/Microsoft/web-build-tools/issues/901 for an example
Contributor guide
No contributing guide indexed for this repository
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 searching the repository for uses of Object.toString() and identify which rendering APIs depend on it. Review the related API definitions and the example in Microsoft/web-build-tools#901 before deciding the replacement scope. Done means the reliance is removed consistently and the affected behavior is covered by the project’s existing checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, developer-experience
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100