-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
bugSomething isn't working correctlySomething isn't working correctlyneeds discussionthis topic needs further discussion to determine what action to takethis topic needs further discussion to determine what action to takeupstreamChanges in upstream are required to solve these issuesChanges in upstream are required to solve these issues
Description
(Note: This probably doesn't affect any meaningful use cases, but I create issue for record.)
When we have the following scripts:
a.ts
const a = 1;
await import("./b.ts");
b.ts
const a = 2;
Then execute a.ts
and it causes the following error.
$ deno run --allow-read a.ts
error: TS2451 [ERROR]: Cannot redeclare block-scoped variable 'a'.
const a = 2;
^
at file:///Users/kt3k/0/di-test/b.ts:1:7
'a' was also declared here.
const a = 1;
^
at file:///Users/kt3k/0/di-test/a.ts:1:7
This doesn't happen when:
- b.ts has any import or export statement
- import of b.ts is not dynamic import
$ deno --version
deno 1.7.5 (release, x86_64-apple-darwin)
v8 9.0.123
typescript 4.1.4
Metadata
Metadata
Assignees
Labels
bugSomething isn't working correctlySomething isn't working correctlyneeds discussionthis topic needs further discussion to determine what action to takethis topic needs further discussion to determine what action to takeupstreamChanges in upstream are required to solve these issuesChanges in upstream are required to solve these issues