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 668692598b
commit c92c9f7e21
4 changed files with 12 additions and 12 deletions

View File

@ -149,7 +149,7 @@ import {Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef, ɵstri
* @publicApi
*/
@Directive({selector: '[ngIf]'})
export class NgIf<T> {
export class NgIf<T = unknown> {
private _context: NgIfContext<T> = new NgIfContext<T>();
private _thenTemplateRef: TemplateRef<NgIfContext<T>>|null = null;
private _elseTemplateRef: TemplateRef<NgIfContext<T>>|null = null;
@ -238,7 +238,7 @@ export class NgIf<T> {
/**
* @publicApi
*/
export class NgIfContext<T> {
export class NgIfContext<T = unknown> {
public $implicit: T = null !;
public ngIf: T = null !;
}