You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deno bundle (also Deno.emit with bundle) seems to have broken.
For example when I export a class named Map, it conflicts with the builtin javascript Map type. By conflict I mean, that on each place where I like to use the map data structure, my own Map class will be instantiated (bundle should have renamed it to Map1 or something similar).
Steps to reproduce
I made a minimal example consisting of two files, with which the problem can be easily reproduced: myMap.ts
exportclassMap{hello(){console.log("Hi")}}
test.ts
import { Map as MyMap } from "./myMap.ts"
const map = new MyMap()
map.hello()
const tests = new Map<string, string>()
tests.set("test1", "my test")
When running test via deno run test.ts, I get the correct results:
Hi
But when running, after bundling, the error shows up:
>deno bundle test.ts test.js
Check file:///C:/work/test/test.ts
Bundle file:///C:/work/test/test.ts
Emit "test.js" (153B)
>deno run test.js
Hi
error: Uncaught TypeError: tests.set is not a function
tests.set("test1", "my test");
^
at file:///C:/work/test/test.js:9:7
Yes, duplicate of #10286. Previously symbols that shadowed the global scope symbols were being unnecessarily renamed, now they aren't being renamed at all.
deno bundle
(alsoDeno.emit
with bundle) seems to have broken.For example when I export a class named Map, it conflicts with the builtin javascript Map type. By conflict I mean, that on each place where I like to use the map data structure, my own Map class will be instantiated (bundle should have renamed it to Map1 or something similar).
Steps to reproduce
I made a minimal example consisting of two files, with which the problem can be easily reproduced:
myMap.ts
test.ts
When running test via
deno run test.ts
, I get the correct results:But when running, after bundling, the error shows up:
test.js
Which is obviously incorrect.
Additional details
Deno version: deno 1.14.0
The text was updated successfully, but these errors were encountered: