angular/goldens/public-api
Paul Gschwendtner 866271a1c6 refactor(core): EventEmitter implements OutputRef. (#54650)
An `EventEmitter` is a construct owned by Angular that should be
used for outputs as of right now.

As we are introducing the new `OutputRef` interface for the new output
function APIs, we also think `EventEmitter` should implement
`OutputRef`— ensuring all "known" outputs follow the same contract.

This commit ensures `EventEmitter` implements an `OutputRef`

Note: An output ref captures the destroy ref from the current injection
context for clean-up purposes. This is also done for `EventEmitter` in a
backwards compatible way:

- not requiring an injection context. EventEmitter may be used
  elsewhere.
- not cleaning up subscriptions/completing the emitter when the
  directive/component is destroyed. This would be a change in behavior.

Note 2: The dependency on `DestroyRef` causes it to be retained in all
bundling examples because ironically `NgZone` uses `EventEmitter`- not
for outputs. The code is pretty minimal though, so that should be
acceptable.

`EventEmitter` will now always retain `NgZone. This increases the
payload size slightly around 800b for AIO. Note that the other increases
were coming from previous changes. This commit just pushed it over the
threshold.

PR Close #54650
2024-03-06 12:34:39 +01:00
..
animations refactor: change public const enums to enums (#51670) 2023-10-25 10:39:18 -07:00
common feat(core): support TypeScript 5.4 (#54414) 2024-02-26 18:29:09 -08:00
compiler-cli refactor(compiler-cli): use a more generic error for unsupported expressions in local compilation mode (#54366) 2024-02-12 08:49:03 -08:00
core refactor(core): EventEmitter implements OutputRef. (#54650) 2024-03-06 12:34:39 +01:00
elements fix(elements): support input transform functions (#50713) 2023-06-22 09:47:16 -07:00
forms refactor: add readonly to public InjectionToken types (#51125) 2023-08-14 17:17:35 -07:00
localize build: remove unneeded babel types postinstall patching (#53441) 2023-12-08 14:33:59 -08:00
platform-browser refactor(animations): EnvironmentProviders for provideAnimationsAsync (#52862) 2023-11-13 17:27:31 +00:00
platform-browser-dynamic test: update api goldens to reflect api-golden bazel rule change (#45461) 2022-03-29 09:26:00 -07:00
platform-server refactor: add readonly to public InjectionToken types (#51125) 2023-08-14 17:17:35 -07:00
router feat(router): Add reusable types for router guards (#54580) 2024-02-28 18:09:33 +01:00
service-worker refactor(service-worker): Remove deprecated activated & available observables. (#49498) 2023-10-10 11:54:07 -07:00
upgrade fix(compiler-cli): libraries compiled with v16.1+ breaking with Angular framework v16.0.x (#50714) 2023-06-14 16:27:59 +02:00
manage.js refactor(dev-infra): remove dependency on minimist (#43644) 2021-10-04 17:31:03 -07:00