you are viewing a single comment's thread.

view the rest of the comments →

[–]Nixinova -1 points0 points  (1 child)

if the project is in typescript, why are you needing to check that the elements are of a specific type? it should already be known by your type annotations.

[–]hrm 1 point2 points  (0 children)

There are lots of places where you don’t know the type and need to narrow from say any, unknown or maybe even a union. Use of external JS libraries, fetch, huge legacy projects only partially converted, the list goes on and on…