refactor(common): add defaults to new generic parameters (#34206)

This is a follow-up to #33997 where some new generic parameters were added without defaults which is technically a breaking change. These changes add the defaults.

PR Close #34206
This commit is contained in:
Kristiyan Kostadinov
2019-12-03 11:59:46 +01:00
committed by Miško Hevery
parent 9b6a1b85b1
commit cca2616637
4 changed files with 12 additions and 12 deletions

View File

@ -216,7 +216,7 @@ export declare class NgComponentOutlet implements OnChanges, OnDestroy {
ngOnDestroy(): void;
}
export declare class NgForOf<T, U extends NgIterable<T>> implements DoCheck {
export declare class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCheck {
ngForOf: (U & NgIterable<T>) | undefined | null;
ngForTemplate: TemplateRef<NgForOfContext<T, U>>;
ngForTrackBy: TrackByFunction<T>;
@ -225,7 +225,7 @@ export declare class NgForOf<T, U extends NgIterable<T>> implements DoCheck {
static ngTemplateContextGuard<T, U extends NgIterable<T>>(dir: NgForOf<T, U>, ctx: any): ctx is NgForOfContext<T, U>;
}
export declare class NgForOfContext<T, U extends NgIterable<T>> {
export declare class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>> {
$implicit: T;
count: number;
readonly even: boolean;
@ -237,7 +237,7 @@ export declare class NgForOfContext<T, U extends NgIterable<T>> {
constructor($implicit: T, ngForOf: U, index: number, count: number);
}
export declare class NgIf<T> {
export declare class NgIf<T = unknown> {
ngIf: T;
ngIfElse: TemplateRef<NgIfContext<T>> | null;
ngIfThen: TemplateRef<NgIfContext<T>> | null;
@ -246,7 +246,7 @@ export declare class NgIf<T> {
static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): ctx is NgIfContext<T>;
}
export declare class NgIfContext<T> {
export declare class NgIfContext<T = unknown> {
$implicit: T;
ngIf: T;
}