-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
formatString() TypeScript type specifies Array as a return value #139
Comments
Hi, I have to review the code, because it seems to me that that change was required to be able to intermix JSX code in the returned string, I don't remember if the result is an array and so the tpe definition had to be modified ... |
Do you think it is a good decision to have both JSX and string formatting for 1 function? |
The JSX interpolation wasn't an option at start, it was added in a second time... but if we create a separate function we break existing uses.. |
It's a hack, but you can override this behavior in your project by extending the
|
Hello, thanks for making this package. I enjoy using it.
However, I encountered a potential issue while using it with TypeScript.
It seems that
formatString()
return type specifies an Array as well as string.Shouldn't it only be a string? Since even docs specify that it returns a string.
See the location of the type and commit in question:
8a700b2#r133591646
Seems that this the potential issue has been introduced in:
f3f7385
The text was updated successfully, but these errors were encountered: