@@ -27,14 +27,6 @@ defmodule ExDoc.ModuleNode do
27
27
28
28
@ typep annotation :: atom ( )
29
29
30
- # TODO: Maybe this is worth its own module
31
- @ type doc_group :: % {
32
- title: String . t ( ) | atom ( ) ,
33
- description: String . t ( ) | nil ,
34
- doc: ExDoc.DocAST . t ( ) | nil ,
35
- rendered_doc: String . t ( ) | nil
36
- }
37
-
38
30
@ type t :: % __MODULE__ {
39
31
id: String . t ( ) ,
40
32
title: String . t ( ) ,
@@ -51,7 +43,7 @@ defmodule ExDoc.ModuleNode do
51
43
moduledoc_file: String . t ( ) ,
52
44
source_path: String . t ( ) | nil ,
53
45
source_url: String . t ( ) | nil ,
54
- docs_groups: [ doc_group ] ,
46
+ docs_groups: [ ExDoc.DocGroupNode . t ( ) ] ,
55
47
docs: [ ExDoc.DocNode . t ( ) ] ,
56
48
typespecs: [ ExDoc.DocNode . t ( ) ] ,
57
49
type: atom ( ) ,
@@ -97,9 +89,20 @@ defmodule ExDoc.DocNode do
97
89
signature: String . t ( ) ,
98
90
specs: [ ExDoc.Language . spec_ast ( ) ] ,
99
91
annotations: [ annotation ( ) ] ,
100
- group: String . t ( ) | ExDoc.ModuleNode . doc_group ( ) | nil ,
92
+ group: String . t ( ) | ExDoc.DocGroupNode . t ( ) | nil ,
101
93
doc_file: String . t ( ) ,
102
94
doc_line: non_neg_integer ( ) ,
103
95
source_url: String . t ( ) | nil
104
96
}
105
97
end
98
+
99
+ defmodule ExDoc.DocGroupNode do
100
+ defstruct title: nil , description: nil , doc: nil , rendered_doc: nil
101
+
102
+ @ type t :: % __MODULE__ {
103
+ title: String . t ( ) | atom ( ) ,
104
+ description: String . t ( ) | nil ,
105
+ doc: ExDoc.DocAST . t ( ) | nil ,
106
+ rendered_doc: String . t ( ) | nil
107
+ }
108
+ end
0 commit comments