Files
test-repo/changelog_unreleased/javascript/17491.md
T
2e78cb5834 Support type cast comments for acorn parser (#17491)
Co-authored-by: fisker <lionkay@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-05-20 14:38:34 +08:00

339 B

Support type cast comments for acorn parser (#17491 by @ArnaudBarre)

This was previously only supported by the Babel parser.

// Input
/** @type {MyType} */ (x).foo;

// Prettier stable (--parser=acorn)
/** @type {MyType} */ x.foo;

// Prettier main (--parser=acorn)
/** @type {MyType} */ (x).foo;