Skip to content

Conversation

alan-agius4
Copy link
Collaborator

This commit initializes the REQUEST, RESPONSE_INIT, and REQUEST_CONTEXT DI tokens with null values by default.

Previously, these tokens lacked default values, which meant that developers had to explicitly mark them as optional when injecting them in constructors. This was necessary to avoid errors when these tokens were not provided, particularly in scenarios like client-side rendering or during development.

By initializing these tokens with null, we eliminate the need for developers to mark them as optional, simplifying the code and improving the developer experience.

@alan-agius4 alan-agius4 requested a review from dgp1130 November 6, 2024 07:33
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Nov 6, 2024
@alan-agius4 alan-agius4 added target: rc This PR is targeted for the next release-candidate and removed area: @angular/ssr labels Nov 6, 2024
…iring them to be set to optional

This commit initializes the `REQUEST`, `RESPONSE_INIT`, and `REQUEST_CONTEXT` DI tokens with `null` values by default.

Previously, these tokens lacked default values, which meant that developers had to explicitly mark them as optional when injecting them in constructors. This was necessary to avoid errors when these tokens were not provided, particularly in scenarios like client-side rendering or during development.

By initializing these tokens with `null`, we eliminate the need for developers to mark them as optional, simplifying the code and improving the developer experience.
@alan-agius4 alan-agius4 added this to the v19 Candidates milestone Nov 6, 2024
@alan-agius4 alan-agius4 removed the request for review from AndrewKushnir November 6, 2024 16:11
@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 Nov 6, 2024
@alan-agius4 alan-agius4 merged commit 479bfd4 into angular:main Nov 6, 2024
32 checks passed
@alan-agius4 alan-agius4 deleted the add-tokens-option branch November 6, 2024 16:13
@alan-agius4
Copy link
Collaborator Author

The changes were merged into the following branches: main, 19.0.x

@angular-automatic-lock-bot
Copy link

This issue 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 Dec 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/ssr target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants