Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(parser)!: treat unambiguous files containing TS export assig…
…nments as modules (#6253) An "unambiguous" TS source which contains an `export = <value>;` statement should be interpreted as an ES module. This is in line with [this Babel test case](https://github.com/babel/babel/tree/94e166782a37074d8c0031fc869f37e1b456194f/packages/babel-parser/test/fixtures/typescript/export/equals-in-unambiguous) which has [input option of `sourceType: "unambiguous"`](https://github.com/babel/babel/blob/94e166782a37074d8c0031fc869f37e1b456194f/packages/babel-parser/test/fixtures/typescript/export/equals-in-unambiguous/options.json#L2), and [outputs an AST with `sourceType: "module"`](https://github.com/babel/babel/blob/94e166782a37074d8c0031fc869f37e1b456194f/packages/babel-parser/test/fixtures/typescript/export/equals-in-unambiguous/output.json#L7).
- Loading branch information