@cparra/apex-reflection 0.1.1-alpha.8 → 0.1.1-alpha.9

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
@@ -40,6 +40,7 @@ export interface ParameterMirror {
40
40
  docComment?: DocComment;
41
41
  }
42
42
  export interface MethodMirror {
43
+ access_modifier: string;
43
44
  annotations: Annotation[];
44
45
  name: string;
45
46
  memberModifiers: string[];
@@ -48,6 +49,7 @@ export interface MethodMirror {
48
49
  docComment?: DocComment;
49
50
  }
50
51
  export interface PropertyMirror {
52
+ access_modifier: string;
51
53
  annotations: Annotation[];
52
54
  name: string;
53
55
  memberModifiers: string[];
@@ -55,6 +57,7 @@ export interface PropertyMirror {
55
57
  docComment?: DocComment;
56
58
  }
57
59
  export interface FieldMirror {
60
+ access_modifier: string;
58
61
  annotations: Annotation[];
59
62
  name: string;
60
63
  memberModifiers: string[];
@@ -67,22 +70,24 @@ export interface ConstructorMirror {
67
70
  parameters: ParameterMirror[];
68
71
  docComment?: DocComment;
69
72
  }
73
+ declare type TypeName = 'class' | 'interface' | 'enum';
74
+ export declare type Type = InterfaceMirror | ClassMirror | EnumMirror;
70
75
  export interface EnumMirror {
71
76
  annotations: Annotation[];
72
77
  name: string;
73
- type_name: string;
78
+ type_name: TypeName;
74
79
  access_modifier: string;
75
80
  docComment?: DocComment;
76
81
  }
77
- declare type TypeName = 'class' | 'interface' | 'enum';
78
- declare type Type = InterfaceMirror | ClassMirror | EnumMirror;
79
82
  export interface InterfaceMirror {
80
83
  annotations: Annotation[];
81
84
  name: string;
82
85
  type_name: TypeName;
83
86
  methods: MethodMirror[];
84
87
  extended_interfaces: string[];
88
+ access_modifier: string;
85
89
  docComment?: DocComment;
90
+ sharingModifier?: string;
86
91
  }
87
92
  export interface ClassMirror {
88
93
  string: any;
@@ -90,8 +95,8 @@ export interface ClassMirror {
90
95
  name: string;
91
96
  type_name: TypeName;
92
97
  methods: MethodMirror[];
93
- sharingModifier: string;
94
- classModifiers: string[];
98
+ sharingModifier?: string;
99
+ classModifier?: string;
95
100
  extended_class?: string;
96
101
  implemented_interfaces: string[];
97
102
  properties: PropertyMirror[];
@@ -100,6 +105,7 @@ export interface ClassMirror {
100
105
  enums: EnumMirror[];
101
106
  interfaces: InterfaceMirror[];
102
107
  classes: ClassMirror[];
108
+ access_modifier: string;
103
109
  docComment?: DocComment;
104
110
  }
105
111
  export {};
package/index.js CHANGED
@@ -3,6 +3,6 @@ exports.__esModule = true;
3
3
  exports.reflect = void 0;
4
4
  var lib = require('./out');
5
5
  function reflect(declarationBody) {
6
- return lib.reflect(declarationBody);
6
+ return JSON.parse(lib.reflect(declarationBody));
7
7
  }
8
8
  exports.reflect = reflect;
package/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  const lib = require('./out');
2
2
 
3
3
  export function reflect(declarationBody: string): Type {
4
- return lib.reflect(declarationBody) as Type;
4
+ return JSON.parse(lib.reflect(declarationBody)) as Type;
5
5
  }
6
6
 
7
7
  export interface ParamAnnotation {
@@ -53,6 +53,7 @@ export interface ParameterMirror {
53
53
  }
54
54
 
55
55
  export interface MethodMirror {
56
+ access_modifier: string;
56
57
  annotations: Annotation[];
57
58
  name: string;
58
59
  memberModifiers: string[];
@@ -62,6 +63,7 @@ export interface MethodMirror {
62
63
  }
63
64
 
64
65
  export interface PropertyMirror {
66
+ access_modifier: string;
65
67
  annotations: Annotation[];
66
68
  name: string;
67
69
  memberModifiers: string[];
@@ -70,6 +72,7 @@ export interface PropertyMirror {
70
72
  }
71
73
 
72
74
  export interface FieldMirror {
75
+ access_modifier: string;
73
76
  annotations: Annotation[];
74
77
  name: string;
75
78
  memberModifiers: string[];
@@ -84,24 +87,28 @@ export interface ConstructorMirror {
84
87
  docComment?: DocComment;
85
88
  }
86
89
 
90
+ // Types
91
+
92
+ type TypeName = 'class' | 'interface' | 'enum';
93
+ export type Type = InterfaceMirror | ClassMirror | EnumMirror;
94
+
87
95
  export interface EnumMirror {
88
96
  annotations: Annotation[];
89
97
  name: string;
90
- type_name: string;
98
+ type_name: TypeName;
91
99
  access_modifier: string;
92
100
  docComment?: DocComment;
93
101
  }
94
102
 
95
- type TypeName = 'class' | 'interface' | 'enum';
96
- type Type = InterfaceMirror | ClassMirror | EnumMirror;
97
-
98
103
  export interface InterfaceMirror {
99
104
  annotations: Annotation[];
100
105
  name: string;
101
106
  type_name: TypeName;
102
107
  methods: MethodMirror[];
103
108
  extended_interfaces: string[];
109
+ access_modifier: string;
104
110
  docComment?: DocComment;
111
+ sharingModifier?: string;
105
112
  }
106
113
 
107
114
  export interface ClassMirror {
@@ -110,8 +117,8 @@ export interface ClassMirror {
110
117
  name: string;
111
118
  type_name: TypeName;
112
119
  methods: MethodMirror[];
113
- sharingModifier: string;
114
- classModifiers: string[];
120
+ sharingModifier?: string;
121
+ classModifier?: string;
115
122
  extended_class?: string;
116
123
  implemented_interfaces: string[];
117
124
  properties: PropertyMirror[];
@@ -120,5 +127,6 @@ export interface ClassMirror {
120
127
  enums: EnumMirror[];
121
128
  interfaces: InterfaceMirror[];
122
129
  classes: ClassMirror[];
130
+ access_modifier: string;
123
131
  docComment?: DocComment;
124
132
  }
package/jest.config.js ADDED
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line no-undef
2
+ module.exports = {
3
+ roots: ["<rootDir>/."],
4
+ testMatch: [
5
+ "**/__tests__/**/*.+(ts|tsx|js)",
6
+ "**/?(*.)+(spec|test).+(ts|tsx|js)",
7
+ ],
8
+ transform: {
9
+ "^.+\\.(ts|tsx)$": "ts-jest",
10
+ },
11
+ };