Web developer. Lover of Typescript. Also comfortable with a bunch of other shiny languages and "big-brain tech tools" to flex about at parties! ( ´・・)ノ(._.`)
You've tagged TypeScript but there's no explanation on how to add extension development types. Only a -ts Vite template will not do miracles to add the right types.
You're right, good point. I forgot about it because I didn't need anything from Chrome API in this example. Try running npm i -D @types/chrome or yarn add --dev @types/chrome, it should do the job.
Web developer. Lover of Typescript. Also comfortable with a bunch of other shiny languages and "big-brain tech tools" to flex about at parties! ( ´・・)ノ(._.`)
Thanks, but I've done this and it doesn't work. I'm using VSCode and the intellisense is completely unaware of any chrome types. Can you try this yourself too in a quick example project?
You've tagged TypeScript but there's no explanation on how to add extension development types. Only a
-ts
Vite template will not do miracles to add the right types.You're right, good point. I forgot about it because I didn't need anything from Chrome API in this example. Try running
npm i -D @types/chrome
oryarn add --dev @types/chrome
, it should do the job.Thanks, but I've done this and it doesn't work. I'm using VSCode and the intellisense is completely unaware of any chrome types. Can you try this yourself too in a quick example project?
Have you registered the types in your
.tsconfig
?Mentioned here as well.
What about chrome-types, which is mentioned in official docs ? developer.chrome.com/docs/extensio...
I see for some reason, it doesn't have much downloads also.