cannot use unique symbol as object key when generating declarations from JS #37022
Labels
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
TypeScript Version: 3.9.0-dev.20200225
Also tried in 3.8.2.
Search Terms: js symbol declaration ts9006
Code
See gist https://gist.github.com/boneskull/93484ca75cef49c11c69b1d416153bc4
Additionally,
a.d.ts
is created successfully:I could not find a workaround (though there may be one!), since the
unique symbol
syntax is seemingly unavailable to JavaScript; it's not allowed in a@type
docstring attribute. A workaround like this was shown in #36976.Expected behavior:
b.d.ts
is generated without error.Actual behavior:
kSymbol
is considered private,b.d.ts
is not generated, and an error is emitted:Note that
kSymbol
is explicitly exported, and is not "private".Playground Link: (playgrounds don't support generating declarations)
Related Issues: This may be related to #36976.
The text was updated successfully, but these errors were encountered: