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
But at runtime, our check makes sure it's not a function:
exportconstisArrayLike=(<T>(x: any): x is ArrayLike<T>=>x&&typeofx.length==='number'&&typeofx!=='function');
This, combined with the fact that any "array-like" I know of has implemented Symbol.iterator now, means that this type is mostly worthless. I doubt many people are like:
Activity
benlesh commentedon Feb 9, 2021
Okay, this gets weirder and weirder... in TS 4.1.3:
I'm not totally sure what to make of that... playground here
cartant commentedon Feb 9, 2021
Related TS issue: microsoft/TypeScript#18757
benlesh commentedon Feb 10, 2021
We probably shouldn't do this for now... this PR in TypeScript is of interest: microsoft/TypeScript#41660