Skip to content

Bug: incorrect TS function types #104

Open
@taeh98

Description

@taeh98
  • 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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions