Hello!
https://github.com/clojure/core.typed/wiki/Quick-Guide#types-use-the-current-global-scope-of-the-namespace
What does this mean?
I have to :import the namespace where I made the defaliases with all my types? How can I do that?
nevermind, made it work. But I actually just did a require
like
(ns my.namespace
(:require [my.types]))This way, I managed to access the types defined via defalias
Without fully qualifying them
It just means that if you want to write the abbreviated version of a class in a type like File , just use import: (:import [.
This is pretty obvious in hindsight, but worth noting 10 years ago ๐
What if it is a typed that I defined in other namespace? The way I did is the correct form? I mean, it works but maybe thereโs something better
yes, a defalias is similar to a var reference without actually interning a var.
Nice, thank you!