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

Type of params should be iterable not Record - pt 2 #2053

Closed
tevanburen opened this issue Feb 12, 2025 · 0 comments
Closed

Type of params should be iterable not Record - pt 2 #2053

tevanburen opened this issue Feb 12, 2025 · 0 comments

Comments

@tevanburen
Copy link

#2026 noted a change in 6b3e3cb that starting throwing Type errors. #2026 was closed yesterday by 8fb3738 - but it looks like one of the mistakes in 6b3e3cb was unaddressed by 8fb3738. Line 149 of the type declaration still marks params as a record, so we're still dealing with Type errors.

If it's helpful to any others, my workaround is:

import alasql, { Database as DatabaseFunction } from "alasql";
type Database = Omit<InstanceType<typeof DatabaseFunction>, "exec"> & {
  exec: <T>(str: string, args?: unknown[]) => Readonly<T[]>;
};
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