diff --git a/CHANGELOG.md b/CHANGELOG.md index 796459fa6..978720b66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Specify the order in which state fields will be printed in the error logs. [#614](https://github.com/membraneframework/membrane_core/pull/614) * Fix clock selection [#626](https://github.com/membraneframework/membrane_core/pull/626) * Log messages in the default handle_info implementation [#680](https://github.com/membraneframework/membrane_core/pull/680) + * Fix typespecs in Membrane.UtilitySupervisor [#681](https://github.com/membraneframework/membrane_core/pull/681) ## 1.0.0 * Introduce `:remove_link` action in pipelines and bins. diff --git a/lib/membrane/utility_supervisor.ex b/lib/membrane/utility_supervisor.ex index c826a7f07..a46bbbfd3 100644 --- a/lib/membrane/utility_supervisor.ex +++ b/lib/membrane/utility_supervisor.ex @@ -25,16 +25,22 @@ defmodule Membrane.UtilitySupervisor do @doc """ Starts a process under the utility supervisor. + + Semantics of the `child_spec` argument is the same as in `Supervisor.child_spec/2`. """ - @spec start_child(t, Supervisor.child_spec()) :: Supervisor.on_start_child() + @spec start_child(t, Supervisor.child_spec() | {module(), term()} | module()) :: + Supervisor.on_start_child() defdelegate start_child(supervisor, child_spec), to: Membrane.Core.SubprocessSupervisor, as: :start_utility @doc """ Starts a process under the utility supervisor and links it to the current process. + + Semantics of the `child_spec` argument is the same as in `Supervisor.child_spec/2`. """ - @spec start_link_child(t, Supervisor.child_spec()) :: Supervisor.on_start_child() + @spec start_link_child(t, Supervisor.child_spec() | {module(), term()} | module()) :: + Supervisor.on_start_child() defdelegate start_link_child(supervisor, child_spec), to: Membrane.Core.SubprocessSupervisor, as: :start_link_utility