[TypeScript] Parsing error on import type thing = require('thing')
#12957
Labels
area: typescript
i: bug
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
pkg: parser
Bug Report
Current behavior
Removing the
type
makes it parse properly. I believe this syntax is new in TS@4.2? Not mentioned in the blog post, tho.I'm trying to update in jestjs/jest#11142 and there you can see I got an error from
tsc
for not having thetype
modifier, followed by Babel throwing syntax errors after adding it.Input Code
Expected behavior
It should parse properly (not necessarily transform)
Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
babel.config.js
Environment
@babel/core
Possible Solution
Additional context
The text was updated successfully, but these errors were encountered: