fix(core): Remove ChangeDetectorRef Paramter from KeyValueDifferFactory and IterableDifferFactory (#14311)

BREAKING CHANGE:

- `KeyValueDifferFactory` and `IterableDifferFactory` no longer have `ChangeDetectorRef` as 
  a parameter. It was not used and has been there for historical reasons. If you call 
  `DifferFactory.create(...)` remove the `ChangeDetectorRef` argument.
This commit is contained in:
FrozenPandaz
2017-02-09 16:33:44 -05:00
committed by Miško Hevery
parent 56e2f84fe8
commit 45cc444154
9 changed files with 41 additions and 14 deletions

View File

@ -137,7 +137,7 @@ export declare class NgForOf<T> implements DoCheck, OnChanges {
ngForOf: NgIterable<T>;
ngForTemplate: TemplateRef<NgForOfRow<T>>;
ngForTrackBy: TrackByFunction<T>;
constructor(_viewContainer: ViewContainerRef, _template: TemplateRef<NgForOfRow<T>>, _differs: IterableDiffers, _cdr: ChangeDetectorRef);
constructor(_viewContainer: ViewContainerRef, _template: TemplateRef<NgForOfRow<T>>, _differs: IterableDiffers);
ngDoCheck(): void;
ngOnChanges(changes: SimpleChanges): void;
}

View File

@ -556,7 +556,8 @@ export interface IterableDiffer<V> {
/** @stable */
export interface IterableDifferFactory {
create<V>(cdRef: ChangeDetectorRef, trackByFn?: TrackByFunction<V>): IterableDiffer<V>;
create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;
/** @deprecated */ create<V>(_cdr?: ChangeDetectorRef | TrackByFunction<V>, trackByFn?: TrackByFunction<V>): IterableDiffer<V>;
supports(objects: any): boolean;
}
@ -598,7 +599,8 @@ export interface KeyValueDiffer<K, V> {
/** @stable */
export interface KeyValueDifferFactory {
create<K, V>(cdRef: ChangeDetectorRef): KeyValueDiffer<K, V>;
create<K, V>(): KeyValueDiffer<K, V>;
/** @deprecated */ create<K, V>(_cdr?: ChangeDetectorRef): KeyValueDiffer<K, V>;
supports(objects: any): boolean;
}