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
So, the first three cases return back exactly the same type they received, while the last case correctly removes the leading spaces from the input string, resulting in more precise types without being inaccurate.
The text was updated successfully, but these errors were encountered:
You may be completely right here. We have made a lot of code changes to every method when we introduced IsStringLiteral and certain methods might not need them.
Whenever I have some sparing time I'll check your supposition but feel free to send a PR in the meantime. If you do so, make sure the tests are successful (the CI will ultimately tell us) and your use case is covered ;)
So, the
TrimStart
utility when instantiated with any infinite string type likestring
,Uppercase<string>
,on${Capitalize<string>}
etc returnsstring
.This behaviour is surely not incorrect, but feels like we can make the types more precise just by removing the
IsStringLiteral
check.Which means we now get more precise types:
So, the first three cases return back exactly the same type they received, while the last case correctly removes the leading spaces from the input string, resulting in more precise types without being inaccurate.
The text was updated successfully, but these errors were encountered: