@@ -118,26 +118,25 @@ defmodule Inspect.Opts do
118118 @ typedoc """
119119 Options for building an `Inspect.Opts` struct with `new/1`.
120120 """
121- @ type new_opts :: [
122- base: :decimal | :binary | :hex | :octal ,
123- binaries: :infer | :as_binaries | :as_strings ,
124- charlists: :infer | :as_lists | :as_charlists ,
125- custom_options: keyword ,
126- inspect_fun: ( any , t -> Inspect.Algebra . t ( ) ) ,
127- limit: non_neg_integer | :infinity ,
128- pretty: boolean ,
129- printable_limit: non_neg_integer | :infinity ,
130- safe: boolean ,
131- structs: boolean ,
132- syntax_colors: [ { color_key , IO.ANSI . ansidata ( ) } ] ,
133- width: non_neg_integer | :infinity
134- ]
121+ @ type new_opt ::
122+ { :base , :decimal | :binary | :hex | :octal }
123+ | { :binaries , :infer | :as_binaries | :as_strings }
124+ | { :charlists , :infer | :as_lists | :as_charlists }
125+ | { :custom_options , keyword }
126+ | { :inspect_fun , ( any , t -> Inspect.Algebra . t ( ) ) }
127+ | { :limit , non_neg_integer | :infinity }
128+ | { :pretty , boolean }
129+ | { :printable_limit , non_neg_integer | :infinity }
130+ | { :safe , boolean }
131+ | { :structs , boolean }
132+ | { :syntax_colors , [ { color_key , IO.ANSI . ansidata ( ) } ] }
133+ | { :width , non_neg_integer | :infinity }
135134
136135 @ doc """
137136 Builds an `Inspect.Opts` struct.
138137 """
139138 @ doc since: "1.13.0"
140- @ spec new ( new_opts ( ) ) :: t
139+ @ spec new ( [ new_opt ( ) ] ) :: t
141140 def new ( opts ) do
142141 struct ( % Inspect.Opts { inspect_fun: default_inspect_fun ( ) } , opts )
143142 end
0 commit comments