Closed IanVS closed 1 year ago
I suppose that the TypeScript compiler relaxes its parsing rules because it knows that eventually the code will be compiled into a CJS script. Maybe our parser should do the same assumptions.
I suppose that the TypeScript compiler relaxes its parsing rules because it knows that eventually the code will be compiled into a CJS script. Maybe our parser should do the same assumptions.
It may just be an incorrect mapping in our SourceType
implementation.
Environment information
What happened?
I installed the vscode extension into a simple project exploring typescript module resolution.
I got an error from rome on a file:
As far as I know, this is valid TypeScript code. In fact, it's taken from the TypeScript docs. The
.cts
extension indicates that the compilation target should be cjs. But rome throws an error:Expected result
Rome should not error for valid TypeScript code.
Code of Conduct