Skip to content

Conversation

@alxhub
Copy link
Member

@alxhub alxhub commented Apr 28, 2023

This commit introduces an interface for toSignal options to mirror that of toObservable, and adjusts docs for both symbols. It also adds the ability for toSignal to manually specify DestroyRef (similarly to toObservable accepting an injector) or for toSignal automatic cleanup to be disabled (in which case the subscription persists until the Observable completes). Either option allows toSignal to be used outside of a DI context, like toObservable.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Copy link
Contributor

@AndrewKushnir AndrewKushnir 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

@pullapprove pullapprove bot requested a review from atscott April 28, 2023 21:59
Copy link
Contributor

@dylhunn dylhunn 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: fw-core, public-api

This commit introduces an interface for `toSignal` options to mirror that of
`toObservable`, and adjusts docs for both symbols. It also adds the ability
for `toSignal` to manually specify `DestroyRef` (similarly to
`toObservable` accepting an injector) or for `toSignal` automatic cleanup to
be disabled (in which case the subscription persists until the Observable
completes). Either option allows `toSignal` to be used outside of a DI
context, like `toObservable`.
@alxhub alxhub force-pushed the v16/to-observable branch from 6459d38 to d9c058f Compare April 28, 2023 22:05
@alxhub alxhub added this to the v16-final milestone Apr 28, 2023
@ngbot ngbot bot removed this from the v16-final milestone Apr 28, 2023
@alxhub alxhub added target: rc This PR is targeted for the next release-candidate area: core Issues related to the framework runtime core: reactivity Work related to fine-grained reactivity in the core framework labels Apr 28, 2023
@ngbot ngbot bot added this to the Backlog milestone Apr 28, 2023
Copy link
Contributor

@atscott atscott 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

@alxhub alxhub removed the request for review from pkozlowski-opensource April 28, 2023 23:07
@alxhub alxhub added the action: merge The PR is ready for merge by the caretaker label Apr 28, 2023
@alxhub
Copy link
Member Author

alxhub commented Apr 28, 2023

This PR was merged into the repository by commit cc89766.

alxhub added a commit that referenced this pull request Apr 28, 2023
This commit introduces an interface for `toSignal` options to mirror that of
`toObservable`, and adjusts docs for both symbols. It also adds the ability
for `toSignal` to manually specify `DestroyRef` (similarly to
`toObservable` accepting an injector) or for `toSignal` automatic cleanup to
be disabled (in which case the subscription persists until the Observable
completes). Either option allows `toSignal` to be used outside of a DI
context, like `toObservable`.

PR Close #50071
@alxhub alxhub closed this in cc89766 Apr 28, 2023
sr5434 pushed a commit to sr5434/angular that referenced this pull request May 3, 2023
This commit introduces an interface for `toSignal` options to mirror that of
`toObservable`, and adjusts docs for both symbols. It also adds the ability
for `toSignal` to manually specify `DestroyRef` (similarly to
`toObservable` accepting an injector) or for `toSignal` automatic cleanup to
be disabled (in which case the subscription persists until the Observable
completes). Either option allows `toSignal` to be used outside of a DI
context, like `toObservable`.

PR Close angular#50071
@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 May 29, 2023
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: core Issues related to the framework runtime core: reactivity Work related to fine-grained reactivity in the core framework target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants