ClickHouse / ClickHouse/click-ui

Accept Readonly* arguments

Open
#307 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
135
Forks
33
Avg merge
2d 13h
Merged PRs (30d)
19

Description

I often use readonly types in the app to ensure immutable data. I have a hard time passing a read-only argument to a Click-Ui component since an immutable type is a subset of a mutable one. I'd suggest refactoring public interfaces to accept readonly types (for example, ReadonlyArray) instead of mutable ones. For example, in `Select`
https://github.com/ClickHouse/click-ui/blob/9ab8c429a75024e2c18c5a371f174e75800e485b/src/components/Select/MultiSelect.tsx#L11-L13

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.