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:
17
tools/public_api_guard/common/common.d.ts
vendored
17
tools/public_api_guard/common/common.d.ts
vendored
@ -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 {
|
||||
|
Reference in New Issue
Block a user