Skip to content
#

type-check

Here are 32 public repositories matching this topic...

xamgore
xamgore commented Dec 14, 2020

Let's dive into the source code:

https://github.com/sindresorhus/is/blob/d528545e02de3396ea900cd93af478292f0697ee/source/index.ts#L184

Only [Symbol.iterator] property is checked, meaning the value is at least Iterable<T>. It may be IterableIterator<T> if the presence of one more property, next, is ensured.

interface Iterable<T> {
    [Symbol.iterator](): Iterator<T>;
}

Improve this page

Add a description, image, and links to the type-check topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the type-check topic, visit your repo's landing page and select "manage topics."

Learn more