Type Defintions: Clock returned from install is missing uninstall property/function
See original GitHub issueFakeTimers version : 7.0.2 Environment : Node.js Example URL : https://codesandbox.io/s/sharp-fast-7zwis?file=/src/index.ts Other libraries you are using: TypeScript (4.1.3)
What did you expect to happen?
When storing the return value of install
in a variable, the uninstall
function helps uninstalling the fake clock again from the environment.
import FakeTimers from "@sinonjs/fake-timers";
const clock = FakeTimers.install();
clock.uninstall();
Note: I’m currently limited in time, otherwise I would submit a PR which adds the types from DefinitelyTyped as an initial (tested and working) version for the types.
What actually happens
When using TypeScript, the return value of install
does not include the uninstall
property.
How to reproduce
You can check an example here: https://codesandbox.io/s/sharp-fast-7zwis?file=/src/index.ts
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Fix problems that block programs from being installed or ...
The Program Install and Uninstall troubleshooter helps you automatically repair issues when you're blocked from installing or removing programs.
Read more >Troubleshoot Tableau Server Install and Upgrade
Many Tableau Server issues can be addressed with some basic steps: Make sure there is enough disk space on each computer running Tableau...
Read more >Java project in Eclipse: The type java.lang.Object cannot be ...
Close the project and reopen it. Clean the project (It will rebuild the buildpath hence reconfiguring with the JDK libraries). OR. Delete and...
Read more >Symantec Endpoint Protection - TechDocs
package is missing on the Linux client, the forensic information is collected for all other types of events except for network events. Incorrect ......
Read more >PackageManager - Android Developers
Code indicating that this package was installed as part of device setup. ... Returns the property defined in the given package's <appliction> tag....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We can make up to date type definitions available to the TS community and save effort.
Perhaps we jumped the gun and released the files too soon. I’m hoping that the TS/DT community will see this in a kind light, and help bring us up to parity with the DT types by contributing to the documenation effort
For those that have gotten bitten by the immature
.d.ts
files: there’s documentation on how to use the DT types in your project@bodinsamuel Yes, we’re strict on this. It’s not about effort or file size.