Last active
June 13, 2018 21:49
-
-
Save dimfeld/8acaa89e17de3028cb69d6c75ae39bb3 to your computer and use it in GitHub Desktop.
Typescript compiler crash on redundant export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { abc } from './redundant_export'; | |
abc(1, 2, 3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Removing either this `export` keyword or the `module.exports` assignment below makes the error disappear. | |
export function abc(a, b, c) { | |
return 5; | |
} | |
module.exports = { | |
abc, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compilerOptions": { | |
"outDir": "./dist", | |
"target": "es2017", | |
"sourceMap": true, | |
"module": "commonjs", | |
"alwaysStrict": true, | |
"allowJs": true | |
}, | |
"include": [ | |
"*.js" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just download the files and run
tsc
to see the crash. I first saw this in 2.9.1 and it's still present in 2.9.2 andnext
as of this writing.