@cparra/apex-reflection 0.1.1-alpha.4 → 0.1.1-alpha.8
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 +105 -1
- package/index.js +8 -4
- package/index.ts +124 -0
- package/out.js +5619 -5326
- package/package.json +3 -2
- package/tsconfig.json +5 -4
package/index.d.ts
CHANGED
|
@@ -1 +1,105 @@
|
|
|
1
|
-
export function reflect(declarationBody: string):
|
|
1
|
+
export declare function reflect(declarationBody: string): Type;
|
|
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
|
+
}
|
|
31
|
+
export interface Annotation {
|
|
32
|
+
rawDeclaration: string;
|
|
33
|
+
name: string;
|
|
34
|
+
type: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ParameterMirror {
|
|
37
|
+
memberModifiers: string[];
|
|
38
|
+
name: string;
|
|
39
|
+
type: string;
|
|
40
|
+
docComment?: DocComment;
|
|
41
|
+
}
|
|
42
|
+
export interface MethodMirror {
|
|
43
|
+
annotations: Annotation[];
|
|
44
|
+
name: string;
|
|
45
|
+
memberModifiers: string[];
|
|
46
|
+
type: string;
|
|
47
|
+
parameters: ParameterMirror[];
|
|
48
|
+
docComment?: DocComment;
|
|
49
|
+
}
|
|
50
|
+
export interface PropertyMirror {
|
|
51
|
+
annotations: Annotation[];
|
|
52
|
+
name: string;
|
|
53
|
+
memberModifiers: string[];
|
|
54
|
+
type: string;
|
|
55
|
+
docComment?: DocComment;
|
|
56
|
+
}
|
|
57
|
+
export interface FieldMirror {
|
|
58
|
+
annotations: Annotation[];
|
|
59
|
+
name: string;
|
|
60
|
+
memberModifiers: string[];
|
|
61
|
+
type: string;
|
|
62
|
+
docComment?: DocComment;
|
|
63
|
+
}
|
|
64
|
+
export interface ConstructorMirror {
|
|
65
|
+
access_modifier: string;
|
|
66
|
+
annotations: Annotation[];
|
|
67
|
+
parameters: ParameterMirror[];
|
|
68
|
+
docComment?: DocComment;
|
|
69
|
+
}
|
|
70
|
+
export interface EnumMirror {
|
|
71
|
+
annotations: Annotation[];
|
|
72
|
+
name: string;
|
|
73
|
+
type_name: string;
|
|
74
|
+
access_modifier: string;
|
|
75
|
+
docComment?: DocComment;
|
|
76
|
+
}
|
|
77
|
+
declare type TypeName = 'class' | 'interface' | 'enum';
|
|
78
|
+
declare type Type = InterfaceMirror | ClassMirror | EnumMirror;
|
|
79
|
+
export interface InterfaceMirror {
|
|
80
|
+
annotations: Annotation[];
|
|
81
|
+
name: string;
|
|
82
|
+
type_name: TypeName;
|
|
83
|
+
methods: MethodMirror[];
|
|
84
|
+
extended_interfaces: string[];
|
|
85
|
+
docComment?: DocComment;
|
|
86
|
+
}
|
|
87
|
+
export interface ClassMirror {
|
|
88
|
+
string: any;
|
|
89
|
+
annotations: Annotation[];
|
|
90
|
+
name: string;
|
|
91
|
+
type_name: TypeName;
|
|
92
|
+
methods: MethodMirror[];
|
|
93
|
+
sharingModifier: string;
|
|
94
|
+
classModifiers: string[];
|
|
95
|
+
extended_class?: string;
|
|
96
|
+
implemented_interfaces: string[];
|
|
97
|
+
properties: PropertyMirror[];
|
|
98
|
+
fields: FieldMirror[];
|
|
99
|
+
constructors: ConstructorMirror[];
|
|
100
|
+
enums: EnumMirror[];
|
|
101
|
+
interfaces: InterfaceMirror[];
|
|
102
|
+
classes: ClassMirror[];
|
|
103
|
+
docComment?: DocComment;
|
|
104
|
+
}
|
|
105
|
+
export {};
|
package/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.reflect = void 0;
|
|
4
|
+
var lib = require('./out');
|
|
5
|
+
function reflect(declarationBody) {
|
|
6
|
+
return lib.reflect(declarationBody);
|
|
7
|
+
}
|
|
8
|
+
exports.reflect = reflect;
|
package/index.ts
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
const lib = require('./out');
|
|
2
|
+
|
|
3
|
+
export function reflect(declarationBody: string): Type {
|
|
4
|
+
return lib.reflect(declarationBody) as Type;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface ParamAnnotation {
|
|
8
|
+
bodyLines: string[];
|
|
9
|
+
paramName: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ReturnAnnotation {
|
|
13
|
+
bodyLines: string[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ExampleAnnotation {
|
|
17
|
+
bodyLines: string[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ThrowsAnnotation {
|
|
21
|
+
bodyLines: string[];
|
|
22
|
+
exceptionName: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface DocCommentAnnotation {
|
|
26
|
+
name: string;
|
|
27
|
+
bodyLines: string[];
|
|
28
|
+
body: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface DocComment {
|
|
32
|
+
rawDeclaration?: string;
|
|
33
|
+
paramAnnotations: ParamAnnotation[];
|
|
34
|
+
returnAnnotation: ReturnAnnotation;
|
|
35
|
+
exampleAnnotation: ExampleAnnotation;
|
|
36
|
+
throwsAnnotations: ThrowsAnnotation[];
|
|
37
|
+
annotations: DocCommentAnnotation[];
|
|
38
|
+
descriptionLines: string[];
|
|
39
|
+
description: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface Annotation {
|
|
43
|
+
rawDeclaration: string;
|
|
44
|
+
name: string;
|
|
45
|
+
type: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ParameterMirror {
|
|
49
|
+
memberModifiers: string[];
|
|
50
|
+
name: string;
|
|
51
|
+
type: string;
|
|
52
|
+
docComment?: DocComment;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface MethodMirror {
|
|
56
|
+
annotations: Annotation[];
|
|
57
|
+
name: string;
|
|
58
|
+
memberModifiers: string[];
|
|
59
|
+
type: string;
|
|
60
|
+
parameters: ParameterMirror[];
|
|
61
|
+
docComment?: DocComment;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface PropertyMirror {
|
|
65
|
+
annotations: Annotation[];
|
|
66
|
+
name: string;
|
|
67
|
+
memberModifiers: string[];
|
|
68
|
+
type: string;
|
|
69
|
+
docComment?: DocComment;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface FieldMirror {
|
|
73
|
+
annotations: Annotation[];
|
|
74
|
+
name: string;
|
|
75
|
+
memberModifiers: string[];
|
|
76
|
+
type: string;
|
|
77
|
+
docComment?: DocComment;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface ConstructorMirror {
|
|
81
|
+
access_modifier: string;
|
|
82
|
+
annotations: Annotation[];
|
|
83
|
+
parameters: ParameterMirror[];
|
|
84
|
+
docComment?: DocComment;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface EnumMirror {
|
|
88
|
+
annotations: Annotation[];
|
|
89
|
+
name: string;
|
|
90
|
+
type_name: string;
|
|
91
|
+
access_modifier: string;
|
|
92
|
+
docComment?: DocComment;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
type TypeName = 'class' | 'interface' | 'enum';
|
|
96
|
+
type Type = InterfaceMirror | ClassMirror | EnumMirror;
|
|
97
|
+
|
|
98
|
+
export interface InterfaceMirror {
|
|
99
|
+
annotations: Annotation[];
|
|
100
|
+
name: string;
|
|
101
|
+
type_name: TypeName;
|
|
102
|
+
methods: MethodMirror[];
|
|
103
|
+
extended_interfaces: string[];
|
|
104
|
+
docComment?: DocComment;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface ClassMirror {
|
|
108
|
+
string;
|
|
109
|
+
annotations: Annotation[];
|
|
110
|
+
name: string;
|
|
111
|
+
type_name: TypeName;
|
|
112
|
+
methods: MethodMirror[];
|
|
113
|
+
sharingModifier: string;
|
|
114
|
+
classModifiers: string[];
|
|
115
|
+
extended_class?: string;
|
|
116
|
+
implemented_interfaces: string[];
|
|
117
|
+
properties: PropertyMirror[];
|
|
118
|
+
fields: FieldMirror[];
|
|
119
|
+
constructors: ConstructorMirror[];
|
|
120
|
+
enums: EnumMirror[];
|
|
121
|
+
interfaces: InterfaceMirror[];
|
|
122
|
+
classes: ClassMirror[];
|
|
123
|
+
docComment?: DocComment;
|
|
124
|
+
}
|