Skip to content

Commit

Permalink
Merge pull request #962 from ingesolvoll/master
Browse files Browse the repository at this point in the history
Malli tuple should generate clj-kondo seqable
  • Loading branch information
ikitommi authored Sep 24, 2023
2 parents 1cb10da + 04b7392 commit e1482ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/malli/clj_kondo.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
(= :keys (:op child)) (assoc child :nilable true)
(and (keyword? child) (not= :any child)) (keyword "nilable" (name child))
:else child))
(defmethod accept :tuple [_ _ children _] children)
(defmethod accept :tuple [_ _ _ _] :seqable)
(defmethod accept :multi [_ _ _ _] :any) ;;??
(defmethod accept :re [_ _ _ _] :string)
(defmethod accept :fn [_ _ _ _] :fn)
Expand Down
4 changes: 3 additions & 1 deletion test/malli/clj_kondo_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
[:xyz :any]
[:xyz2 [:maybe :any]]
[:xyz3 [:maybe :int]]
[:tuple-of-ints [:maybe [:tuple :int :int]]]
[:nested [:merge
[:map [:id ::id]]
[:map [:price ::price]]]]
Expand Down Expand Up @@ -73,7 +74,8 @@
:string-type-enum :nilable/string
:keyword-type-enum :keyword
:any-type-enum :any
:z :vector}}
:z :vector
:tuple-of-ints :nilable/seqable}}
(clj-kondo/transform Schema)))

(let [expected-out
Expand Down

0 comments on commit e1482ed

Please sign in to comment.