Whether value is an array, narrowing a readonly T[] as such rather than to any[].
Array.isArray is declared as arg is any[], which a readonly T[] | Something union does not survive:
the array branch loses its element type and the other branch is not narrowed at all. This keeps both.
Whether
valueis an array, narrowing areadonly T[]as such rather than toany[].Array.isArrayis declared asarg is any[], which areadonly T[] | Somethingunion does not survive: the array branch loses its element type and the other branch is not narrowed at all. This keeps both.