Exported variable ... has or is using name ... from external module ... but cannot be named #41934
Labels
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
TypeScript Version: 4.1.2
Search Terms:
typescript declaration exported variable
typescript exported variable cannot be named
typescript error exported variable
Code:
Expected behavior:
Code should not fail with
Exported variable ... has or is using name ... from external module ... but cannot be named
Actual behavior:
You use
declaration: true
or"composite": true
.If you make a file that's exporting a map wrapped in any helper function like
Record
,Partial
etc. which is usingenum
values as keys.And then use this type inside another file and wrap it in another similar helper (e.g.
Record
).Code fails with
Exported variable ... has or is using name ... from external module ... but cannot be named
.Playground Link: https://codesandbox.io/s/serene-andras-gsjqx?file=/src/index.ts
The text was updated successfully, but these errors were encountered: