TS type definition has missing override type of "'Date'"
See original GitHub issueCurrent behavior:
const now = new Date(2019, 3, 2).getTime();
cy.clock(now, ['Date']); //IDE complains that only 'setTimeout', 'clearTimeout', 'setInterval', 'clearInterval' are available
https://docs.cypress.io/api/commands/clock.html#Now
- documentation demonstrates that this is a valid use case
Desired behavior:
const now = new Date(2019, 3, 2).getTime();
cy.clock(now, ['Date']);
Should not generate error/warning message in IDE
Versions
Cypress 3.2.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to overwrite incorrect TypeScript type definition installed ...
The typings have errors but are declared in the jimp source directory (jimp.js and jimp.d.ts). I need my local replacement to override the...
Read more >Template type checking - Angular
When a library's typings are wrong or incomplete (for example, missing null | undefined if the library was not written with strictNullChecks in...
Read more >Documentation - TypeScript 3.7
When we write code like. ts. let x = foo?.bar.baz();. this is a way of saying that when foo is defined, foo.bar.baz() will...
Read more >Announcing TypeScript 4.3 - Microsoft Developer Blogs
Let's dive in to what TypeScript 4.3 brings! Separate Write Types on Properties; override and the --noImplicitOverride Flag; Template String ...
Read more >The unknown Type in TypeScript - Marius Schulz
TypeScript 3.0 introduced a new unknown type which is the type-safe counterpart of the any type.
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 FreeTop 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
Top GitHub Comments
Gosh I’m feeling dumb… I would swear I tried that (and also many more things…) before posting here but hey it works!
Thanks for your quick reply!
Released in
3.3.0
.