Repository navigation
feat(biome_js_parser): support defer attribute in import statements - #4301
Conversation
6a1bead to
a1d1c91
Compare
a1d1c91 to
b01dad3
Compare
CodSpeed Performance ReportMerging #4301 will improve performances by 6.06%Comparing Summary
Benchmarks breakdown
|
28d1e8a to
2286c37
Compare
There was a problem hiding this comment.
@fireairforce can you please follow up with another PR and address my comments? I think there are some cases that we need to cover
|
|
||
| #### New features | ||
|
|
||
| - JS Parser support defer attribute in import statements ([#4215](https://github.com/biomejs/biome/issues/4215)). |
There was a problem hiding this comment.
| - JS Parser support defer attribute in import statements ([#4215](https://github.com/biomejs/biome/issues/4215)). | |
| - Add support for parsing the defer attribute in import statements ([#4215](https://github.com/biomejs/biome/issues/4215)). |
| 'type'? | ||
| 'defer'? |
There was a problem hiding this comment.
Is this correct? Did you check if typescript will add the keyword defer after type? It would be nice if you could provide this information at least in the PR description
There was a problem hiding this comment.
this is wrong, microsoft/TypeScript#59391, so maybe i need to support a new data structure like JsDeferImportNamespaceClause to support this case:
JsDeferImportNamespaceClause =
'defer'?
namespace_specifier: JsNamespaceImportSpecifier
'from'
source: AnyJsModuleSource
assertion: JsImportAssertion?What do you think?
| // test js import_defer_clause | ||
| // import defer * as yNamespace from "y"; |
There was a problem hiding this comment.
import type defer * as yNamespace from "y"; is missing, we should add a test case for that
There was a problem hiding this comment.
this case maybe need to be an error.
|
ok, i will follow this later |
…ements (biomejs#4301)" This reverts commit 27ff2a7.
Summary
closes: #4215
Test Plan