Skip to content

Commit

Permalink
test(compiler-cli): move TrackByFunction from fake_common to `fak…
Browse files Browse the repository at this point in the history
…e_core` (#41995)

The `TrackByFunction` is declared in `@angular/core` so it should also be
included in `fake_core` instead of `fake_common`.

PR Close #41995
  • Loading branch information
JoostK authored and thePunderWoman committed Jun 3, 2021
1 parent 4f7245f commit d69b91b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 1 addition & 5 deletions packages/compiler-cli/src/ngtsc/testing/fake_common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import {NgIterable, TemplateRef, ɵɵDirectiveDeclaration, ɵɵNgModuleDeclaration, ɵɵPipeDeclaration} from '@angular/core';
import {NgIterable, TemplateRef, TrackByFunction, ɵɵDirectiveDeclaration, ɵɵNgModuleDeclaration, ɵɵPipeDeclaration} from '@angular/core';

export interface NgForOfContext<T, U extends NgIterable<T>> {
$implicit: T;
Expand All @@ -19,10 +19,6 @@ export interface NgForOfContext<T, U extends NgIterable<T>> {
index: number;
}

export interface TrackByFunction<T> {
(index: number, item: T): any;
}

export interface NgIfContext<T = unknown> {
$implicit: T;
ngIf: T;
Expand Down
4 changes: 4 additions & 0 deletions packages/compiler-cli/src/ngtsc/testing/fake_core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,7 @@ export interface PipeTransform {
export interface OnDestroy {
ngOnDestroy(): void;
}

export interface TrackByFunction<T> {
(index: number, item: T): any;
}

0 comments on commit d69b91b

Please sign in to comment.