Closed ahmaddynugroho closed 2 years ago
i just removed the Option handling and change A.tail
to A.tailOrEmpty
and the code runs fine and no warning. So, i propose that the docs should use A.tailOrEmpty
because it returns Array<A>
instead of Option<Array<A>>
@ahmaddynugroho thanks, good catch! 👀 (fixed)
Link: https://mobily.github.io/ts-belt/api/array node: v18.2.0 typescript: 4.7.3 tsserver: 0.11.1 tsconfig.json: i follow this https://mobily.github.io/ts-belt/docs/getting-started/config
I just tried the code from the array doc and it gives a warning like this:
the code runs fine, but the warning annoys me. So i removed the warning by handling the
Option
usingmatch
:question: is it some secret
pipe
behavior that handlesOption
orA.take
type is not complete or the doc needs an update?thank you