benjamn / recast

JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator
MIT License
4.99k stars 349 forks source link

TS `satisfies` operator can't be parsed #1281

Closed Andarist closed 7 months ago

Andarist commented 1 year ago

Parsing a file like:

export default {} satisfies {}

end up crashing with:

Error: did not recognize object of type "TSSatisfiesExpression"
benjamn commented 1 year ago

@Andarist Can you try npm i recast@next to get version 0.23.1?

Support for TSSatisfiesExpression should have been implemented in #1232 (https://github.com/benjamn/recast/commit/e51e1bfe490a8d7784ba8b387366cd8e7388d540).

If that works, I will promote recast@0.23.1 to latest.

Andarist commented 1 year ago

I can confirm that this issue is resolved in 0.23.1