2023-02-23 10:58:10 -05:00
|
|
|
import * as myImport1 from "@denotest/esm-basic";
|
|
|
|
import * as myImport2 from "./node_modules/@denotest/esm-basic/main.mjs";
|
2023-02-23 12:33:23 -05:00
|
|
|
import * as myImport3 from "@denotest/esm-basic/main.mjs";
|
2023-02-23 10:58:10 -05:00
|
|
|
|
|
|
|
myImport1.setValue(5);
|
|
|
|
myImport2.setValue(2);
|
|
|
|
|
2023-02-23 12:33:23 -05:00
|
|
|
// these should all give type errors
|
2023-02-23 10:58:10 -05:00
|
|
|
const value1: string = myImport1.getValue();
|
|
|
|
const value2: string = myImport2.getValue();
|
2023-02-23 12:33:23 -05:00
|
|
|
const value3: string = myImport3.getValue();
|
2023-02-23 10:58:10 -05:00
|
|
|
|
2023-02-23 12:33:23 -05:00
|
|
|
// these should all be equal because it should be mutating the same module
|
2023-02-23 10:58:10 -05:00
|
|
|
console.log(value1);
|
|
|
|
console.log(value2);
|
2023-02-23 12:33:23 -05:00
|
|
|
console.log(value3);
|