react-localize-redux icon indicating copy to clipboard operation
react-localize-redux copied to clipboard

translate function not returning proper type [with CodeSandBox example]

Open jprester opened this issue 5 years ago • 1 comments

If I use react-localize-redux with typescript I will encounter type issue when passing the value to the 'translate' function and expecting to use returned string as a placeholder text for input form element.

Typescript is complaining that return value wont be a string but this instead:

image

I've noticed that this issue had already been reported (issue #145, #148, #149 if I am not mistaken) so I decided to improve the report by making the codesandbox example as it is still not fixed in the newest version.

React version: "^16.9.0" react-localize-redux version: "^3.5.2"

Code Sandbox Example

https://codesandbox.io/s/react-typescript-77fmb?fontsize=14

image

jprester avatar Sep 16 '19 11:09 jprester