Skip to content

Add missing typespecs and fix error in docs #7259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/elixir/lib/io/ansi/docs.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ defmodule IO.ANSI.Docs do
Values for the color settings are strings with
comma-separated ANSI values.
"""
@spec default_options() :: keyword
def default_options do
[
enabled: true,
Expand All @@ -41,6 +42,7 @@ defmodule IO.ANSI.Docs do

See `default_options/0` for docs on the supported options.
"""
@spec print_heading(String.t(), keyword) :: :ok
def print_heading(heading, options \\ []) do
IO.puts(IO.ANSI.reset())
options = Keyword.merge(default_options(), options)
Expand All @@ -55,8 +57,9 @@ defmodule IO.ANSI.Docs do
Prints the documentation body.

In addition to the printing string, takes a set of options
defined in `default_options/1`.
defined in `default_options/0`.
"""
@spec print(String.t(), keyword) :: :ok
def print(doc, options \\ []) do
options = Keyword.merge(default_options(), options)

Expand Down