diff --git a/goldens/public-api/core/index.md b/goldens/public-api/core/index.md index 1144346016742..e0c06b1c2ee6d 100644 --- a/goldens/public-api/core/index.md +++ b/goldens/public-api/core/index.md @@ -168,6 +168,7 @@ export enum ChangeDetectionStrategy { // @public export abstract class ChangeDetectorRef { + // @deprecated abstract checkNoChanges(): void; abstract detach(): void; abstract detectChanges(): void; diff --git a/packages/core/src/change_detection/change_detector_ref.ts b/packages/core/src/change_detection/change_detector_ref.ts index 6bd0102fdc4a8..4dc711d5ba58f 100644 --- a/packages/core/src/change_detection/change_detector_ref.ts +++ b/packages/core/src/change_detection/change_detector_ref.ts @@ -104,6 +104,10 @@ export abstract class ChangeDetectorRef { * * Use in development mode to verify that running change detection doesn't introduce * other changes. Calling it in production mode is a noop. + * + * @deprecated This is a test-only API that does not have a place in production interface. + * `checkNoChanges` is already part of an `ApplicationRef` tick when the app is running in dev + * mode. For more granular `checkNoChanges` validation, use `ComponentFixture`. */ abstract checkNoChanges(): void;