Skip to content

Commit f663b2e

Browse files
lasseebertJosé Valim
authored andcommitted
Fix typespec for DynamicSupervisor.on_start_child (#7590)
Signed-off-by: José Valim <[email protected]>
1 parent e6c893c commit f663b2e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/elixir/lib/dynamic_supervisor.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ defmodule DynamicSupervisor do
162162
@typedoc "Supported strategies"
163163
@type strategy :: :one_for_one
164164

165+
@typedoc "Return values of `start_child` functions"
166+
@type on_start_child :: Supervisor.on_start_child() | :ignore | {:error, :max_children}
167+
165168
defstruct [
166169
:args,
167170
:extra_arguments,
@@ -288,7 +291,7 @@ defmodule DynamicSupervisor do
288291
this function returns `{:error, :max_children}`.
289292
"""
290293
@spec start_child(Supervisor.supervisor(), :supervisor.child_spec() | {module, term} | module) ::
291-
Supervisor.on_start_child()
294+
on_start_child()
292295
def start_child(supervisor, {_, _, _, _, _, _} = child_spec) do
293296
validate_and_start_child(supervisor, child_spec)
294297
end

0 commit comments

Comments
 (0)