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
Now that we have benchmarks, I think it should be easier to iterate on this thing. My initial idea was to not introduce any sort of input checking, assuming users either will face the runtime error during testing and fix it or simply use type checking systems.
assuming users either will face the runtime error during testing and fix it or simply use type checking systems
There are 2 problems with it:
Sometimes variables can be string or undefined, which will block users from catching all errors during test
Current stacktrace on non-string value is confusing. It is easy to miss that picocolors works only with strings (because all other works with other values).
Default JS is not type safe. It is very easy to make a mistake and send number to
red(result)
.It will be much easy to migrate projects if types will support at least numbers and code will be ready for numbers,
undefined
andnull
.The text was updated successfully, but these errors were encountered: