test(compiler-cli): load type declarations from fake_common (#41995)

The ngtsc test targets have fake declarations files for `@angular/core`
and `@angular/common` and the template type checking tests can leverage
the fake common declarations instead of declaring its own types.

PR Close #41995
This commit is contained in:
JoostK
2021-05-07 21:48:06 +02:00
committed by Jessica Janiuk
parent bd1836b999
commit 481540dd4e
3 changed files with 13 additions and 63 deletions
@@ -56,6 +56,7 @@ export declare class NgIf<T = unknown> {
'ngIfElse': 'ngIfElse';
}
, {}, never > ;
static ngTemplateGuard_ngIf: 'binding';
static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any):
ctx is NgIfContext<Exclude<T, false|0|''|null|undefined>>;
}
@@ -83,8 +84,16 @@ export declare class DatePipe {
static ɵpipe: ɵɵPipeDeclaration<DatePipe, 'date'>;
}
export declare class IndexPipe {
transform<T>(value: T[], index: number): T;
static ɵpipe: ɵɵPipeDeclaration<IndexPipe, 'index'>;
}
export declare class CommonModule {
static ɵmod: ɵɵNgModuleDeclaration<
CommonModule, [typeof NgForOf, typeof NgIf, typeof DatePipe, typeof NgTemplateOutlet], never,
[typeof NgForOf, typeof NgIf, typeof DatePipe, typeof NgTemplateOutlet]>;
CommonModule,
[typeof NgForOf, typeof NgIf, typeof DatePipe, typeof IndexPipe, typeof NgTemplateOutlet],
never,
[typeof NgForOf, typeof NgIf, typeof DatePipe, typeof IndexPipe, typeof NgTemplateOutlet]>;
}