downshift-js / downshift

🏎 A set of primitives to build simple, flexible, WAI-ARIA compliant React autocomplete, combobox or select dropdown components.
http://downshift-js.com/
MIT License
12.06k stars 929 forks source link

Errors in `typings/index.d.ts` #1590

Closed akheron closed 6 months ago

akheron commented 6 months ago

Relevant code or config

typings/index.d.ts

What you did:

Updated downshift to v9.0.1

What happened:

It didn't pass typescript type checking.

Reproduction repository:

Problem description:

Two lines in typings/index.d.ts are invalid and don't pass Typescript's typecheck. There's no type index.

https://github.com/downshift-js/downshift/blob/5b0d5031c1c11455ba18fa1516a259b4ed9357a1/typings/index.d.ts#L618 https://github.com/downshift-js/downshift/blob/5b0d5031c1c11455ba18fa1516a259b4ed9357a1/typings/index.d.ts#L618

Suggested solution:

Change index to number or whatever is the correct type here.