[Bug]: TypeScript plugin drops class export #14945
Labels
area: typescript
i: bug
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
pkg: traverse (scope)
馃捇
How are you using Babel?
Programmatic API (
babel.transform
,babel.parse
)Input code
Configuration file name
No response
Configuration
Current and expected behavior
Actual output:
Expected output, see this TypeScript playground:
Basically there is a compilation difference between babel's TypeScript preset and TypeScript itself.
Environment
OS: macOS 12.5.1
Node: 18.8.0
Yarn: 1.22.17
@babel/core: 7.19.1
@babel/preset-typescript: 7.18.6
Monorepo: no
Possible solution
No response
Additional context
My assumption is that babel sees the
declare class Signal {}
line and tags it as a type-only thing or something like that.The text was updated successfully, but these errors were encountered: