Make it possible to change "now"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.1k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
As a developer it would be very nice to have a way to override the internal "now" functionality.
I realize that it is possible to send it, or rather "time2, as a argument when invoking methods, but that is a very cumbersome way of doing it.
I propose a way to simply "setNow" that takes a function as a argument and overrides "now" to this.
It would make implementations that modifies the "rate" of time much more convenient to do.
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
The issue does not name a file, test, or entry point. Start by locating the existing handling for the time2 argument and the internal "now" functionality, then determine how a setNow function should interact with them. Done means the override behavior is implemented and covered by tests, including the proposed rate-of-time use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100