Skip to content

Commit 3d5c3d9

Browse files
cexbrayatatscott
authored andcommitted
fix(core): error about provideExperimentalCheckNoChangesForDebug uses wrong name (angular#55824)
The error about `provideExperimentalCheckNoChangesForDebug` mentions `provideCheckNoChangesForDebug` instead. PR Close angular#55824
1 parent 23eafb4 commit 3d5c3d9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/core/src/change_detection/scheduling/exhaustive_check_no_changes.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import {ZONELESS_ENABLED} from './zoneless_scheduling';
2424
*
2525
* @param options Used to configure when the check will execute.
2626
* - `interval` will periodically run exhaustive `checkNoChanges` on application views
27-
* - `useNgZoneOnStable` will us ZoneJS to determine when change detection might have run
27+
* - `useNgZoneOnStable` will use ZoneJS to determine when change detection might have run
2828
* in an application using ZoneJS to drive change detection. When the `NgZone.onStable` would
29-
* have emit, all views attached to the `ApplicationRef` are checked for changes.
29+
* have emitted, all views attached to the `ApplicationRef` are checked for changes.
3030
* - 'exhaustive' means that all views attached to `ApplicationRef` and all the descendants of those views will be
3131
* checked for changes (excluding those subtrees which are detached via `ChangeDetectorRef.detach()`).
3232
* This is useful because the check that runs after regular change detection does not work for components using `ChangeDetectionStrategy.OnPush`.
@@ -68,7 +68,7 @@ export function provideExperimentalCheckNoChangesForDebug(options: {
6868
!(inject(NgZone) instanceof DebugNgZoneForCheckNoChanges)
6969
) {
7070
throw new Error(
71-
'`provideCheckNoChangesForDebug` with `useNgZoneOnStable` must be after any other provider for `NgZone`.',
71+
'`provideExperimentalCheckNoChangesForDebug` with `useNgZoneOnStable` must be after any other provider for `NgZone`.',
7272
);
7373
}
7474
},
@@ -87,7 +87,7 @@ export class DebugNgZoneForCheckNoChanges extends NgZone {
8787

8888
constructor(private readonly checkNoChangesMode: CheckNoChangesMode) {
8989
const zonelessEnabled = inject(ZONELESS_ENABLED);
90-
// Use coalsecing to ensure we aren't ever running this check synchronously
90+
// Use coalescing to ensure we aren't ever running this check synchronously
9191
super({
9292
shouldCoalesceEventChangeDetection: true,
9393
shouldCoalesceRunChangeDetection: zonelessEnabled,

packages/core/test/acceptance/change_detection_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ describe('change detection', () => {
13091309
expect(comp.viewCheckCount).toEqual(1);
13101310
});
13111311

1312-
describe('provideCheckNoChangesForDebug', () => {
1312+
describe('provideExperimentalCheckNoChangesForDebug', () => {
13131313
// Needed because tests in this repo patch rAF to be setTimeout
13141314
// and coalescing tries to get the native one but fails so
13151315
// coalescing will run a timeout in the zone and cause an infinite loop.

0 commit comments

Comments
 (0)