Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

Commit a28d766

Browse files
Googleralorenzen
Googler
authored andcommitted
Tighten the types on rootNodes in ViewRef to List<Node>, for fuzzy arrow purposes.
Using dynamic as bottom ("fuzzy arrow") will become an error in Dart 2.0. dart-lang/sdk#29630 PiperOrigin-RevId: 182127013
1 parent d90ba65 commit a28d766

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

angular/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ const tokenB = const OpaqueToken<dynamic('b');
1717
* `ComponentRef.componentType` throws an `UnsupportedError`, pending removal.
1818
This removes our last invocation of `.runtimeType`, which has potentially
1919
severe code-size implications for some applications.
20+
* The type of `EmbeddedViewRef.rootNodes` and `ViewRefImpl.rootNodes` has
21+
changed from `List<dynamic>` to `List<Node>`.
2022

2123
## 5.0.0-alpha+3
2224

angular/lib/src/core/linker/view_ref.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import 'dart:html';
2+
13
import 'package:angular/src/core/change_detection/constants.dart'
24
show ChangeDetectionStrategy;
35

@@ -62,7 +64,7 @@ abstract class EmbeddedViewRef extends ViewRef {
6264
/// Checks whether this view has a local variable called [variableName].
6365
bool hasLocal(String variableName);
6466

65-
List<dynamic> get rootNodes;
67+
List<Node> get rootNodes;
6668

6769
/// Destroys the view and all of the data structures associated with it.
6870
void destroy();
@@ -79,7 +81,7 @@ class ViewRefImpl implements EmbeddedViewRef, ChangeDetectorRef {
7981
@Deprecated('Use appView instead')
8082
AppView<dynamic> get internalView => appView;
8183

82-
List get rootNodes => appView.flatRootNodes;
84+
List<Node> get rootNodes => appView.flatRootNodes;
8385

8486
ChangeDetectorRef get changeDetectorRef => this;
8587

0 commit comments

Comments
 (0)