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:

committed by
Miško Hevery

parent
9b6a1b85b1
commit
cca2616637
8
tools/public_api_guard/common/common.d.ts
vendored
8
tools/public_api_guard/common/common.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user