   end
 
   @doc false
+  @deprecated "Use Code.Typespec.fetch_callbacks/1 instead"
   def beam_callbacks(module) when is_atom(module) or is_binary(module) do
-    IO.warn(
-      "Kernel.Typespec.beam_callbacks/1 is deprecated, please use Code.Typespec.fetch_callbacks/1 instead"
-    )
-
     case Code.Typespec.fetch_callbacks(module) do
       {:ok, callbacks} -> callbacks
       :error -> nil

  end

  @doc false
  def beam_specs(module) when is_atom(module) or is_binary(module) do
    IO.warn(
      "Kernel.Typespec.beam_specs/1 is deprecated, please use Code.Typespec.fetch_specs/1 instead"
    )

    case Code.Typespec.fetch_specs(module) do
      {:ok, specs} -> specs
      :error -> nil

  ## Deprecated API moved to Code.Typespec

  @doc false
  @deprecated "Use Code.Typespec.spec_to_quoted/2 instead"
  def spec_to_ast(name, spec) do
    Code.Typespec.spec_to_quoted(name, spec)
  end

  @doc false
  @deprecated "Use Code.Typespec.type_to_quoted/1 instead"
  def type_to_ast(type) do
    Code.Typespec.type_to_quoted(type)
  end

