Billionz
Billionz•2y ago

NPM Import missing types

Playing around with some deno code and testing a npm import, the original package has types (redaxios) although when I import it it's not showing any intellisence in VS Code
7 Replies
Testersen™
Testersen™•2y ago
If the package does not provide its own types you will have to tell deno where to find those types:
// @deno-types="npm:@types/express"
import express from "npm:express";
// @deno-types="npm:@types/express"
import express from "npm:express";
Billionz
Billionz•2y ago
Thanks although already tried this and the package does supply its own types. :/
Billionz
Billionz•2y ago
Billionz
Billionz•2y ago
But i've managed to get it working with other packages, so not sure whats the issue with this one.
Testersen™
Testersen™•2y ago
What in the fuck are those types 🤮
Billionz
Billionz•2y ago
haha don't worry i've switched over to a similar package But maybe worth listing as a bug / to be aware of Thanks for your help
Testersen™
Testersen™•2y ago
Anytime Those typings are definitely cursed, and I hope to god I never see them again xd