Fork me on GitHub
#announcements
<
2024-03-20
>
ambrosebs02:03:49

https://github.com/typedclojure/typedclojure 1.2.1 has been released. https://github.com/typedclojure/typedclojure/blob/main/CHANGELOG.md#121-20240320 Please join #core-typed if you'd like to learn more. Highlights (including 1.2.0): • support for requiring-resolve ◦ e.g., (requiring-resolve 'fully-qualified/sym) : (t/Var (t/TypeOf fully-qualified/sym)) • improve support for passing keywords as functions to higher-order functions ◦ (map :a ...) now infers accurately, bringing parity to existing support for (map #(:a %) ...) • BREAKING: streamlined type arguments for mutable values ◦ combine input/output (co/contravariant) type arguments into one invariant ◦ e.g., old (Atom in out) , new (Atom t). ◦ see changelog for migration instructions • added handy type abbreviations like t/AnySeqable <=> (t/Seqable t/Any) • added full clj-kondo support for all public macros ◦ hooks distributed with jars • add Java 21 annotation for java.util.SequencedCollection • Introduce t/Instanceand t/Satisfies as common supertypes for Classes/Protocols ◦ e.g., (Comparable Any) <: (t/Instance Comparable) • enhance the return types of instance? and satisfies? to be more accurate ◦ e.g., (instance? Comparable x) implies x : (Instance Comparable), not x : (Comparable Any) • support annotating protocols without having to load them

😍 6
🎉 17
gratitude 3
💯 1
❤️ 1
Noah Bogart02:03:54

I gotta try this out

❤️ 1
hifumi12303:03:58

I'm planning to try out typedclojure in a small CLJS project soon. Are some of these improvements also applicable to CLJS?

ambrosebs04:03:47

@U0479UCF48H Probably! I spent some time merging the backends of the implementations so a lot of the changes apply to both https://github.com/typedclojure/typedclojure/commit/e7dd70219b7259d5a1942a0b38d6e059c24404f4

ambrosebs04:03:04

I think the biggest win is that the cljs checker has type rules for macros now. (At least I think so).

👀 1