Use Generator for events generator function return type
- Dominant language
- TypeScript
- Stars
- 211
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
I think the `Enumerator` on the following lines should be replaced by `Generator`, as [`events` is a generator function](https://github.com/esnet/pond/blob/v0.9.0/src/pond/lib/timeseries.js#L334-L348).
As far as I can tell, [`Enumerator` is for enumerating over a COM collection](https://github.com/microsoft/TypeScript/blob/63d0574321dd54ee8a274c44da3cbb51686c19d2/src/lib/scripthost.d.ts#L217-L243) 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
~~~~~~~~~~
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
~~~~~~~~~~
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;
~~~~~~~~~~
Found 3 errors.
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.