@cparra/apex-reflection 2.7.1 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,152 +1,157 @@
1
- export declare function reflect(declarationBody: string): ReflectionResult;
2
- export interface ParamAnnotation {
3
- bodyLines: string[];
4
- paramName: string;
5
- }
6
- export interface ReturnAnnotation {
7
- bodyLines: string[];
8
- }
9
- export interface ExampleAnnotation {
10
- bodyLines: string[];
11
- }
12
- export interface ThrowsAnnotation {
13
- bodyLines: string[];
14
- exceptionName: string;
15
- }
16
- export interface DocCommentAnnotation {
17
- name: string;
18
- bodyLines: string[];
19
- body: string;
20
- }
21
- export interface DocComment {
22
- rawDeclaration?: string;
23
- paramAnnotations: ParamAnnotation[];
24
- returnAnnotation: ReturnAnnotation;
25
- exampleAnnotation: ExampleAnnotation;
26
- throwsAnnotations: ThrowsAnnotation[];
27
- annotations: DocCommentAnnotation[];
28
- descriptionLines: string[];
29
- description: string;
30
- error?: string;
31
- }
32
- export interface AnnotationElementValue {
33
- key: string;
34
- value: string;
35
- }
36
- export interface Annotation {
37
- rawDeclaration: string;
38
- name: string;
39
- type: string;
40
- elementValues?: AnnotationElementValue[];
41
- }
42
- export declare type ReferencedType = ReferenceObjectType | ListObjectType | SetObjectType | MapObjectType;
43
- export interface ReferenceObjectType {
44
- type: string;
45
- rawDeclaration: string;
46
- }
47
- export interface ListObjectType extends ReferenceObjectType {
48
- ofType: ReferenceObjectType;
49
- }
50
- export interface SetObjectType extends ReferenceObjectType {
51
- ofType: ReferenceObjectType;
52
- }
53
- export interface MapObjectType extends ReferenceObjectType {
54
- keyType: ReferenceObjectType;
55
- valueType: ReferenceObjectType;
56
- }
57
- export interface ParameterMirror {
58
- memberModifiers: string[];
59
- name: string;
60
- typeReference: ReferencedType;
61
- docComment?: DocComment;
62
- }
63
- export interface MethodMirror {
64
- access_modifier: string;
65
- annotations: Annotation[];
66
- name: string;
67
- memberModifiers: string[];
68
- typeReference: ReferencedType;
69
- parameters: ParameterMirror[];
70
- docComment?: DocComment;
71
- group?: string;
72
- groupDescription?: string;
73
- }
74
- export interface PropertyMirror {
75
- access_modifier: string;
76
- annotations: Annotation[];
77
- name: string;
78
- memberModifiers: string[];
79
- typeReference: ReferencedType;
80
- docComment?: DocComment;
81
- group?: string;
82
- groupDescription?: string;
83
- }
84
- export interface FieldMirror {
85
- access_modifier: string;
86
- annotations: Annotation[];
87
- name: string;
88
- memberModifiers: string[];
89
- typeReference: ReferencedType;
90
- docComment?: DocComment;
91
- group?: string;
92
- groupDescription?: string;
93
- }
94
- export interface ConstructorMirror {
95
- access_modifier: string;
96
- annotations: Annotation[];
97
- parameters: ParameterMirror[];
98
- docComment?: DocComment;
99
- group?: string;
100
- groupDescription?: string;
101
- }
102
- export interface ReflectionResult {
103
- typeMirror?: Type;
104
- error?: ParsingError;
105
- }
106
- export interface ParsingError {
107
- message: string;
108
- }
109
- declare type TypeName = 'class' | 'interface' | 'enum';
110
- export declare type Type = InterfaceMirror | ClassMirror | EnumMirror;
111
- export interface EnumMirror {
112
- annotations: Annotation[];
113
- name: string;
114
- type_name: TypeName;
115
- access_modifier: string;
116
- docComment?: DocComment;
117
- group?: string;
118
- groupDescription?: string;
119
- }
120
- export interface InterfaceMirror {
121
- annotations: Annotation[];
122
- name: string;
123
- type_name: TypeName;
124
- methods: MethodMirror[];
125
- extended_interfaces: string[];
126
- access_modifier: string;
127
- docComment?: DocComment;
128
- sharingModifier?: string;
129
- group?: string;
130
- groupDescription?: string;
131
- }
132
- export interface ClassMirror {
133
- annotations: Annotation[];
134
- name: string;
135
- type_name: TypeName;
136
- methods: MethodMirror[];
137
- sharingModifier?: string;
138
- classModifier?: string;
139
- extended_class?: string;
140
- implemented_interfaces: string[];
141
- properties: PropertyMirror[];
142
- fields: FieldMirror[];
143
- constructors: ConstructorMirror[];
144
- enums: EnumMirror[];
145
- interfaces: InterfaceMirror[];
146
- classes: ClassMirror[];
147
- access_modifier: string;
148
- docComment?: DocComment;
149
- group?: string;
150
- groupDescription?: string;
151
- }
152
- export {};
1
+ export declare function reflect(declarationBody: string): ReflectionResult;
2
+ export interface ParamAnnotation {
3
+ bodyLines: string[];
4
+ paramName: string;
5
+ }
6
+ export interface ReturnAnnotation {
7
+ bodyLines: string[];
8
+ }
9
+ export interface ExampleAnnotation {
10
+ bodyLines: string[];
11
+ }
12
+ export interface ThrowsAnnotation {
13
+ bodyLines: string[];
14
+ exceptionName: string;
15
+ }
16
+ export interface DocCommentAnnotation {
17
+ name: string;
18
+ bodyLines: string[];
19
+ body: string;
20
+ }
21
+ export interface DocComment {
22
+ rawDeclaration?: string;
23
+ paramAnnotations: ParamAnnotation[];
24
+ returnAnnotation: ReturnAnnotation;
25
+ exampleAnnotation: ExampleAnnotation;
26
+ throwsAnnotations: ThrowsAnnotation[];
27
+ annotations: DocCommentAnnotation[];
28
+ descriptionLines: string[];
29
+ description: string;
30
+ error?: string;
31
+ }
32
+ export interface AnnotationElementValue {
33
+ key: string;
34
+ value: string;
35
+ }
36
+ export interface Annotation {
37
+ rawDeclaration: string;
38
+ name: string;
39
+ type: string;
40
+ elementValues?: AnnotationElementValue[];
41
+ }
42
+ export type ReferencedType = ReferenceObjectType | ListObjectType | SetObjectType | MapObjectType;
43
+ export interface ReferenceObjectType {
44
+ type: string;
45
+ rawDeclaration: string;
46
+ }
47
+ export interface ListObjectType extends ReferenceObjectType {
48
+ ofType: ReferenceObjectType;
49
+ }
50
+ export interface SetObjectType extends ReferenceObjectType {
51
+ ofType: ReferenceObjectType;
52
+ }
53
+ export interface MapObjectType extends ReferenceObjectType {
54
+ keyType: ReferenceObjectType;
55
+ valueType: ReferenceObjectType;
56
+ }
57
+ export interface EnumValue {
58
+ name: string;
59
+ docComment?: DocComment;
60
+ }
61
+ export interface ParameterMirror {
62
+ memberModifiers: string[];
63
+ name: string;
64
+ typeReference: ReferencedType;
65
+ docComment?: DocComment;
66
+ }
67
+ export interface MethodMirror {
68
+ access_modifier: string;
69
+ annotations: Annotation[];
70
+ name: string;
71
+ memberModifiers: string[];
72
+ typeReference: ReferencedType;
73
+ parameters: ParameterMirror[];
74
+ docComment?: DocComment;
75
+ group?: string;
76
+ groupDescription?: string;
77
+ }
78
+ export interface PropertyMirror {
79
+ access_modifier: string;
80
+ annotations: Annotation[];
81
+ name: string;
82
+ memberModifiers: string[];
83
+ typeReference: ReferencedType;
84
+ docComment?: DocComment;
85
+ group?: string;
86
+ groupDescription?: string;
87
+ }
88
+ export interface FieldMirror {
89
+ access_modifier: string;
90
+ annotations: Annotation[];
91
+ name: string;
92
+ memberModifiers: string[];
93
+ typeReference: ReferencedType;
94
+ docComment?: DocComment;
95
+ group?: string;
96
+ groupDescription?: string;
97
+ }
98
+ export interface ConstructorMirror {
99
+ access_modifier: string;
100
+ annotations: Annotation[];
101
+ parameters: ParameterMirror[];
102
+ docComment?: DocComment;
103
+ group?: string;
104
+ groupDescription?: string;
105
+ }
106
+ export interface ReflectionResult {
107
+ typeMirror?: Type;
108
+ error?: ParsingError;
109
+ }
110
+ export interface ParsingError {
111
+ message: string;
112
+ }
113
+ type TypeName = 'class' | 'interface' | 'enum';
114
+ export type Type = InterfaceMirror | ClassMirror | EnumMirror;
115
+ export interface EnumMirror {
116
+ annotations: Annotation[];
117
+ name: string;
118
+ type_name: TypeName;
119
+ access_modifier: string;
120
+ docComment?: DocComment;
121
+ group?: string;
122
+ groupDescription?: string;
123
+ values: EnumValue[];
124
+ }
125
+ export interface InterfaceMirror {
126
+ annotations: Annotation[];
127
+ name: string;
128
+ type_name: TypeName;
129
+ methods: MethodMirror[];
130
+ extended_interfaces: string[];
131
+ access_modifier: string;
132
+ docComment?: DocComment;
133
+ sharingModifier?: string;
134
+ group?: string;
135
+ groupDescription?: string;
136
+ }
137
+ export interface ClassMirror {
138
+ annotations: Annotation[];
139
+ name: string;
140
+ type_name: TypeName;
141
+ methods: MethodMirror[];
142
+ sharingModifier?: string;
143
+ classModifier?: string;
144
+ extended_class?: string;
145
+ implemented_interfaces: string[];
146
+ properties: PropertyMirror[];
147
+ fields: FieldMirror[];
148
+ constructors: ConstructorMirror[];
149
+ enums: EnumMirror[];
150
+ interfaces: InterfaceMirror[];
151
+ classes: ClassMirror[];
152
+ access_modifier: string;
153
+ docComment?: DocComment;
154
+ group?: string;
155
+ groupDescription?: string;
156
+ }
157
+ export {};
package/index.js CHANGED
@@ -1,8 +1,8 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.reflect = void 0;
4
- var lib = require('./out');
5
- function reflect(declarationBody) {
6
- return JSON.parse(lib.reflect(declarationBody));
7
- }
8
- exports.reflect = reflect;
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.reflect = void 0;
4
+ var lib = require('./out');
5
+ function reflect(declarationBody) {
6
+ return JSON.parse(lib.reflect(declarationBody));
7
+ }
8
+ exports.reflect = reflect;