DayJS throwing TS2339 error #19502
-
Hey! Awhile back, we refactored our tests to use DayJS, due to Moment.js being deprecated. We followed the Cypress recipe to get it set up, and it works perfectly fine when running tests. However, Intellisense reports the following error on every single instance of DayJS in our code: We've tried a few solutions to this. The solution we've commonly seen is to add it to the Cypress namespace in the
This results in the exact same error. We have also tried adding it to a global namespace in the
This removes the TS2339 error, but then results in a new error: This is my
I am at my wit's end - Any ideas what I am doing wrong here? Since our tests run without issue, it's not a blocker, but it results in hundreds of errors that make it nearly impossible to find actual errors being reported. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
create a cypress-global-vars.d.ts in your support folder
|
Beta Was this translation helpful? Give feedback.
create a cypress-global-vars.d.ts in your support folder
cypress-global-vars.d.ts
file: