Previously, annotations which were const objects (as opposed to const instance creation expressions) were incorrectly output as instance creation expressions. Before: ``` const override() // A const instance creation expression ``` After ``` override // A const instance ``` Closes #4481
41 lines
1.2 KiB
Protocol Buffer
41 lines
1.2 KiB
Protocol Buffer
syntax = "proto2";
|
|
|
|
package angular2.src.transform.common.model.proto;
|
|
|
|
message NamedParameter {
|
|
required string name = 1;
|
|
required string value = 2;
|
|
}
|
|
|
|
message AnnotationModel {
|
|
// The constructor that creates the annotation, or the name of the field that
|
|
// defines the annotation.
|
|
required string name = 1;
|
|
|
|
// The positional parameters provided to the annotation.
|
|
repeated string parameters = 2;
|
|
|
|
// The named parameters provided to the annotation.
|
|
repeated NamedParameter named_parameters = 3;
|
|
|
|
// Whether this is a `View` annotation.
|
|
optional bool is_view = 4;
|
|
|
|
// Whether this is a `Directive` annotation. This takes inheritance into
|
|
// account, that is, this should be true if `is_component` is true.
|
|
optional bool is_directive = 5;
|
|
|
|
// Whether this is a `Component` annotation.
|
|
optional bool is_component = 6;
|
|
|
|
// Whether this is an `Injectable` annotation. This takes inheritance into
|
|
// account, that is, this should be true if `is_directive` and/or
|
|
// `is_component` is true.
|
|
optional bool is_injectable = 7;
|
|
|
|
// Whether this annotation is a constant object (for example, `@override`) as
|
|
// opposed to a const instance creation expression
|
|
// (for example, `@Injectable()`).
|
|
optional bool is_const_object = 8;
|
|
}
|