@cparra/apexdocs 2.6.0 → 2.8.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/LICENSE +21 -21
- package/README.md +1 -1
- package/docs/API/SampleClassWithoutModifier.md +11 -11
- package/docs/Main/SampleClass.md +5 -5
- package/docs/Misc-Group/AnotherInterface.md +1 -0
- package/docs/Misc-Group/ChildClass.md +78 -0
- package/docs/Misc-Group/GrandparentClass.md +13 -0
- package/docs/Misc-Group/InterfaceWithInheritance.md +33 -0
- package/docs/Misc-Group/ParentClass.md +37 -0
- package/docs/Misc-Group/SampleClassWithoutModifier.md +11 -0
- package/docs/README.md +15 -11
- package/docs/index.html +22 -22
- package/examples/force-app/main/default/classes/AnotherInterface.cls +1 -0
- package/examples/force-app/main/default/classes/ChildClass.cls +24 -0
- package/examples/force-app/main/default/classes/GrandparentClass.cls +5 -0
- package/examples/force-app/main/default/classes/InterfaceWithInheritance.cls +1 -0
- package/examples/force-app/main/default/classes/ParentClass.cls +16 -0
- package/jest.config.js +5 -5
- package/lib/model/inheritance.d.ts +8 -0
- package/lib/model/inheritance.js +3 -0
- package/lib/model/inheritance.js.map +1 -0
- package/lib/model/markdown-file.d.ts +1 -0
- package/lib/model/markdown-file.js +3 -0
- package/lib/model/markdown-file.js.map +1 -1
- package/lib/model/markdown-generation-util/field-declaration-util.d.ts +2 -2
- package/lib/model/markdown-generation-util/field-declaration-util.js +4 -1
- package/lib/model/markdown-generation-util/field-declaration-util.js.map +1 -1
- package/lib/model/markdown-generation-util/method-declaration-util.d.ts +3 -2
- package/lib/model/markdown-generation-util/method-declaration-util.js +9 -0
- package/lib/model/markdown-generation-util/method-declaration-util.js.map +1 -1
- package/lib/model/markdown-generation-util/type-declaration-util.js +60 -0
- package/lib/model/markdown-generation-util/type-declaration-util.js.map +1 -1
- package/lib/model/markdown-type-file.d.ts +4 -3
- package/lib/model/markdown-type-file.js.map +1 -1
- package/lib/service/parser.d.ts +12 -1
- package/lib/service/parser.js +102 -1
- package/lib/service/parser.js.map +1 -1
- package/package.json +3 -3
- package/src/model/inheritance.ts +7 -0
- package/src/model/markdown-file.ts +4 -0
- package/src/model/markdown-generation-util/field-declaration-util.ts +9 -4
- package/src/model/markdown-generation-util/method-declaration-util.ts +28 -10
- package/src/model/markdown-generation-util/type-declaration-util.ts +70 -1
- package/src/model/markdown-type-file.ts +11 -7
- package/src/service/parser.ts +144 -2
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 Cesar Parra
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Cesar Parra
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -319,7 +319,7 @@ to have any desired HTML within your docs.
|
|
|
319
319
|
as they will be treated as an HTML tag and not displayed. For example if you have something like `@description Returns a List<String>`
|
|
320
320
|
the `<String>` portion will be treated as HTML and thus not appear on the page.
|
|
321
321
|
|
|
322
|
-
To fix this issue, when not sanitizing HTML, you should wrap any code that contain special characters that can be treated as HTML within '
|
|
322
|
+
To fix this issue, when not sanitizing HTML, you should wrap any code that contain special characters that can be treated as HTML within '\`'
|
|
323
323
|
or within `<code>` tags.
|
|
324
324
|
|
|
325
325
|
## Typescript
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# SampleClassWithoutModifier
|
|
2
|
-
|
|
3
|
-
`ISTEST`
|
|
4
|
-
## Methods
|
|
5
|
-
### `static thisIsAClassWithoutAModifier()`
|
|
6
|
-
|
|
7
|
-
`ISTEST`
|
|
8
|
-
|
|
9
|
-
This is a test method
|
|
10
|
-
|
|
11
|
-
---
|
|
1
|
+
# SampleClassWithoutModifier
|
|
2
|
+
|
|
3
|
+
`ISTEST`
|
|
4
|
+
## Methods
|
|
5
|
+
### `static thisIsAClassWithoutAModifier()`
|
|
6
|
+
|
|
7
|
+
`ISTEST`
|
|
8
|
+
|
|
9
|
+
This is a test method
|
|
10
|
+
|
|
11
|
+
---
|
package/docs/Main/SampleClass.md
CHANGED
|
@@ -66,17 +66,17 @@ Constructs a SampleClass with an argument.
|
|
|
66
66
|
## Fields
|
|
67
67
|
### Common Constants
|
|
68
68
|
|
|
69
|
-
* `ANOTHER_CONSTANT` → `String`
|
|
70
|
-
* `A_CONSTANT` → `String` [`NAMESPACEACCESSIBLE` ] - This is a constant.
|
|
69
|
+
* `ANOTHER_CONSTANT` → `String` (*Inherited*)
|
|
70
|
+
* `A_CONSTANT` → `String` (*Inherited*) [`NAMESPACEACCESSIBLE` ] - This is a constant.
|
|
71
71
|
---
|
|
72
72
|
### 'General' Constants
|
|
73
73
|
|
|
74
|
-
* `GENERAL_ANOTHER_CONSTANT` → `String`
|
|
75
|
-
* `GENERAL_A_CONSTANT` → `String` [`NAMESPACEACCESSIBLE` ] - This is a constant.
|
|
74
|
+
* `GENERAL_ANOTHER_CONSTANT` → `String` (*Inherited*)
|
|
75
|
+
* `GENERAL_A_CONSTANT` → `String` (*Inherited*) [`NAMESPACEACCESSIBLE` ] - This is a constant.
|
|
76
76
|
---
|
|
77
77
|
### Other variables
|
|
78
78
|
|
|
79
|
-
* `someVariable` → `String`
|
|
79
|
+
* `someVariable` → `String` (*Inherited*)
|
|
80
80
|
---
|
|
81
81
|
## Properties
|
|
82
82
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# AnotherInterface
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# ChildClass
|
|
2
|
+
|
|
3
|
+
**Inheritance**
|
|
4
|
+
|
|
5
|
+
[GrandparentClass](/Misc-Group/GrandparentClass.md)
|
|
6
|
+
>
|
|
7
|
+
[ParentClass](/Misc-Group/ParentClass.md)
|
|
8
|
+
>
|
|
9
|
+
ChildClass
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
**Implemented types**
|
|
13
|
+
|
|
14
|
+
[SampleInterface](/Sample-Interfaces/SampleInterface.md)
|
|
15
|
+
|
|
16
|
+
## Fields
|
|
17
|
+
|
|
18
|
+
### `protectedGrandParentField` → `String`
|
|
19
|
+
|
|
20
|
+
*Inherited*
|
|
21
|
+
|
|
22
|
+
### `protectedString` → `String`
|
|
23
|
+
|
|
24
|
+
*Inherited*
|
|
25
|
+
|
|
26
|
+
This is a protected string, use carefully.
|
|
27
|
+
|
|
28
|
+
### `publicString` → `String`
|
|
29
|
+
|
|
30
|
+
*Inherited*
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
## Properties
|
|
34
|
+
|
|
35
|
+
### `AProp` → `String`
|
|
36
|
+
|
|
37
|
+
*Inherited*
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
## Methods
|
|
41
|
+
### `doSomething()`
|
|
42
|
+
### `override overridableMethodOverridden()`
|
|
43
|
+
|
|
44
|
+
This method was overridden.
|
|
45
|
+
|
|
46
|
+
#### Return
|
|
47
|
+
|
|
48
|
+
**Type**
|
|
49
|
+
|
|
50
|
+
String
|
|
51
|
+
|
|
52
|
+
**Description**
|
|
53
|
+
|
|
54
|
+
A String.
|
|
55
|
+
|
|
56
|
+
### `execute()`
|
|
57
|
+
|
|
58
|
+
Executes the command.
|
|
59
|
+
|
|
60
|
+
### `getValue()`
|
|
61
|
+
|
|
62
|
+
Returns a value based on the executed command.
|
|
63
|
+
|
|
64
|
+
#### Return
|
|
65
|
+
|
|
66
|
+
**Type**
|
|
67
|
+
|
|
68
|
+
String
|
|
69
|
+
|
|
70
|
+
**Description**
|
|
71
|
+
|
|
72
|
+
The value
|
|
73
|
+
|
|
74
|
+
### `overridableMethod()`
|
|
75
|
+
|
|
76
|
+
*Inherited*
|
|
77
|
+
|
|
78
|
+
---
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# InterfaceWithInheritance
|
|
2
|
+
|
|
3
|
+
**Extended types**
|
|
4
|
+
|
|
5
|
+
[SampleInterface](/Sample-Interfaces/SampleInterface.md)
|
|
6
|
+
,
|
|
7
|
+
[AnotherInterface](/Misc-Group/AnotherInterface.md)
|
|
8
|
+
## Methods
|
|
9
|
+
### `execute()`
|
|
10
|
+
|
|
11
|
+
*Inherited*
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
Executes the command.
|
|
15
|
+
|
|
16
|
+
### `getValue()`
|
|
17
|
+
|
|
18
|
+
*Inherited*
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Returns a value based on the executed command.
|
|
22
|
+
|
|
23
|
+
#### Return
|
|
24
|
+
|
|
25
|
+
**Type**
|
|
26
|
+
|
|
27
|
+
String
|
|
28
|
+
|
|
29
|
+
**Description**
|
|
30
|
+
|
|
31
|
+
The value
|
|
32
|
+
|
|
33
|
+
---
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# ParentClass
|
|
2
|
+
|
|
3
|
+
**Inheritance**
|
|
4
|
+
|
|
5
|
+
[GrandparentClass](/Misc-Group/GrandparentClass.md)
|
|
6
|
+
>
|
|
7
|
+
ParentClass
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
### `privateString` → `String`
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### `protectedGrandParentField` → `String`
|
|
15
|
+
|
|
16
|
+
*Inherited*
|
|
17
|
+
|
|
18
|
+
### `protectedString` → `String`
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
This is a protected string, use carefully.
|
|
22
|
+
|
|
23
|
+
### `publicString` → `String`
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
## Properties
|
|
28
|
+
|
|
29
|
+
### `AProp` → `String`
|
|
30
|
+
|
|
31
|
+
*Inherited*
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
## Methods
|
|
35
|
+
### `overridableMethod()`
|
|
36
|
+
### `overridableMethodOverridden()`
|
|
37
|
+
---
|
package/docs/README.md
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
# Classes
|
|
2
|
-
##
|
|
2
|
+
## Misc Group
|
|
3
|
+
|
|
4
|
+
### [AnotherInterface](/Misc-Group/AnotherInterface.md)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### [ChildClass](/Misc-Group/ChildClass.md)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### [GrandparentClass](/Misc-Group/GrandparentClass.md)
|
|
11
|
+
|
|
3
12
|
|
|
4
|
-
### [
|
|
13
|
+
### [InterfaceWithInheritance](/Misc-Group/InterfaceWithInheritance.md)
|
|
5
14
|
|
|
6
|
-
Simple Trigger Framework, integrated with [CodeControl](CodeControl).
|
|
7
15
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
### [ParentClass](/Misc-Group/ParentClass.md)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### [SampleClassWithoutModifier](/Misc-Group/SampleClassWithoutModifier.md)
|
|
12
20
|
|
|
13
21
|
## Main
|
|
14
22
|
|
|
@@ -25,10 +33,6 @@ This is a class description. This class relates to [SampleInterface](/Sample-Int
|
|
|
25
33
|
You can also link using this syntax [SampleInterface](/Sample-Interfaces/SampleInterface.md)
|
|
26
34
|
|
|
27
35
|
|
|
28
|
-
## Misc Group
|
|
29
|
-
|
|
30
|
-
### [SampleClassWithoutModifier](/Misc-Group/SampleClassWithoutModifier.md)
|
|
31
|
-
|
|
32
36
|
## Sample Interfaces
|
|
33
37
|
|
|
34
38
|
### [SampleInterface](/Sample-Interfaces/SampleInterface.md)
|
package/docs/index.html
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<title>Document</title>
|
|
6
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
|
7
|
-
<meta name="description" content="Description">
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
|
9
|
-
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<div id="app"></div>
|
|
13
|
-
<script>
|
|
14
|
-
window.$docsify = {
|
|
15
|
-
name: '',
|
|
16
|
-
repo: ''
|
|
17
|
-
}
|
|
18
|
-
</script>
|
|
19
|
-
<!-- Docsify v4 -->
|
|
20
|
-
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
|
|
21
|
-
</body>
|
|
22
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Document</title>
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
|
7
|
+
<meta name="description" content="Description">
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
|
9
|
+
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="app"></div>
|
|
13
|
+
<script>
|
|
14
|
+
window.$docsify = {
|
|
15
|
+
name: '',
|
|
16
|
+
repo: ''
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
<!-- Docsify v4 -->
|
|
20
|
+
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
public interface AnotherInterface{}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
public class ChildClass extends ParentClass implements SampleInterface {
|
|
2
|
+
public void doSomething() {
|
|
3
|
+
System.debug('Do something');
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @description This method was overridden.
|
|
8
|
+
* @return A String.
|
|
9
|
+
*/
|
|
10
|
+
public override String overridableMethodOverridden() {
|
|
11
|
+
return '';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @description Executes the command.
|
|
16
|
+
*/
|
|
17
|
+
public void execute();
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description Returns a value based on the executed command.
|
|
21
|
+
* @return The value
|
|
22
|
+
*/
|
|
23
|
+
public String getValue();
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
public interface InterfaceWithInheritance extends SampleInterface, AnotherInterface {}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
public virtual class ParentClass extends GrandparentClass{
|
|
2
|
+
private String privateString;
|
|
3
|
+
/**
|
|
4
|
+
* @description This is a protected string, use carefully.
|
|
5
|
+
*/
|
|
6
|
+
protected String protectedString;
|
|
7
|
+
public String publicString;
|
|
8
|
+
|
|
9
|
+
public virtual String overridableMethod() {
|
|
10
|
+
return '';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public virtual String overridableMethodOverridden() {
|
|
14
|
+
return '';
|
|
15
|
+
}
|
|
16
|
+
}
|
package/jest.config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
preset: 'ts-jest',
|
|
3
|
-
testEnvironment: 'node',
|
|
4
|
-
modulePathIgnorePatterns: ['<rootDir>/lib/'],
|
|
5
|
-
};
|
|
1
|
+
module.exports = {
|
|
2
|
+
preset: 'ts-jest',
|
|
3
|
+
testEnvironment: 'node',
|
|
4
|
+
modulePathIgnorePatterns: ['<rootDir>/lib/'],
|
|
5
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FieldMirror, MethodMirror, PropertyMirror } from '@cparra/apex-reflection';
|
|
2
|
+
export declare type InheritanceSupport = {
|
|
3
|
+
inherited: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare type FieldMirrorWithInheritance = FieldMirror & InheritanceSupport;
|
|
6
|
+
export declare type PropertyMirrorWithInheritance = PropertyMirror & InheritanceSupport;
|
|
7
|
+
export declare type MethodMirrorWithInheritance = MethodMirror & InheritanceSupport;
|
|
8
|
+
export declare type FieldOrProperty = FieldMirrorWithInheritance | PropertyMirrorWithInheritance;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inheritance.js","sourceRoot":"","sources":["../../src/model/inheritance.ts"],"names":[],"mappings":""}
|
|
@@ -3,6 +3,7 @@ export declare class MarkdownFile extends File {
|
|
|
3
3
|
fileExtension(): string;
|
|
4
4
|
addTitle(text: string, level?: number): void;
|
|
5
5
|
addText(text: string, encodeHtml?: boolean): void;
|
|
6
|
+
addLink(text: string, encodeHtml?: boolean): void;
|
|
6
7
|
startCodeBlock(): void;
|
|
7
8
|
endCodeBlock(): void;
|
|
8
9
|
addHorizontalRule(): void;
|
|
@@ -20,6 +20,9 @@ class MarkdownFile extends file_1.File {
|
|
|
20
20
|
addText(text, encodeHtml = true) {
|
|
21
21
|
super.addText(this._replaceInlineReferences(text), encodeHtml);
|
|
22
22
|
}
|
|
23
|
+
addLink(text, encodeHtml = true) {
|
|
24
|
+
this.addText(`\{@link ${text}\}`, encodeHtml);
|
|
25
|
+
}
|
|
23
26
|
startCodeBlock() {
|
|
24
27
|
this.addText('```apex');
|
|
25
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-file.js","sourceRoot":"","sources":["../../src/model/markdown-file.ts"],"names":[],"mappings":";;;AAAA,i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AC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AArHD,oCAqHC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MarkdownFile } from '../markdown-file';
|
|
2
|
-
import {
|
|
3
|
-
export declare function declareField(markdownFile: MarkdownFile, fields:
|
|
2
|
+
import { FieldMirrorWithInheritance, PropertyMirrorWithInheritance } from '../inheritance';
|
|
3
|
+
export declare function declareField(markdownFile: MarkdownFile, fields: FieldMirrorWithInheritance[] | PropertyMirrorWithInheritance[], startingHeadingLevel: number, grouped?: boolean): void;
|
|
@@ -22,6 +22,9 @@ function addFieldSection(markdownFile, mirrorModel, startingHeadingLevel, groupe
|
|
|
22
22
|
if (!grouped) {
|
|
23
23
|
markdownFile.addTitle(`\`${mirrorModel.name}\` → \`${mirrorModel.type}\``, startingHeadingLevel + 2);
|
|
24
24
|
markdownFile.addBlankLine();
|
|
25
|
+
if (mirrorModel.inherited) {
|
|
26
|
+
markdownFile.addText('*Inherited*');
|
|
27
|
+
}
|
|
25
28
|
mirrorModel.annotations.forEach((annotation) => {
|
|
26
29
|
markdownFile.addText(`\`${annotation.type.toUpperCase()}\` `);
|
|
27
30
|
});
|
|
@@ -48,7 +51,7 @@ function addFieldSection(markdownFile, mirrorModel, startingHeadingLevel, groupe
|
|
|
48
51
|
if ((_b = mirrorModel.docComment) === null || _b === void 0 ? void 0 : _b.description) {
|
|
49
52
|
description = ` - ${(_c = mirrorModel.docComment) === null || _c === void 0 ? void 0 : _c.description}`;
|
|
50
53
|
}
|
|
51
|
-
markdownFile.addListItem(`\`${mirrorModel.name}\` → \`${mirrorModel.type}
|
|
54
|
+
markdownFile.addListItem(`\`${mirrorModel.name}\` → \`${mirrorModel.type}\` (*Inherited*) ${annotations} ${description}`);
|
|
52
55
|
markdownFile.addBlankLine();
|
|
53
56
|
}
|
|
54
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-declaration-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/field-declaration-util.ts"],"names":[],"mappings":";;;AAGA,SAAgB,YAAY,CAC1B,YAA0B,EAC1B,
|
|
1
|
+
{"version":3,"file":"field-declaration-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/field-declaration-util.ts"],"names":[],"mappings":";;;AAGA,SAAgB,YAAY,CAC1B,YAA0B,EAC1B,MAAsE,EACtE,oBAA4B,EAC5B,OAAO,GAAG,KAAK;IAEf,YAAY,CAAC,YAAY,EAAE,CAAC;IAC5B,MAAM;SACH,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACrB,IAAI,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI;YAAE,OAAO,CAAC,CAAC,CAAC;QACvC,IAAI,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI;YAAE,OAAO,CAAC,CAAC;QACtC,OAAO,CAAC,CAAC;IACX,CAAC,CAAC;SACD,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;QACzB,eAAe,CAAC,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;IAEL,YAAY,CAAC,iBAAiB,EAAE,CAAC;AACnC,CAAC;AAlBD,oCAkBC;AAED,SAAS,eAAe,CACtB,YAA0B,EAC1B,WAA4B,EAC5B,oBAA4B,EAC5B,OAAgB;;IAEhB,IAAI,CAAC,OAAO,EAAE;QACZ,YAAY,CAAC,QAAQ,CAAC,KAAK,WAAW,CAAC,IAAI,UAAU,WAAW,CAAC,IAAI,IAAI,EAAE,oBAAoB,GAAG,CAAC,CAAC,CAAC;QACrG,YAAY,CAAC,YAAY,EAAE,CAAC;QAC5B,IAAI,WAAW,CAAC,SAAS,EAAE;YACzB,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;SACrC;QAED,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAA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
|
+
import { MethodMirrorWithInheritance } from '../inheritance';
|
|
4
|
+
export declare function declareMethod(markdownFile: MarkdownFile, methods: ConstructorMirror[] | MethodMirrorWithInheritance[], startingHeadingLevel: number, className?: string): void;
|
|
@@ -7,6 +7,15 @@ function declareMethod(markdownFile, methods, startingHeadingLevel, className =
|
|
|
7
7
|
var _a, _b;
|
|
8
8
|
const signatureName = isMethod(currentMethod) ? currentMethod.name : className;
|
|
9
9
|
markdownFile.addTitle(`\`${buildSignature(signatureName, currentMethod)}\``, startingHeadingLevel + 2);
|
|
10
|
+
// Inheritance tag
|
|
11
|
+
if (isMethod(currentMethod)) {
|
|
12
|
+
const asMethodMirror = currentMethod;
|
|
13
|
+
if (asMethodMirror.inherited) {
|
|
14
|
+
markdownFile.addBlankLine();
|
|
15
|
+
markdownFile.addText('*Inherited*');
|
|
16
|
+
markdownFile.addBlankLine();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
10
19
|
currentMethod.annotations.forEach((annotation) => {
|
|
11
20
|
markdownFile.addBlankLine();
|
|
12
21
|
markdownFile.addText(`\`${annotation.type.toUpperCase()}\``);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-declaration-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/method-declaration-util.ts"],"names":[],"mappings":";;;AAGA,+EAA+E;
|
|
1
|
+
{"version":3,"file":"method-declaration-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/method-declaration-util.ts"],"names":[],"mappings":";;;AAGA,+EAA+E;AAG/E,SAAgB,aAAa,CAC3B,YAA0B,EAC1B,OAA4D,EAC5D,oBAA4B,EAC5B,SAAS,GAAG,EAAE;IAEd,OAAO,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;;QAChC,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAE,aAA6C,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QAChH,YAAY,CAAC,QAAQ,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G,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE5D,YAAY,CAAC,WAAW,CAAC,KAAK,aAAa,IAAI,EAAE,oBAAoB,CAAC,CAAC;IACzE,CAAC,EAAE;IAEH,YAAY,CAAC,YAAY,EAAE,CAAC;AAC9B,CAAC;AAED,SAAS,UAAU,CAAC,YAA0B,EAAE,eAAgC,EAAE,oBAA4B;;IAC5G,YAAY,CAAC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,GAAG,CAAC,CAAC,CAAC;IAC3D,YAAY,CAAC,cAAc,EAAE,CAAC;IAC9B,MAAA,eAAe,CAAC,UAAU,0CAAE,iBAAiB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACvE,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC,EAAE;IACH,YAAY,CAAC,YAAY,EAAE,CAAC;IAC5B,YAAY,CAAC,YAAY,EAAE,CAAC;AAC9B,CAAC;AAED,SAAS,QAAQ,CACf,MAAwE;IAExE,OAAQ,MAAsC,CAAC,IAAI,KAAK,SAAS,CAAC;AACpE,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.declareType = void 0;
|
|
4
4
|
const doc_comment_annotation_util_1 = require("./doc-comment-annotation-util");
|
|
5
|
+
const types_repository_1 = require("../types-repository");
|
|
5
6
|
function declareType(markdownFile, typeMirror) {
|
|
6
7
|
var _a;
|
|
7
8
|
typeMirror.annotations.forEach((currentAnnotation) => {
|
|
@@ -15,7 +16,66 @@ function declareType(markdownFile, typeMirror) {
|
|
|
15
16
|
}
|
|
16
17
|
markdownFile.addBlankLine();
|
|
17
18
|
}
|
|
19
|
+
if (typeMirror.type_name === 'class') {
|
|
20
|
+
addInheritanceSectionForClass(typeMirror, markdownFile);
|
|
21
|
+
}
|
|
22
|
+
if (typeMirror.type_name === 'interface') {
|
|
23
|
+
addInheritanceSectionForInterface(typeMirror, markdownFile);
|
|
24
|
+
}
|
|
18
25
|
doc_comment_annotation_util_1.addCustomDocCommentAnnotations(markdownFile, typeMirror);
|
|
19
26
|
}
|
|
20
27
|
exports.declareType = declareType;
|
|
28
|
+
function addInheritanceSectionForClass(typeMirror, markdownFile) {
|
|
29
|
+
const typeAsClass = typeMirror;
|
|
30
|
+
if (typeAsClass.extended_class) {
|
|
31
|
+
markdownFile.addBlankLine();
|
|
32
|
+
markdownFile.addText('**Inheritance**');
|
|
33
|
+
markdownFile.addBlankLine();
|
|
34
|
+
addParent(markdownFile, typeAsClass);
|
|
35
|
+
markdownFile.addText(typeMirror.name);
|
|
36
|
+
markdownFile.addBlankLine();
|
|
37
|
+
}
|
|
38
|
+
if (typeAsClass.implemented_interfaces.length) {
|
|
39
|
+
markdownFile.addBlankLine();
|
|
40
|
+
markdownFile.addText('**Implemented types**');
|
|
41
|
+
markdownFile.addBlankLine();
|
|
42
|
+
for (let i = 0; i < typeAsClass.implemented_interfaces.length; i++) {
|
|
43
|
+
const currentName = typeAsClass.implemented_interfaces[i];
|
|
44
|
+
markdownFile.addLink(currentName);
|
|
45
|
+
if (i < typeAsClass.implemented_interfaces.length - 1) {
|
|
46
|
+
markdownFile.addText(', ');
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
markdownFile.addBlankLine();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function addInheritanceSectionForInterface(typeMirror, markdownFile) {
|
|
53
|
+
const typeAsInterface = typeMirror;
|
|
54
|
+
if (typeAsInterface.extended_interfaces.length) {
|
|
55
|
+
markdownFile.addBlankLine();
|
|
56
|
+
markdownFile.addText('**Extended types**');
|
|
57
|
+
markdownFile.addBlankLine();
|
|
58
|
+
for (let i = 0; i < typeAsInterface.extended_interfaces.length; i++) {
|
|
59
|
+
const currentName = typeAsInterface.extended_interfaces[i];
|
|
60
|
+
markdownFile.addLink(currentName);
|
|
61
|
+
if (i < typeAsInterface.extended_interfaces.length - 1) {
|
|
62
|
+
markdownFile.addText(', ');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function addParent(markdownFile, classMirror) {
|
|
68
|
+
if (!classMirror.extended_class) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const parentType = types_repository_1.TypesRepository.getInstance().getByName(classMirror.extended_class);
|
|
72
|
+
if (!parentType) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (parentType.type_name === 'class') {
|
|
76
|
+
addParent(markdownFile, parentType);
|
|
77
|
+
}
|
|
78
|
+
markdownFile.addLink(parentType.name);
|
|
79
|
+
markdownFile.addText(' > ');
|
|
80
|
+
}
|
|
21
81
|
//# sourceMappingURL=type-declaration-util.js.map
|