@@ -6,7 +6,7 @@ abstract class DirectiveBinder {
6
6
bind (key, {Function toFactory, inject, Visibility visibility: Visibility .CHILDREN });
7
7
}
8
8
9
- typedef void DirectiveBinderFn (DirectiveBinder module );
9
+ typedef void DirectiveBinderFn (DirectiveBinder binder );
10
10
11
11
RegExp _ATTR_NAME = new RegExp (r'\[([^\]]+)\]$' );
12
12
@@ -31,18 +31,18 @@ class Visibility {
31
31
abstract class Directive {
32
32
33
33
/// The directive can only be injected to other directives on the same element.
34
- @deprecated // ('Use Visibility.LOCAL instead')
34
+ @Deprecated ('Use Visibility.LOCAL instead' )
35
35
static const Visibility LOCAL_VISIBILITY = Visibility .LOCAL ;
36
36
37
37
/// The directive can be injected to other directives on the same or child elements.
38
- @deprecated // ('Use Visibility.CHILDREN instead')
38
+ @Deprecated ('Use Visibility.CHILDREN instead' )
39
39
static const Visibility CHILDREN_VISIBILITY = Visibility .CHILDREN ;
40
40
41
41
/**
42
42
* The directive on this element can only be injected to other directives
43
43
* declared on elements which are direct children of the current element.
44
44
*/
45
- @deprecated // ('Use Visibility.DIRECT_CHILD instead')
45
+ @Deprecated ('Use Visibility.DIRECT_CHILD instead' )
46
46
static const Visibility DIRECT_CHILDREN_VISIBILITY = Visibility .DIRECT_CHILD ;
47
47
48
48
/**
@@ -90,26 +90,22 @@ abstract class Directive {
90
90
static const String IGNORE_CHILDREN = 'ignore' ;
91
91
92
92
/**
93
- * A directive/component controller class can be injected into other
94
- * directives/components. This attribute controls whether the
95
- * controller is available to others.
93
+ * A directive/component controller class can be injected into other directives/components. This
94
+ * attribute controls whether the controller is available to others.
96
95
*
97
- * * `local` [Directive.LOCAL_VISIBILITY] - the controller can be injected
98
- * into other directives / components on the same DOM element.
99
- * * `children` [Directive.CHILDREN_VISIBILITY] - the controller can be
100
- * injected into other directives / components on the same or child DOM
101
- * elements.
102
- * * `direct_children` [Directive.DIRECT_CHILDREN_VISIBILITY] - the
103
- * controller can be injected into other directives / components on the
104
- * direct children of the current DOM element.
96
+ * * [Visibility.LOCAL] - the controller can be injected into other directives / components on the
97
+ * same DOM element.
98
+ * * [Visibility.CHILDREN] - the controller can be injected into other directives / components on
99
+ * the same or child DOM elements.
100
+ * * [Visibility.DIRECT_CHILD] - the controller can be injected into other directives / components
101
+ * on the direct children of the current DOM element.
105
102
*/
106
103
final Visibility visibility;
107
104
108
105
/**
109
- * A directive/component class can publish types by using a factory
110
- * function to generate a module. The module is then installed into
111
- * the injector at that element. Any types declared in the module then
112
- * become available for injection.
106
+ * A directive/component class can publish types by using a factory function to generate a module.
107
+ * The module is then installed into the injector at that element. Any types declared in the
108
+ * module then become available for injection.
113
109
*
114
110
* Example:
115
111
*
@@ -121,11 +117,10 @@ abstract class Directive {
121
117
* binder.bind(SomeTypeA, visibility: Directive.LOCAL_VISIBILITY);
122
118
* }
123
119
*
124
- * When specifying types, factories or values in the module, notice that
125
- * `Visibility` maps to:
126
- * * [Directive.LOCAL_VISIBILITY]
127
- * * [Directive.CHILDREN_VISIBILITY]
128
- * * [Directive.DIRECT_CHILDREN_VISIBILITY]
120
+ * `visibility` is one of:
121
+ * * [Visibility.LOCAL]
122
+ * * [Visibility.CHILDREN] (default)
123
+ * * [Visibility.DIRECT_CHILD]
129
124
*/
130
125
final DirectiveBinderFn module;
131
126
@@ -263,10 +258,8 @@ class Component extends Directive {
263
258
/**
264
259
* Set the shadow root applyAuthorStyles property. See shadow-DOM
265
260
* documentation for further details.
266
- *
267
- * This feature will be removed in Chrome 35.
268
261
*/
269
- @deprecated
262
+ @Deprecated ( 'in Chrome 35' )
270
263
bool get applyAuthorStyles {
271
264
if (! _applyAuthorStylesDeprecationWarningPrinted && _applyAuthorStyles == true ) {
272
265
print ("WARNING applyAuthorStyles is deprecated in component $selector " );
@@ -279,10 +272,8 @@ class Component extends Directive {
279
272
/**
280
273
* Set the shadow root resetStyleInheritance property. See shadow-DOM
281
274
* documentation for further details.
282
- *
283
- * This feature will be removed in Chrome 35.
284
275
*/
285
- @deprecated
276
+ @Deprecated ( 'in Chrome 35' )
286
277
bool get resetStyleInheritance {
287
278
if (! _resetStyleInheritanceDeprecationWarningPrinted && _resetStyleInheritance == true ) {
288
279
print ("WARNING resetStyleInheritance is deprecated in component $selector " );
0 commit comments