You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,18 @@
15
15
}
16
16
```
17
17
18
+
*Fixaregressionwiththeparsingofsourcephaseimports
19
+
20
+
Thechangeinthepreviousreleasetoparse [sourcephaseimports](https://github.com/tc39/proposal-source-phase-imports) failed to properly handle the following cases:
21
+
22
+
```ts
23
+
import source from 'bar'
24
+
import source from from 'bar'
25
+
import source type foo from 'bar'
26
+
```
27
+
28
+
Parsingforthesecasesshouldnowbefixed. Thefirstcasewasincorrectlytreatedasasyntaxerrorbecauseesbuildwasexpectingthesecondcase. Andthelastcasewaspreviouslyallowedbutisnowforbidden. TypeScripthasn't added this feature yet so it remains to be seen whether the last case will be allowed, but it'ssafertodisallowitfornow. AtleastBabeldoesn't allow the last case when parsing TypeScript, and Babel was involved with the source phase import specification.
0 commit comments