Skip to content

Use Generator for events generator function return type #271

@axiom

Description

@axiom

I think the Enumerator on the following lines should be replaced by Generator, as events is a generator function.

As far as I can tell, Enumerator is for enumerating over a COM collection for Windows Script Host APIS.

pond/src/index.d.ts

Lines 1105 to 1108 in 1a873b7

events():
| Enumerator<Event>
| Enumerator<TimeRangeEvent>
| Enumerator<IndexedEvent>;

TypeScript (4.7.4) output for a project using pondjs:

node_modules/.pnpm/pondjs@0.9.0/node_modules/pondjs/src/index.d.ts:1106:15 - error TS2552: Cannot find name 'Enumerator'. Did you me
an 'Generator'?

1106             | Enumerator<Event>
                   ~~~~~~~~~~

node_modules/.pnpm/pondjs@0.9.0/node_modules/pondjs/src/index.d.ts:1107:15 - error TS2552: Cannot find name 'Enumerator'. Did you me
an 'Generator'?

1107             | Enumerator<TimeRangeEvent>
                   ~~~~~~~~~~

node_modules/.pnpm/pondjs@0.9.0/node_modules/pondjs/src/index.d.ts:1108:15 - error TS2552: Cannot find name 'Enumerator'. Did you me
an 'Generator'?

1108             | Enumerator<IndexedEvent>;
                   ~~~~~~~~~~


Found 3 errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions