Skip to content

When using cursor must the record be unknown? #166

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

Open
BlitzkriegSoftware opened this issue May 13, 2025 · 1 comment
Open

When using cursor must the record be unknown? #166

BlitzkriegSoftware opened this issue May 13, 2025 · 1 comment

Comments

@BlitzkriegSoftware
Copy link

In all the examples reading the file using the cursor yields records with unknown types, can't we have these be strongly typed as that is what was used to write the file? If so how?

@BlitzkriegSoftware
Copy link
Author

let record: Fruit;
while ((record = await cursor.next())) {
...
}

Error: "Type 'unknown' is not assignable to type 'Fruit'.ts(2322)"

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