mirror of
https://github.com/penpot/penpot.git
synced 2025-01-06 14:50:20 -05:00
Fix infer warnings in tokens test
This commit is contained in:
parent
231baac31d
commit
0d870610e1
2 changed files with 5 additions and 3 deletions
|
@ -16,6 +16,8 @@
|
|||
[cuerdas.core :as str]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(set! *warn-on-infer* false)
|
||||
|
||||
(mf/defc tab-element
|
||||
{::mf/wrap-props false}
|
||||
[{:keys [children]}]
|
||||
|
|
|
@ -6,18 +6,18 @@
|
|||
(:require
|
||||
["tinycolor2" :as tinycolor]))
|
||||
|
||||
(defn tinycolor? [x]
|
||||
(defn tinycolor? [^js x]
|
||||
(and (instance? tinycolor x) (.isValid x)))
|
||||
|
||||
(defn valid-color [color-str]
|
||||
(let [tc (tinycolor color-str)]
|
||||
(when (.isValid tc) tc)))
|
||||
|
||||
(defn ->hex [tc]
|
||||
(defn ->hex [^js tc]
|
||||
(assert (tinycolor? tc))
|
||||
(.toHex tc))
|
||||
|
||||
(defn color-format [tc]
|
||||
(defn color-format [^js tc]
|
||||
(assert (tinycolor? tc))
|
||||
(.getFormat tc))
|
||||
|
||||
|
|
Loading…
Reference in a new issue