@@ -26,14 +26,6 @@ defmodule ExDoc.ModuleNode do
2626
2727 @ typep annotation :: atom ( )
2828
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-
3729 @ type t :: % __MODULE__ {
3830 id: String . t ( ) ,
3931 title: String . t ( ) ,
@@ -49,7 +41,7 @@ defmodule ExDoc.ModuleNode do
4941 moduledoc_file: String . t ( ) ,
5042 source_path: String . t ( ) | nil ,
5143 source_url: String . t ( ) | nil ,
52- docs_groups: [ doc_group ] ,
44+ docs_groups: [ ExDoc.DocGroupNode . t ( ) ] ,
5345 docs: [ ExDoc.DocNode . t ( ) ] ,
5446 typespecs: [ ExDoc.DocNode . t ( ) ] ,
5547 type: atom ( ) ,
@@ -93,9 +85,20 @@ defmodule ExDoc.DocNode do
9385 signature: String . t ( ) ,
9486 specs: [ ExDoc.Language . spec_ast ( ) ] ,
9587 annotations: [ annotation ( ) ] ,
96- group: String . t ( ) | ExDoc.ModuleNode . doc_group ( ) | nil ,
88+ group: String . t ( ) | ExDoc.DocGroupNode . t ( ) | nil ,
9789 doc_file: String . t ( ) ,
9890 doc_line: non_neg_integer ( ) ,
9991 source_url: String . t ( ) | nil
10092 }
10193end
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