From 07a66fc4c2f738630052f6a86978201bd6939ccc Mon Sep 17 00:00:00 2001 From: Nihal Date: Thu, 1 Oct 2020 21:29:29 +0530 Subject: [PATCH] docs: remove explicit boolean type in examples as TS infers it automatically (#39081) In the `packages/examples/common/ngif/module.ts` file, the field `show` is given an explicit boolean type. Since typescript infers boolean type, it is redundant and this commit removes it. PR Close #39081 --- packages/examples/common/ngIf/ts/module.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/examples/common/ngIf/ts/module.ts b/packages/examples/common/ngIf/ts/module.ts index 535d90f655..fdd85e2273 100644 --- a/packages/examples/common/ngIf/ts/module.ts +++ b/packages/examples/common/ngIf/ts/module.ts @@ -22,7 +22,7 @@ import {Subject} from 'rxjs'; ` }) export class NgIfSimple { - show: boolean = true; + show = true; } // #enddocregion @@ -38,7 +38,7 @@ export class NgIfSimple { ` }) export class NgIfElse { - show: boolean = true; + show = true; } // #enddocregion @@ -58,7 +58,7 @@ export class NgIfElse { }) export class NgIfThenElse implements OnInit { thenBlock: TemplateRef|null = null; - show: boolean = true; + show = true; @ViewChild('primaryBlock', {static: true}) primaryBlock: TemplateRef|null = null; @ViewChild('secondaryBlock', {static: true}) secondaryBlock: TemplateRef|null = null;