Skip to content

Commit d76cc95

Browse files
committed
Add GenServer.option type
1 parent 344f9d6 commit d76cc95

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/elixir/lib/gen_server.ex

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,13 @@ defmodule GenServer do
377377
@type name :: atom | {:global, term} | {:via, module, term}
378378

379379
@typedoc "Options used by the `start*` functions"
380-
@type options :: [debug: debug,
381-
name: name,
382-
timeout: timeout,
383-
spawn_opt: Process.spawn_opt]
380+
@type options :: [option]
381+
382+
@typedoc "Option values used by the `start*` functions"
383+
@type option :: {:debug, debug} |
384+
{:name, name} |
385+
{:timeout, timeout} |
386+
{:spawn_opt, Process.spawn_opt}
384387

385388
@typedoc "debug options supported by the `start*` functions"
386389
@type debug :: [:trace | :log | :statistics | {:log_to_file, Path.t}]

0 commit comments

Comments
 (0)