Type alias IsomorphicIterableItem<SourceIterable>

IsomorphicIterableItem<SourceIterable>: SourceIterable extends IsomorphicIterable<infer Item>
    ? Item
    : never

Type of the items of an IsomorphicIterable.

Remarks

Sometimes we have to get the item type out of an IsomorphicIterable. This type is meant to be used where inference is not an option.

Example

const iterable: IsomorphicIterable<number> = [1, 2, 3];
const item: IsomorphicIterableItem<typeof iterable> = 1;

See

IsomorphicIterable

Type Parameters

  • SourceIterable extends IsomorphicIterable

    IsomorphicIterable type to get the item type from.`