downshift-js/downshift
TypeScript: have items and selectedItems as Readonly
Offen
#1.030 geöffnet am 30.04.2020
TypeScripthelp wanted
Repository-Metriken
- Stars
- (11.761 Sterne)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
downshiftversion:nodeversion:npm(oryarn) version:
Relevant code or config
What you did:
What happened:
Reproduction repository:
Problem description: Since we use items/selectedItems just for some logic and we do not tamper with them, we can mark them as read only in the TS interface.
Suggested solution: In typings.ts for useSelect, useCombobox and useMultipleSelection, use Readonly to wrap the items type.