Skip to content

Commit c9474eb

Browse files
srawlinsCommit Queue
authored and
Commit Queue
committed
meta: Introduce TargetKind.directive
Fixes #52274 Change-Id: I67884caf86502d4edd848eb32a30097488e09db9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360480 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent add2f41 commit c9474eb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

pkg/meta/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
- Introduce `TargetKind.constructor`, to indicate that an annotation is valid on
44
any constructor.
5+
- Introduce `TargetKind.directive`, to indicate that an annotation is valid on
6+
any directive.
57
- Introduce `TargetKind.typeParamteer`, to indicate that an annotation is valid
68
on any type parameter.
79
- Introduce `@doNotSubmit` to annotate members that should not be submitted to

pkg/meta/lib/meta_meta.dart

+6
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ class TargetKind {
4848
/// because there is no way to annotate a primary constructor.
4949
static const constructor = TargetKind._('constructors', 'constructor');
5050

51+
/// Indicates that an annotation is valid on any directive in a library or
52+
/// part file, whether it's a `library`, `import`, `export`, `part`, or
53+
/// `part of` directive.
54+
static const directive = TargetKind._('directives', 'directive');
55+
5156
/// Indicates that an annotation is valid on any enum declaration.
5257
static const enumType = TargetKind._('enums', 'enumType');
5358

@@ -119,6 +124,7 @@ class TargetKind {
119124
static const values = [
120125
classType,
121126
constructor,
127+
directive,
122128
enumType,
123129
extension,
124130
extensionType,

0 commit comments

Comments
 (0)