Skip to content

Commit

Permalink
Fix Application start and start_phase spec (#7153)
Browse files Browse the repository at this point in the history
  • Loading branch information
angelikatyborska authored and josevalim committed Dec 30, 2017
1 parent cbde356 commit ebe33f1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/elixir/lib/application.ex
Expand Up @@ -232,7 +232,8 @@ defmodule Application do
@type key :: atom
@type value :: term
@type state :: term
@type start_type :: :permanent | :transient | :temporary
@type start_type :: :normal | {:takeover, node} | {:failover, node}
@type restart_type :: :permanent | :transient | :temporary

@application_keys [
:description,
Expand Down Expand Up @@ -402,7 +403,7 @@ defmodule Application do
:ok = Application.ensure_started(:my_test_dep)
"""
@spec ensure_started(app, start_type) :: :ok | {:error, term}
@spec ensure_started(app, restart_type) :: :ok | {:error, term}
def ensure_started(app, type \\ :temporary) when is_atom(app) do
:application.ensure_started(app, type)
end
Expand All @@ -414,7 +415,7 @@ defmodule Application do
`:applications` in the `.app` file in case they were not previously
started.
"""
@spec ensure_all_started(app, start_type) :: {:ok, [app]} | {:error, {app, term}}
@spec ensure_all_started(app, restart_type) :: {:ok, [app]} | {:error, {app, term}}
def ensure_all_started(app, type \\ :temporary) when is_atom(app) do
:application.ensure_all_started(app, type)
end
Expand Down Expand Up @@ -453,7 +454,7 @@ defmodule Application do
Note also that the `:transient` type is of little practical use, since when a
supervision tree terminates, the reason is set to `:shutdown`, not `:normal`.
"""
@spec start(app, start_type) :: :ok | {:error, term}
@spec start(app, restart_type) :: :ok | {:error, term}
def start(app, type \\ :temporary) when is_atom(app) do
:application.start(app, type)
end
Expand Down

0 comments on commit ebe33f1

Please sign in to comment.