Skip to content

Commit a70ee07

Browse files
srawlinsCommit Queue
authored and
Commit Queue
committed
Add TargetKind.typeParameter
Fixes #49796 Change-Id: I434c3bba20cbcf26177db4f0dc199bb696ab04de Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360122 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent d24b5d1 commit a70ee07

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/meta/lib/meta_meta.dart

+8-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class TargetKind {
7777
static const mixinType = TargetKind._('mixins', 'mixinType');
7878

7979
/// Indicates that an annotation is valid on any formal parameter declaration,
80-
/// whether it's in a function, method, constructor, or closure.
80+
/// whether it's in a function (named or anonymous), method, or constructor.
8181
static const parameter = TargetKind._('parameters', 'parameter');
8282

8383
/// Indicates that an annotation is valid on any setter declaration, both
@@ -99,6 +99,12 @@ class TargetKind {
9999
/// Indicates that an annotation is valid on any typedef declaration.`
100100
static const typedefType = TargetKind._('typedefs', 'typedefType');
101101

102+
/// Indicates that an annotation is valid on any type parameter declaration,
103+
/// whether it's on a class, enum, function type, function, mixin, extension,
104+
/// extension type, or typedef.
105+
static const typeParameter = TargetKind._(
106+
'type parameters (classes, enums, mixins, or typedefs)', 'typeParameter');
107+
102108
/// All current [TargetKind] values of targets to
103109
/// which an annotation can be applied.
104110
static const values = [
@@ -116,6 +122,7 @@ class TargetKind {
116122
setter,
117123
topLevelVariable,
118124
type,
125+
typeParameter,
119126
typedefType,
120127
];
121128

0 commit comments

Comments
 (0)