Issue
I want to use "window.EyeDropper" in a (vue2 + ts) project. When I write this line of code:
console.log(window.EyeDropper);
My plugins Vetur throws an error message:Property 'EyeDropper' does not exist on type 'Window & typeof globalThis'.
How can I modify the code to make it correct?
Solution
Create and/or add to src/globals.d.ts
:
declare global {
interface Window {
EyeDropper?: any;
}
}
Answered By - yoduh
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.