Open
Description
Describe the problem
There are many issues that have acorn-typescript
as the upstream cause (#13179, #13125, #13409, #13188, more), but acorn-typescript
is abandoned. It also has several open issues that would need to be addressed once forked or collaboration access is granted.
Describe the proposed solution
One of the following:
- Fork
acorn-typescript
. The svelte team would become the primary maintainers but it wouldn't require any changes to the svelte source code. - Use an alternate parser, such as
swc
oroxc
. SWC seems to use the same AST types as acorn, but oxc advertises faster speeds. These parsers are much more mature thanacorn-typescript
and are obviously actively maintained. (note: oxc would require changes to both esrap and the svelte source)
My vote would be for the latter. The downsides (bigger dependencies and changes to svelte's source) are outweighed by the long-term advantage of using a more reliable library.
Importance
nice to have