Skip to content

repro of type erase problem in babel's typescript support

Notifications You must be signed in to change notification settings

avindra/babel-ts-export-type-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo contains the minimum needed to demonstrate the type erasure bug seen in Babel's typescript mode.

Issues

It was seen in Recharts Issue #2360.

Reproduce

Check the checked-in es6 folder to see what babel is currently emitting, or run npm run build / yarn build locally.

Expected:

SomeType is erased from es6/index.js

Actual:

SomeType is still referenced in es6/index.js

This is a problem for all the JavaScript (non-Typescript) consumers since the type does not exist in the build.

If we check es6/ModuleA.js, we can see SomeType is erased, so it's at least partly working.

About

repro of type erase problem in babel's typescript support

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published