downshift-js / downshift-js/downshift
TypeScript: have items and selectedItems as Readonly
Open
help wanted
TypeScript
- Dominant language
- JavaScript
- Stars
- 12.3k
- Forks
- 936
- PR merge metrics
- No merged PRs in 30d
Description
- `downshift` version:
- `node` version:
- `npm` (or `yarn`) version:
**Relevant code or config**
```javascript
```
**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.
Contributor guide
Assessment
This issue has not been assessed yet.