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

fix(typings): improve generator types #190

Merged
merged 1 commit into from
Oct 14, 2024
Merged

fix(typings): improve generator types #190

merged 1 commit into from
Oct 14, 2024

Conversation

rotu
Copy link
Contributor

@rotu rotu commented Oct 13, 2024

Previously, code like this would fail to typecheck:

import {Matrix} from "ml-matrix"
let x = [...Matrix.eye(5).values()]

Typescript would give the error:

Cannot iterate value because the 'next' method of its iterator expects type 'never', but array spread will always send 'undefined'.(2764)

Previously, code like this would fail to typecheck:
```ts
import {Matrix} from "ml-matrix"
let x = [...Matrix.eye(5).values()]
```
Typescript would give the error:
> Cannot iterate value because the 'next' method of its iterator expects type 'never', but array spread will always send 'undefined'.(2764)
@targos targos changed the title Fix generator types fix(typings): improve generator types Oct 14, 2024
@targos targos merged commit ee83c8b into mljs:main Oct 14, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants