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