diff --git a/packages/compiler/src/render3/view/api.ts b/packages/compiler/src/render3/view/api.ts index c12ec91acf2..5618e2e7455 100644 --- a/packages/compiler/src/render3/view/api.ts +++ b/packages/compiler/src/render3/view/api.ts @@ -177,7 +177,7 @@ export interface R3ComponentMetadata extends R3DirectiveMetadata { nodes: t.Node[]; /** - * Any ng-content selectors extracted from the template. Contains `null` when an ng-content + * Any ng-content selectors extracted from the template. Contains `*` when an ng-content * element without selector is present. */ ngContentSelectors: string[]; diff --git a/packages/compiler/src/template_parser/template_preparser.ts b/packages/compiler/src/template_parser/template_preparser.ts index 8e9f8696814..8f10d7b6366 100644 --- a/packages/compiler/src/template_parser/template_preparser.ts +++ b/packages/compiler/src/template_parser/template_preparser.ts @@ -20,7 +20,7 @@ const NG_NON_BINDABLE_ATTR = 'ngNonBindable'; const NG_PROJECT_AS = 'ngProjectAs'; export function preparseElement(ast: html.Element): PreparsedElement { - let selectAttr: string = null!; + let selectAttr: string|null = null; let hrefAttr: string = null!; let relAttr: string = null!; let nonBindable = false; @@ -71,7 +71,7 @@ export class PreparsedElement { } -function normalizeNgContentSelect(selectAttr: string): string { +function normalizeNgContentSelect(selectAttr: string|null): string { if (selectAttr === null || selectAttr.length === 0) { return '*'; }