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

Bug: incorrect TS function types #104

Open
taeh98 opened this issue Oct 27, 2023 · 0 comments
Open

Bug: incorrect TS function types #104

taeh98 opened this issue Oct 27, 2023 · 0 comments

Comments

@taeh98
Copy link
Contributor

taeh98 commented Oct 27, 2023

  • The types of the functions in index.d.ts are wrong
  • None of them provide any types, and look like (...args: unknown[]): unknown;
  • This is unhelpful since the types of arguments and return types aren't defined, so doesn't help enforce strict typing or tell library users which types to provide in arguments to functions or expect to return from them
  • For example, onChange is defined as: onChange?(...args: unknown[]): unknown;
  • onChange should be defined as: onChange?: (newValue: string | number | undefined) => void;
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