esnet / pond

Immutable timeseries data structures built with Typescript
http://software.es.net/pond
Other
204 stars 38 forks source link

Use Generator for events generator function return type #271

Open axiom opened 2 years ago

axiom commented 2 years ago

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.

https://github.com/esnet/pond/blob/1a873b7a6a8b7bdc74e576b048beda3b06a4dc9f/src/index.d.ts#L1105-L1108

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.