D
Deno

help

Can't import typescript module

FFjordWarden9/17/2023
Why can I only import the js file and not the ts file?
import * as zip from "https://deno.land/x/zipjs@v2.7.29/index.js"
import * as zipjs from "https://deno.land/x/zipjs@v2.7.29/index.d.ts";

zipjs.Writer //undefined
zip.ZipWriter //[class ZipWriter]
import * as zip from "https://deno.land/x/zipjs@v2.7.29/index.js"
import * as zipjs from "https://deno.land/x/zipjs@v2.7.29/index.d.ts";

zipjs.Writer //undefined
zip.ZipWriter //[class ZipWriter]
Jjavi9/17/2023
you can’t import a d.ts file, that’s only type definitions you can however use the js version and add @deno-types="…" above the import to have typescript support

Looking for more? Join the community!