How to alias a module with a different name?

Say, I have a module

defmodule MyApp.Pokemon do
end

How can I alias it with a different name? Something like

defmodule MyApp.Core do
  alias MyApp.Pokemon as Pkm # ?????

  # use it as Pkm

end

alias MyApp.Pokemon, as: Pkm

3 Likes