1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-24 08:09:08 -05:00
denoland-deno/tests/specs/npm/esm_import_cjs_default/main.ts

24 lines
778 B
TypeScript
Raw Normal View History

// @ts-check
import cjsDefault, {
MyClass as MyCjsClass,
} from "npm:@denotest/cjs-default-export";
import * as cjsNamespace from "npm:@denotest/cjs-default-export";
import esmDefault from "npm:@denotest/esm-import-cjs-default";
import * as esmNamespace from "npm:@denotest/esm-import-cjs-default";
console.log("Deno esm importing node cjs");
console.log("===========================");
console.log(cjsDefault);
console.log(cjsNamespace);
console.log("===========================");
console.log("Deno esm importing node esm");
console.log("===========================");
console.log(esmDefault);
console.log(esmNamespace);
console.log("===========================");
console.log(cjsDefault.default());
console.log(esmDefault());
console.log(MyCjsClass.someStaticMethod());