Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Generator for events generator function return type #271

Open
axiom opened this issue Jun 29, 2022 · 0 comments
Open

Use Generator for events generator function return type #271

axiom opened this issue Jun 29, 2022 · 0 comments

Comments

@axiom
Copy link

axiom commented Jun 29, 2022

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/[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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant