Skip to content
This repository was archived by the owner on Feb 6, 2019. It is now read-only.
This repository was archived by the owner on Feb 6, 2019. It is now read-only.

Iterators #233

@JonKrone

Description

@JonKrone

Could thunks be turned into generators?

  • augment thunk middleware to notice and handle iterators
interface Iterator {
    next(value) : IteratorResult;
    [optional] throw(value) : IteratorResult;
    [optional] return(value) : IteratorResult;
}

interface IteratorResult {
    value : any;
    done : bool;
}
interface AsyncIterator {
    next(value) : Promise<IteratorResult>;
    [optional] throw(value) : Promise<IteratorResult>;
    [optional] return(value) : Promise<IteratorResult>;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions