rxjs icon indicating copy to clipboard operation
rxjs copied to clipboard

Allow null | undefined as distinctUntilChanged parameter

Open pmoleri opened this issue 1 month ago • 1 comments

Description:

The documentation mentions and the code allow for undefined parameter (and null), but the exported types didn't allow it.

Example mentioned in the existing JSDoc:

// We only want the events where it changed hands
const changedHands$ = accountUpdates$.pipe(
  distinctUntilChanged(undefined, update => update.updatedBy)
);

And the code includes a comment where it mentions null is also allowed:

// We've been allowing `null` do be passed as the `compare`, so we can't do
// a default value for the parameter, because that will only work
// for `undefined`.
comparator = comparator ?? defaultCompare;

pmoleri avatar Nov 11 '25 14:11 pmoleri

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable them in workspace settings.


View your CI Pipeline Execution ↗ for commit e855af499c981e7f6e67f306eb2b2da2e5f3d18f

Command Status Duration Result
nx compile rxjs ❌ Failed 27s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-11 14:07:03 UTC

nx-cloud[bot] avatar Nov 11 '25 14:11 nx-cloud[bot]