From fdea1804d6d46d33c71640972ff45a8d5cc82f8b Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Tue, 1 Sep 2020 11:37:34 -0700 Subject: [PATCH] fix(core): remove CollectionChangeRecord symbol (#38668) Remove CollectionChangeRecord as it was deprecated for removal in v4, use IterableChangeRecord instead. BREAKING CHANGE: CollectionChangeRecord has been removed, use IterableChangeRecord instead PR Close #38668 --- aio/content/guide/deprecations.md | 2 -- goldens/public-api/core/core.d.ts | 4 ---- packages/core/src/change_detection.ts | 2 +- packages/core/src/change_detection/change_detection.ts | 2 +- .../src/change_detection/differs/default_iterable_differ.ts | 2 +- .../core/src/change_detection/differs/iterable_differs.ts | 6 ------ 6 files changed, 3 insertions(+), 15 deletions(-) diff --git a/aio/content/guide/deprecations.md b/aio/content/guide/deprecations.md index d4e2320411bfb..3b923936b3113 100644 --- a/aio/content/guide/deprecations.md +++ b/aio/content/guide/deprecations.md @@ -38,7 +38,6 @@ v9 - v12 | `@angular/bazel` | [`Bazel builder and schematics`](#bazelbuilder) | v10 | | `@angular/common` | [`ReflectiveInjector`](#reflectiveinjector) | v11 | | `@angular/common` | [`CurrencyPipe` - `DEFAULT_CURRENCY_CODE`](api/common/CurrencyPipe#currency-code-deprecation) | v11 | -| `@angular/core` | [`CollectionChangeRecord`](#core) | v11 | | `@angular/core` | [`DefaultIterableDiffer`](#core) | v11 | | `@angular/core` | [`ReflectiveKey`](#core) | v11 | | `@angular/core` | [`RenderComponentType`](#core) | v11 | @@ -89,7 +88,6 @@ Tip: In the [API reference section](api) of this doc site, deprecated APIs are i | API | Replacement | Deprecation announced | Notes | | --- | ----------- | --------------------- | ----- | -| [`CollectionChangeRecord`](api/core/CollectionChangeRecord) | [`IterableChangeRecord`](api/core/IterableChangeRecord) | v4 | none | | [`DefaultIterableDiffer`](api/core/DefaultIterableDiffer) | n/a | v4 | Not part of public API. | | [`ReflectiveInjector`](api/core/ReflectiveInjector) | [`Injector.create`](api/core/Injector#create) | v5 | See [`ReflectiveInjector`](#reflectiveinjector) | | [`ReflectiveKey`](api/core/ReflectiveKey) | none | v5 | none | diff --git a/goldens/public-api/core/core.d.ts b/goldens/public-api/core/core.d.ts index 6334c6632a950..71a497aeb5fca 100644 --- a/goldens/public-api/core/core.d.ts +++ b/goldens/public-api/core/core.d.ts @@ -85,10 +85,6 @@ export declare interface ClassSansProvider { useClass: Type; } -/** @deprecated */ -export declare interface CollectionChangeRecord extends IterableChangeRecord { -} - export declare class Compiler { compileModuleAndAllComponentsAsync: (moduleType: Type) => Promise>; compileModuleAndAllComponentsSync: (moduleType: Type) => ModuleWithComponentFactories; diff --git a/packages/core/src/change_detection.ts b/packages/core/src/change_detection.ts index aa10e0821cad9..e5b2bb1b9fa8d 100644 --- a/packages/core/src/change_detection.ts +++ b/packages/core/src/change_detection.ts @@ -12,4 +12,4 @@ * Change detection enables data binding in Angular. */ -export {ChangeDetectionStrategy, ChangeDetectorRef, CollectionChangeRecord, DefaultIterableDiffer, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDifferFactory, IterableDiffers, KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory, KeyValueDiffers, NgIterable, PipeTransform, SimpleChange, SimpleChanges, TrackByFunction, WrappedValue} from './change_detection/change_detection'; +export {ChangeDetectionStrategy, ChangeDetectorRef, DefaultIterableDiffer, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDifferFactory, IterableDiffers, KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory, KeyValueDiffers, NgIterable, PipeTransform, SimpleChange, SimpleChanges, TrackByFunction, WrappedValue} from './change_detection/change_detection'; diff --git a/packages/core/src/change_detection/change_detection.ts b/packages/core/src/change_detection/change_detection.ts index 100ca159a1a06..547b5e67a5d58 100644 --- a/packages/core/src/change_detection/change_detection.ts +++ b/packages/core/src/change_detection/change_detection.ts @@ -18,7 +18,7 @@ export {ChangeDetectionStrategy, ChangeDetectorStatus, isDefaultChangeDetectionS export {DefaultIterableDifferFactory} from './differs/default_iterable_differ'; export {DefaultIterableDiffer} from './differs/default_iterable_differ'; export {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ'; -export {CollectionChangeRecord, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDifferFactory, IterableDiffers, NgIterable, TrackByFunction} from './differs/iterable_differs'; +export {IterableChangeRecord, IterableChanges, IterableDiffer, IterableDifferFactory, IterableDiffers, NgIterable, TrackByFunction} from './differs/iterable_differs'; export {KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory, KeyValueDiffers} from './differs/keyvalue_differs'; export {PipeTransform} from './pipe_transform'; diff --git a/packages/core/src/change_detection/differs/default_iterable_differ.ts b/packages/core/src/change_detection/differs/default_iterable_differ.ts index 736d7b1234246..d7b470a84f567 100644 --- a/packages/core/src/change_detection/differs/default_iterable_differ.ts +++ b/packages/core/src/change_detection/differs/default_iterable_differ.ts @@ -593,7 +593,7 @@ export class IterableChangeRecord_ implements IterableChangeRecord { constructor(public item: V, public trackById: any) {} } -// A linked list of CollectionChangeRecords with the same IterableChangeRecord_.item +// A linked list of IterableChangeRecords with the same IterableChangeRecord_.item class _DuplicateItemRecordList { /** @internal */ _head: IterableChangeRecord_|null = null; diff --git a/packages/core/src/change_detection/differs/iterable_differs.ts b/packages/core/src/change_detection/differs/iterable_differs.ts index 1de180683f3e5..b9192746be0ea 100644 --- a/packages/core/src/change_detection/differs/iterable_differs.ts +++ b/packages/core/src/change_detection/differs/iterable_differs.ts @@ -112,12 +112,6 @@ export interface IterableChangeRecord { readonly trackById: any; } -/** - * @deprecated v4.0.0 - Use IterableChangeRecord instead. - * @publicApi - */ -export interface CollectionChangeRecord extends IterableChangeRecord {} - /** * An optional function passed into the `NgForOf` directive that defines how to track * changes for items in an iterable.