Skip to content

feat(compiler): preserve parameter structure in @error block AST - #70706

Closed
JeanMeche wants to merge 1 commit into
angular:mainfrom
JeanMeche:prettier-compiler-ast
Closed

JeanMeche wants to merge 1 commit into
angular:mainfrom
JeanMeche:prettier-compiler-ast

Conversation

@JeanMeche

Copy link
Copy Markdown
Member

The Render3 AST BoundaryErrorBlock previously stripped away the ordered structure of its parameters, keeping only the extracted contextVariables and the when expression. This commit introduces a new BoundaryErrorParameter type and adds a parameters property to the BoundaryErrorBlock. This preserves the exact order and type (let, alias, or when) of the parameters as they were defined in the template. This enhancement natively exposes the structured parameters, allowing formatters like Prettier to accurately traverse and format the block parameters without having to duplicate internal string-parsing logic.

@angular-robot angular-robot Bot added detected: feature PR contains a feature commit area: compiler Issues related to `ngc`, Angular's template compiler labels Sep 12, 2026
@ngbot ngbot Bot added this to the Backlog milestone Sep 12, 2026
The Render3 AST `BoundaryErrorBlock` previously stripped away the ordered structure of its parameters, keeping only the extracted `contextVariables` and the `when` expression.
This commit introduces a new `BoundaryErrorParameter` type and adds a `parameters` property to the `BoundaryErrorBlock`. This preserves the exact order and type (`let`, `alias`, or `when`) of the parameters as they were defined in the template. This enhancement natively exposes the structured parameters, allowing formatters like Prettier to accurately traverse and format the block parameters without having to duplicate internal string-parsing logic.
@JeanMeche
JeanMeche force-pushed the prettier-compiler-ast branch from 7afeb86 to 9144ac3 Compare September 12, 2026 10:12
@JeanMeche JeanMeche closed this Sep 20, 2026
@angular-automatic-lock-bot

Copy link
Copy Markdown

This pull request has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Oct 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: compiler Issues related to `ngc`, Angular's template compiler detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant