fix(common): reflect input type in NgIf context (#33997)

Fixes the content of `NgIf` being typed to any.

Fixes #31556.

PR Close #33997
This commit is contained in:
crisbeto
2019-11-29 23:11:28 +01:00
committed by Miško Hevery
parent a6b6d74c00
commit 02958c07f6
4 changed files with 70 additions and 25 deletions

View File

@ -235,17 +235,18 @@ export declare class NgForOfContext<T, U extends NgIterable<T>> {
constructor($implicit: T, ngForOf: U, index: number, count: number);
}
export declare class NgIf {
ngIf: any;
ngIfElse: TemplateRef<NgIfContext> | null;
ngIfThen: TemplateRef<NgIfContext> | null;
constructor(_viewContainer: ViewContainerRef, templateRef: TemplateRef<NgIfContext>);
export declare class NgIf<T> {
ngIf: T;
ngIfElse: TemplateRef<NgIfContext<T>> | null;
ngIfThen: TemplateRef<NgIfContext<T>> | null;
constructor(_viewContainer: ViewContainerRef, templateRef: TemplateRef<NgIfContext<T>>);
static ngTemplateGuard_ngIf: 'binding';
static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): ctx is NgIfContext<T>;
}
export declare class NgIfContext {
$implicit: any;
ngIf: any;
export declare class NgIfContext<T> {
$implicit: T;
ngIf: T;
}
export declare class NgLocaleLocalization extends NgLocalization {