Files
Donny/강동윤andGitHub dbd81506f6 fix(es/parser): parse Flow bare renders types (#11929)
**Description:**

Fixes Flow parser support for bare `renders T` in type positions. The
parser previously only recognized the `renders? T` and `renders* T`
forms, so bare `renders React.Node` was parsed as a type reference named
`renders` and failed on the operand.

This change lets bare `renders` consume an operand type using the
existing erased AST representation, while keeping invalid operand-less
`renders` cases from being reinterpreted as Flow anonymous function type
parameters.

Validation:

- `cargo fmt --all`
- `cargo clippy --all --all-targets -- -D warnings`
- `cargo test -p swc_ecma_parser --features flow --test flow`
- `FLOW_HERMES_FILTER=types/render_types/renders.js cargo test -p
swc_ecma_parser --features flow --test flow_hermes
hermes_flow_error_presence_parity`

Note: `cargo test -p swc_ecma_parser` still fails on the unrelated
existing TypeScript fixture
`errors_tests__typescript_errors__type_only_import_specifier__invalid_type_only__input_ts`,
which also fails when run alone.

**Related issue:**

Fixes #11928
2026-06-10 02:40:29 +00:00
..