pond
pond copied to clipboard
Use Generator for events generator function return type
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/[email protected]/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/[email protected]/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/[email protected]/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.