-
Notifications
You must be signed in to change notification settings - Fork 81
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
Change MessageFormatter's function signature #109
Labels
bug
Something isn't working
Comments
Hey 👋 fixed in 3.2.7! Since 3.2.0, the format method can also return an object or array, but setting it to return |
@kaisermann Holy shit you're fast. Thanks! ❤️ |
kaisermann
added a commit
that referenced
this issue
Nov 23, 2020
kaisermann
added a commit
that referenced
this issue
Nov 23, 2020
kaisermann
added a commit
that referenced
this issue
Nov 23, 2020
kaisermann
added a commit
that referenced
this issue
Nov 24, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Currently there's no simple way to use the embedded
$format
(_
) in TypeScript, since it returns a function, that returnsstring | unknown
. You cannot pass values as props withstring
type, you cannot use it in most of the HTML attributes (likeplaceholder
), etc.Describe the solution you'd like
Change signature for
MessageFormatter
's function tostring
instead ofstring | unknown
. Orany
ifunknown
is there for a very valid reason (not sure, the documentation here states that it always returns string).Describe alternatives you've considered
I've wrapped it myself in my project.
Not very clean or beautiful, tbh.
How important is this feature to you?
Quite!
The text was updated successfully, but these errors were encountered: