From 9d290b4fef7d09b4cb6d61c9eb27e30c657f79c0 Mon Sep 17 00:00:00 2001 From: JoostK Date: Fri, 7 May 2021 21:49:31 +0200 Subject: [PATCH] test(compiler-cli): move `TrackByFunction` from `fake_common` to `fake_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 --- .../compiler-cli/src/ngtsc/testing/fake_common/index.ts | 6 +----- packages/compiler-cli/src/ngtsc/testing/fake_core/index.ts | 4 ++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/compiler-cli/src/ngtsc/testing/fake_common/index.ts b/packages/compiler-cli/src/ngtsc/testing/fake_common/index.ts index da99030fb7..a7a3989e4a 100644 --- a/packages/compiler-cli/src/ngtsc/testing/fake_common/index.ts +++ b/packages/compiler-cli/src/ngtsc/testing/fake_common/index.ts @@ -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> { $implicit: T; @@ -19,10 +19,6 @@ export interface NgForOfContext> { index: number; } -export interface TrackByFunction { - (index: number, item: T): any; -} - export interface NgIfContext { $implicit: T; ngIf: T; diff --git a/packages/compiler-cli/src/ngtsc/testing/fake_core/index.ts b/packages/compiler-cli/src/ngtsc/testing/fake_core/index.ts index 35fe9a2575..7632c14450 100644 --- a/packages/compiler-cli/src/ngtsc/testing/fake_core/index.ts +++ b/packages/compiler-cli/src/ngtsc/testing/fake_core/index.ts @@ -114,3 +114,7 @@ export interface PipeTransform { export interface OnDestroy { ngOnDestroy(): void; } + +export interface TrackByFunction { + (index: number, item: T): any; +}