blob: 03aaabe0591e6b3c6e468289de536514a524384a (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
import defaultImport, { getValue } from "npm:@denotest/cjs-this-in-exports";
import * as namespaceImport from "npm:@denotest/cjs-this-in-exports";
console.log(defaultImport.getValue());
// In Node this actually fails, but it seems to work in Deno
// so I guess there's no harm in that.
console.log(namespaceImport.getValue());
// This will throw because it's lost its context.
// (same thing occurs with Node's cjs -> esm translation)
getValue();
|