Skip to content

translate function not returning proper type [with CodeSandBox example] #178

@jprester

Description

@jprester

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions