Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Type checking is a breaking change #53

Closed
arthot opened this issue Jul 19, 2018 · 3 comments
Closed

Type checking is a breaking change #53

arthot opened this issue Jul 19, 2018 · 3 comments
Assignees
Labels

Comments

@arthot
Copy link
Contributor

arthot commented Jul 19, 2018

Hi!

The latest release (1.4.0) introduced a new functionality "added type checks to localizers". And it's definitely a breaking change, because it breaks code like

const total = 6;
i18n`Up to ${total} integrations`

So at least it should be a major version change. But in my opinion the project shouldn't have this functionality at all, because what is wrong with this code? It's pretty straightforward, you can always use .toString() implicitly, and after all it's a JavaScript, a language where you don't care about types and can spit on OOP 😄

@skolmer skolmer self-assigned this Jul 21, 2018
@skolmer skolmer added the bug label Jul 21, 2018
@skolmer
Copy link
Owner

skolmer commented Jul 21, 2018

sorry, this was not intended. It should only check if you use type formatters for date and number formats.
It was intended to give a better debugging experience if you accidentally format a null/undefined or some other object as date or number like i18n`Current Date: ${null}:t(D)`

@arthot arthot changed the title Type checks is a breaking change Type checking is a breaking change Jul 21, 2018
@skolmer
Copy link
Owner

skolmer commented Oct 6, 2018

sorry for the huge delay, I have so much work on my desk right now. happy to receive a pull request on this topic but also willing to work on this as soon as I find some free time.

@skolmer
Copy link
Owner

skolmer commented Nov 16, 2018

Fixed in 1.4.1

@skolmer skolmer closed this as completed Nov 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants