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

Commit 6c9c2e9

Browse files
leonsenftmatanlurey
authored andcommitted
feat(Generics): add directiveTypes to Component
This field will be used to type annotate directives in the component's view. PiperOrigin-RevId: 202670248
1 parent 0ffa6ef commit 6c9c2e9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

angular/lib/src/core/metadata.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:meta/meta.dart';
22

33
import 'change_detection/change_detection.dart';
4+
import 'metadata/typed.dart';
45
import 'metadata/view.dart';
56
import 'metadata/visibility.dart';
67

@@ -16,6 +17,8 @@ export 'metadata/lifecycle_hooks.dart'
1617
OnDestroy,
1718
OnInit,
1819
DoCheck;
20+
// TODO(leonsenft): export when support for generics is complete.
21+
// export 'metadata/typed.dart';
1922
export 'metadata/view.dart';
2023
export 'metadata/visibility.dart';
2124

@@ -231,6 +234,12 @@ class Component extends Directive {
231234
final List<String> styleUrls;
232235
final List<String> styles;
233236
final List<Object> directives;
237+
238+
/// Declares generic type arguments for any generic [directives].
239+
///
240+
/// See [Typed] for details.
241+
final List<Typed> directiveTypes;
242+
234243
final List<Object> pipes;
235244
final ViewEncapsulation encapsulation;
236245

@@ -248,6 +257,7 @@ class Component extends Directive {
248257
this.styleUrls,
249258
this.styles,
250259
this.directives,
260+
this.directiveTypes,
251261
this.pipes,
252262
this.encapsulation,
253263
}) : super(

0 commit comments

Comments
 (0)