tonsky / tongue

Do-it-yourself i18n library for Clojure/Script
Eclipse Public License 1.0
307 stars 19 forks source link

0.4.0: "Extending an existing JavaScript type" warning #30

Closed hoxu closed 2 years ago

hoxu commented 2 years ago

After upgrading to 0.4.0 the following warning appears:

------ WARNING #1 - :extending-base-js-type ------------------------------------                                                                                                                             Resource: tongue/core.cljc:81:1                                                                                                                                                                            --------------------------------------------------------------------------------
  78 |     "Interpolate the value `v` with positional `interpolations` in the provided vector."))                                                                                                             79 |
  80 |
  81 | (extend-type #?(:clj String
-------^------------------------------------------------------------------------
 Extending an existing JavaScript type - use a different symbol name instead of js/String e.g string
--------------------------------------------------------------------------------
  82 |                 :cljs js/String)
  83 |   IInterpolate
  84 |   (interpolate-named [s dicts locale interpolations]
  85 |     (str/replace s #?(:clj  #"\{([\w*!_?$%&=<>'\-+.#0-9]+|[\w*!_?$%&=<>'\-+.#0-9]+\/[\w*!_?$%&=<>'\-+.#0-9:]+)\}"
--------------------------------------------------------------------------------

Link to code: https://github.com/tonsky/tongue/blob/b2d138a9a846c46f5d1720c52584684fbcf4b006/src/tongue/core.cljc#L81-L82

Commit 7e43f426e062899db05d7dcb3441d73d0780e9cc. Ping @cjohansen.

duckyuck commented 2 years ago

@hoxu see #29

tonsky commented 2 years ago

Fixed in 0.4.1