diff --git a/packages/core/src/change_detection.ts b/packages/core/src/change_detection.ts index d543d0826f..8fd31eb47b 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, TrackByFn, TrackByFunction, WrappedValue} from './change_detection/change_detection'; +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'; diff --git a/packages/core/src/change_detection/change_detection.ts b/packages/core/src/change_detection/change_detection.ts index db43f81e07..5ad5ce00ad 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, TrackByFn, TrackByFunction} from './differs/iterable_differs'; +export {CollectionChangeRecord, 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/iterable_differs.ts b/packages/core/src/change_detection/differs/iterable_differs.ts index d1daadc3b5..6769731856 100644 --- a/packages/core/src/change_detection/differs/iterable_differs.ts +++ b/packages/core/src/change_detection/differs/iterable_differs.ts @@ -82,7 +82,8 @@ export interface IterableChanges { /** Iterate over all removed items. */ forEachRemovedItem(fn: (record: IterableChangeRecord) => void): void; - /** Iterate over all items which had their identity (as computed by the `trackByFn`) changed. */ + /** Iterate over all items which had their identity (as computed by the `TrackByFunction`) + * changed. */ forEachIdentityChange(fn: (record: IterableChangeRecord) => void): void; } @@ -101,7 +102,7 @@ export interface IterableChangeRecord { /** The item. */ readonly item: V; - /** Track by identity as computed by the `trackByFn`. */ + /** Track by identity as computed by the `TrackByFunction`. */ readonly trackById: any; } @@ -110,14 +111,6 @@ export interface IterableChangeRecord { */ export interface CollectionChangeRecord extends IterableChangeRecord {} - -/** - * Nolonger used. - * - * @deprecated v4.0.0 - Use TrackByFunction instead - */ -export interface TrackByFn { (index: number, item: any): any; } - /** * An optional function passed into {@link NgForOf} that defines how to track * items in an iterable (e.g. fby index or id) diff --git a/tools/public_api_guard/core/core.d.ts b/tools/public_api_guard/core/core.d.ts index 7363e596d3..21d92db227 100644 --- a/tools/public_api_guard/core/core.d.ts +++ b/tools/public_api_guard/core/core.d.ts @@ -989,11 +989,6 @@ export declare class TestabilityRegistry { registerApplication(token: any, testability: Testability): void; } -/** @deprecated */ -export interface TrackByFn { - (index: number, item: any): any; -} - /** @stable */ export interface TrackByFunction { (index: number, item: T): any;