You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has been designed to fight performance issues. A number for the ts-toolbelt is just an index on a map. Indexes are strings and this is the answer.
It would have been extremely heavy (but possible) to take a number as input. It would force us to search for the key of that number (basically transforming back to string every time).
This way, you can combine number operations together (at high performance) and at the end of your operations transform it to a normal number with Format!
If you want to dig more into it, have a look in Iteration/IterationOf.ts. You will find a generated map that powers all these amazing computations. From this was born Prev & Next that enabled all sorts of computations (type iteration, numbers...).
馃 Question
Describe your question
The
Number
utilities all expect receiving a number that is astring
. That does not make sense.Search tags, topics
#number #string #input
The text was updated successfully, but these errors were encountered: