Skip to content

Conversation

@alan-agius4
Copy link
Contributor

@alan-agius4 alan-agius4 commented Dec 17, 2025

The RESPONSE_INIT token previously used ResponseInit. However, @types/node (and undici) definitions for ResponseInit mark properties as readonly, which differs from the standard DOM ResponseInit.

This commit introduces a ResponseInit type that explicitly removes readonly modifiers to ensure compatibility and allow for mutable options. This type is now used by the RESPONSE_INIT token and is exported from @angular/core.

Example: angular/angular-cli#32147

The `RESPONSE_INIT` token previously used `ResponseInit`. However, `@types/node` (and `undici`) definitions for `ResponseInit` mark properties as `readonly`, which differs from the standard DOM `ResponseInit`.

This commit introduces a `ResponseInit` type that explicitly removes `readonly` modifiers to ensure compatibility and allow for mutable options. This type is now used by the `RESPONSE_INIT` token and is exported from `@angular/core`.
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Dec 17, 2025
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Dec 17, 2025
@ngbot ngbot bot added this to the Backlog milestone Dec 17, 2025
@pullapprove pullapprove bot requested a review from thePunderWoman December 17, 2025 09:45
Copy link
Member

@JeanMeche JeanMeche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed-for: public-api

I think this is fine for a fix as we're not changing the shape of the object.

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 17, 2025
@AndrewKushnir AndrewKushnir merged commit f516370 into angular:main Dec 17, 2025
25 checks passed
@AndrewKushnir
Copy link
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

@alan-agius4 alan-agius4 deleted the response-init branch December 18, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants