Skip to content
This repository was archived by the owner on Jan 19, 2023. It is now read-only.

Commit 07a66fc

Browse files
joshi-nihaljosephperrott
authored andcommitted
docs: remove explicit boolean type in examples as TS infers it automatically (angular#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 angular#39081
1 parent 6e0a8eb commit 07a66fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/examples/common/ngIf/ts/module.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {Subject} from 'rxjs';
2222
`
2323
})
2424
export class NgIfSimple {
25-
show: boolean = true;
25+
show = true;
2626
}
2727
// #enddocregion
2828

@@ -38,7 +38,7 @@ export class NgIfSimple {
3838
`
3939
})
4040
export class NgIfElse {
41-
show: boolean = true;
41+
show = true;
4242
}
4343
// #enddocregion
4444

@@ -58,7 +58,7 @@ export class NgIfElse {
5858
})
5959
export class NgIfThenElse implements OnInit {
6060
thenBlock: TemplateRef<any>|null = null;
61-
show: boolean = true;
61+
show = true;
6262

6363
@ViewChild('primaryBlock', {static: true}) primaryBlock: TemplateRef<any>|null = null;
6464
@ViewChild('secondaryBlock', {static: true}) secondaryBlock: TemplateRef<any>|null = null;

0 commit comments

Comments
 (0)