Skip to content

Commit 17beccd

Browse files
committed
main - 7b076c1 refactor(google-maps): fix strict property initialization errors
1 parent 5a3b408 commit 17beccd

105 files changed

Lines changed: 211 additions & 234 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs-content/examples-highlighted/cdk/a11y/focus-monitor-focus-via/focus-monitor-focus-via-example-ts.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<span class="hljs-keyword">private</span> _cdr = <span class="hljs-title function_">inject</span>(<span class="hljs-title class_">ChangeDetectorRef</span>);
2525
<span class="hljs-keyword">private</span> _ngZone = <span class="hljs-title function_">inject</span>(<span class="hljs-title class_">NgZone</span>);
2626

27-
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;monitored&#x27;</span>) <span class="hljs-attr">monitoredEl</span>: <span class="hljs-title class_">ElementRef</span>&lt;<span class="hljs-title class_">HTMLElement</span>&gt;;
27+
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;monitored&#x27;</span>) monitoredEl!: <span class="hljs-title class_">ElementRef</span>&lt;<span class="hljs-title class_">HTMLElement</span>&gt;;
2828

2929
origin = <span class="hljs-variable language_">this</span>.<span class="hljs-title function_">formatOrigin</span>(<span class="hljs-literal">null</span>);
3030

docs-content/examples-highlighted/cdk/a11y/focus-monitor-overview/focus-monitor-overview-example-ts.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
<span class="hljs-keyword">private</span> _cdr = <span class="hljs-title function_">inject</span>(<span class="hljs-title class_">ChangeDetectorRef</span>);
2222
<span class="hljs-keyword">private</span> _ngZone = <span class="hljs-title function_">inject</span>(<span class="hljs-title class_">NgZone</span>);
2323

24-
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;element&#x27;</span>) <span class="hljs-attr">element</span>: <span class="hljs-title class_">ElementRef</span>&lt;<span class="hljs-title class_">HTMLElement</span>&gt;;
25-
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;subtree&#x27;</span>) <span class="hljs-attr">subtree</span>: <span class="hljs-title class_">ElementRef</span>&lt;<span class="hljs-title class_">HTMLElement</span>&gt;;
24+
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;element&#x27;</span>) element!: <span class="hljs-title class_">ElementRef</span>&lt;<span class="hljs-title class_">HTMLElement</span>&gt;;
25+
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;subtree&#x27;</span>) subtree!: <span class="hljs-title class_">ElementRef</span>&lt;<span class="hljs-title class_">HTMLElement</span>&gt;;
2626

2727
elementOrigin = <span class="hljs-variable language_">this</span>.<span class="hljs-title function_">formatOrigin</span>(<span class="hljs-literal">null</span>);
2828
subtreeOrigin = <span class="hljs-variable language_">this</span>.<span class="hljs-title function_">formatOrigin</span>(<span class="hljs-literal">null</span>);

docs-content/examples-highlighted/cdk/dialog/cdk-dialog-overview/cdk-dialog-overview-example-ts.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
dialog = <span class="hljs-title function_">inject</span>(<span class="hljs-title class_">Dialog</span>);
2020

2121
<span class="hljs-attr">animal</span>: <span class="hljs-built_in">string</span> | <span class="hljs-literal">undefined</span>;
22-
<span class="hljs-attr">name</span>: <span class="hljs-built_in">string</span>;
22+
name!: <span class="hljs-built_in">string</span>;
2323

2424
<span class="hljs-title function_">openDialog</span>(): <span class="hljs-built_in">void</span> {
2525
<span class="hljs-keyword">const</span> dialogRef = <span class="hljs-variable language_">this</span>.<span class="hljs-property">dialog</span>.<span class="hljs-property">open</span>&lt;<span class="hljs-built_in">string</span>&gt;(<span class="hljs-title class_">CdkDialogOverviewExampleDialog</span>, {

docs-content/examples-highlighted/cdk/drag-drop/cdk-drag-drop-root-element/cdk-drag-drop-root-element-example-ts.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
<span class="hljs-keyword">private</span> _injector = <span class="hljs-title function_">inject</span>(<span class="hljs-title class_">Injector</span>);
2626
<span class="hljs-keyword">private</span> _viewContainerRef = <span class="hljs-title function_">inject</span>(<span class="hljs-title class_">ViewContainerRef</span>);
2727

28-
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-title class_">TemplateRef</span>) <span class="hljs-attr">_dialogTemplate</span>: <span class="hljs-title class_">TemplateRef</span>&lt;<span class="hljs-built_in">any</span>&gt;;
29-
<span class="hljs-keyword">private</span> <span class="hljs-attr">_overlayRef</span>: <span class="hljs-title class_">OverlayRef</span>;
30-
<span class="hljs-keyword">private</span> <span class="hljs-attr">_portal</span>: <span class="hljs-title class_">TemplatePortal</span>;
28+
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-title class_">TemplateRef</span>) _dialogTemplate!: <span class="hljs-title class_">TemplateRef</span>&lt;<span class="hljs-built_in">any</span>&gt;;
29+
<span class="hljs-keyword">private</span> _overlayRef!: <span class="hljs-title class_">OverlayRef</span>;
30+
<span class="hljs-keyword">private</span> _portal!: <span class="hljs-title class_">TemplatePortal</span>;
3131

3232
<span class="hljs-title function_">ngAfterViewInit</span>(<span class="hljs-params"></span>) {
3333
<span class="hljs-variable language_">this</span>.<span class="hljs-property">_portal</span> = <span class="hljs-keyword">new</span> <span class="hljs-title class_">TemplatePortal</span>(<span class="hljs-variable language_">this</span>.<span class="hljs-property">_dialogTemplate</span>, <span class="hljs-variable language_">this</span>.<span class="hljs-property">_viewContainerRef</span>);

docs-content/examples-highlighted/cdk/drag-drop/cdk-drag-drop-table/cdk-drag-drop-table-example-ts.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<span class="hljs-attr">imports</span>: [<span class="hljs-title class_">CdkDropList</span>, <span class="hljs-title class_">CdkDrag</span>, <span class="hljs-title class_">MatTableModule</span>, <span class="hljs-title class_">MatIconModule</span>],
3535
})
3636
<span class="hljs-keyword">export</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">CdkDragDropTableExample</span> {
37-
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;table&#x27;</span>, {<span class="hljs-attr">static</span>: <span class="hljs-literal">true</span>}) <span class="hljs-attr">table</span>: <span class="hljs-title class_">MatTable</span>&lt;<span class="hljs-title class_">PeriodicElement</span>&gt;;
37+
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;table&#x27;</span>, {<span class="hljs-attr">static</span>: <span class="hljs-literal">true</span>}) table!: <span class="hljs-title class_">MatTable</span>&lt;<span class="hljs-title class_">PeriodicElement</span>&gt;;
3838

3939
<span class="hljs-attr">displayedColumns</span>: <span class="hljs-built_in">string</span>[] = [<span class="hljs-string">&#x27;position&#x27;</span>, <span class="hljs-string">&#x27;name&#x27;</span>, <span class="hljs-string">&#x27;weight&#x27;</span>, <span class="hljs-string">&#x27;symbol&#x27;</span>, <span class="hljs-string">&#x27;quantity&#x27;</span>];
4040
dataSource = <span class="hljs-variable constant_">ELEMENT_DATA</span>;

docs-content/examples-highlighted/cdk/layout/breakpoint-observer-overview/breakpoint-observer-overview-example-ts.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
})
1212
<span class="hljs-keyword">export</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">BreakpointObserverOverviewExample</span> <span class="hljs-keyword">implements</span> <span class="hljs-title class_">OnDestroy</span> {
1313
destroyed = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Subject</span>&lt;<span class="hljs-built_in">void</span>&gt;();
14-
<span class="hljs-attr">currentScreenSize</span>: <span class="hljs-built_in">string</span>;
14+
currentScreenSize!: <span class="hljs-built_in">string</span>;
1515

1616
<span class="hljs-comment">// Create a map to display breakpoint names for demonstration purposes.</span>
1717
displayNameMap = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Map</span>([

docs-content/examples-highlighted/cdk/portal/cdk-portal-overview/cdk-portal-overview-example-ts.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
<span class="hljs-keyword">export</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">CdkPortalOverviewExample</span> <span class="hljs-keyword">implements</span> <span class="hljs-title class_">AfterViewInit</span> {
2828
<span class="hljs-keyword">private</span> _viewContainerRef = <span class="hljs-title function_">inject</span>(<span class="hljs-title class_">ViewContainerRef</span>);
2929

30-
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;templatePortalContent&#x27;</span>) <span class="hljs-attr">templatePortalContent</span>: <span class="hljs-title class_">TemplateRef</span>&lt;<span class="hljs-built_in">unknown</span>&gt;;
31-
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;domPortalContent&#x27;</span>) <span class="hljs-attr">domPortalContent</span>: <span class="hljs-title class_">ElementRef</span>&lt;<span class="hljs-title class_">HTMLElement</span>&gt;;
30+
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;templatePortalContent&#x27;</span>) templatePortalContent!: <span class="hljs-title class_">TemplateRef</span>&lt;<span class="hljs-built_in">unknown</span>&gt;;
31+
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;domPortalContent&#x27;</span>) domPortalContent!: <span class="hljs-title class_">ElementRef</span>&lt;<span class="hljs-title class_">HTMLElement</span>&gt;;
3232

33-
<span class="hljs-attr">selectedPortal</span>: <span class="hljs-title class_">Portal</span>&lt;<span class="hljs-built_in">any</span>&gt;;
34-
<span class="hljs-attr">componentPortal</span>: <span class="hljs-title class_">ComponentPortal</span>&lt;<span class="hljs-title class_">ComponentPortalExample</span>&gt;;
35-
<span class="hljs-attr">templatePortal</span>: <span class="hljs-title class_">TemplatePortal</span>&lt;<span class="hljs-built_in">any</span>&gt;;
36-
<span class="hljs-attr">domPortal</span>: <span class="hljs-title class_">DomPortal</span>&lt;<span class="hljs-built_in">any</span>&gt;;
33+
selectedPortal!: <span class="hljs-title class_">Portal</span>&lt;<span class="hljs-built_in">any</span>&gt;;
34+
componentPortal!: <span class="hljs-title class_">ComponentPortal</span>&lt;<span class="hljs-title class_">ComponentPortalExample</span>&gt;;
35+
templatePortal!: <span class="hljs-title class_">TemplatePortal</span>&lt;<span class="hljs-built_in">any</span>&gt;;
36+
domPortal!: <span class="hljs-title class_">DomPortal</span>&lt;<span class="hljs-built_in">any</span>&gt;;
3737

3838
<span class="hljs-title function_">ngAfterViewInit</span>(<span class="hljs-params"></span>) {
3939
<span class="hljs-variable language_">this</span>.<span class="hljs-property">componentPortal</span> = <span class="hljs-keyword">new</span> <span class="hljs-title class_">ComponentPortal</span>(<span class="hljs-title class_">ComponentPortalExample</span>);

docs-content/examples-highlighted/cdk/text-field/text-field-autofill-directive/text-field-autofill-directive-example-ts.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<span class="hljs-attr">imports</span>: [<span class="hljs-title class_">MatFormFieldModule</span>, <span class="hljs-title class_">MatInputModule</span>, <span class="hljs-title class_">TextFieldModule</span>, <span class="hljs-title class_">MatButtonModule</span>],
1313
})
1414
<span class="hljs-keyword">export</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">TextFieldAutofillDirectiveExample</span> {
15-
<span class="hljs-attr">firstNameAutofilled</span>: <span class="hljs-built_in">boolean</span>;
16-
<span class="hljs-attr">lastNameAutofilled</span>: <span class="hljs-built_in">boolean</span>;
15+
firstNameAutofilled = <span class="hljs-literal">false</span>;
16+
lastNameAutofilled = <span class="hljs-literal">false</span>;
1717
}

docs-content/examples-highlighted/cdk/text-field/text-field-autofill-monitor/text-field-autofill-monitor-example-ts.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
<span class="hljs-keyword">export</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">TextFieldAutofillMonitorExample</span> <span class="hljs-keyword">implements</span> <span class="hljs-title class_">AfterViewInit</span>, <span class="hljs-title class_">OnDestroy</span> {
1515
<span class="hljs-keyword">private</span> _autofill = <span class="hljs-title function_">inject</span>(<span class="hljs-title class_">AutofillMonitor</span>);
1616

17-
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;first&#x27;</span>, {<span class="hljs-attr">read</span>: <span class="hljs-title class_">ElementRef</span>}) <span class="hljs-attr">firstName</span>: <span class="hljs-title class_">ElementRef</span>&lt;<span class="hljs-title class_">HTMLElement</span>&gt;;
18-
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;last&#x27;</span>, {<span class="hljs-attr">read</span>: <span class="hljs-title class_">ElementRef</span>}) <span class="hljs-attr">lastName</span>: <span class="hljs-title class_">ElementRef</span>&lt;<span class="hljs-title class_">HTMLElement</span>&gt;;
19-
<span class="hljs-attr">firstNameAutofilled</span>: <span class="hljs-built_in">boolean</span>;
20-
<span class="hljs-attr">lastNameAutofilled</span>: <span class="hljs-built_in">boolean</span>;
17+
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;first&#x27;</span>, {<span class="hljs-attr">read</span>: <span class="hljs-title class_">ElementRef</span>}) firstName!: <span class="hljs-title class_">ElementRef</span>&lt;<span class="hljs-title class_">HTMLElement</span>&gt;;
18+
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;last&#x27;</span>, {<span class="hljs-attr">read</span>: <span class="hljs-title class_">ElementRef</span>}) lastName!: <span class="hljs-title class_">ElementRef</span>&lt;<span class="hljs-title class_">HTMLElement</span>&gt;;
19+
firstNameAutofilled = <span class="hljs-literal">false</span>;
20+
lastNameAutofilled = <span class="hljs-literal">false</span>;
2121

2222
<span class="hljs-title function_">ngAfterViewInit</span>(<span class="hljs-params"></span>) {
2323
<span class="hljs-variable language_">this</span>.<span class="hljs-property">_autofill</span>

docs-content/examples-highlighted/cdk/text-field/text-field-autosize-textarea/text-field-autosize-textarea-example-ts.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<span class="hljs-keyword">export</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">TextFieldAutosizeTextareaExample</span> {
1515
<span class="hljs-keyword">private</span> _injector = <span class="hljs-title function_">inject</span>(<span class="hljs-title class_">Injector</span>);
1616

17-
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;autosize&#x27;</span>) <span class="hljs-attr">autosize</span>: <span class="hljs-title class_">CdkTextareaAutosize</span>;
17+
<span class="hljs-meta">@ViewChild</span>(<span class="hljs-string">&#x27;autosize&#x27;</span>) autosize!: <span class="hljs-title class_">CdkTextareaAutosize</span>;
1818

1919
<span class="hljs-title function_">triggerResize</span>(<span class="hljs-params"></span>) {
2020
<span class="hljs-comment">// Wait for content to render, then trigger textarea resize.</span>

0 commit comments

Comments
 (0)