This is quite easy. You will need cdn.d.ts
, but you will also need to install the module in package.json
, (or at least @types/
), no matter what.
declare module 'https://cdn.skypack.dev/js-yaml@*' {
export * from 'js-yaml'
}
Also, I am consider if cdn.d.ts
file can be generated programmatically? (Next.js also generate typings for CSS modules on the fly.)
It would be nice if I can use Deno for Skypack CDN, but it seems that it does not have web-browser-related typings.
Or, do have have a better way?
Top comments (2)
tsconfig.json / jsconfig.json path aliases might be a much much easier option.
I've never tried deno. maybe, I'll try later.