mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
breaking(types): type arrays as read-only (#1335)
Closes #1259 * breaking(types): type arrays as read-only * Run "yarn build:docs" * test: assert read-only arrays
This commit is contained in:
parent
1a904dda36
commit
260bf4e040
34 changed files with 257 additions and 192 deletions
12
types/DataTable/DataTable.svelte.d.ts
vendored
12
types/DataTable/DataTable.svelte.d.ts
vendored
|
@ -46,14 +46,14 @@ export interface DataTableProps
|
|||
* Specify the data table headers
|
||||
* @default []
|
||||
*/
|
||||
headers?: DataTableHeader[];
|
||||
headers?: ReadonlyArray<DataTableHeader>;
|
||||
|
||||
/**
|
||||
* Specify the rows the data table should render
|
||||
* keys defined in `headers` are used for the row ids
|
||||
* @default []
|
||||
*/
|
||||
rows?: DataTableRow[];
|
||||
rows?: ReadonlyArray<DataTableRow>;
|
||||
|
||||
/**
|
||||
* Set the size of the data table
|
||||
|
@ -102,13 +102,13 @@ export interface DataTableProps
|
|||
* Specify the row ids to be expanded
|
||||
* @default []
|
||||
*/
|
||||
expandedRowIds?: DataTableRowId[];
|
||||
expandedRowIds?: ReadonlyArray<DataTableRowId>;
|
||||
|
||||
/**
|
||||
* Specify the ids for rows that should not be expandable
|
||||
* @default []
|
||||
*/
|
||||
nonExpandableRowIds?: DataTableRowId[];
|
||||
nonExpandableRowIds?: ReadonlyArray<DataTableRowId>;
|
||||
|
||||
/**
|
||||
* Set to `true` for the radio selection variant
|
||||
|
@ -133,13 +133,13 @@ export interface DataTableProps
|
|||
* Specify the row ids to be selected
|
||||
* @default []
|
||||
*/
|
||||
selectedRowIds?: DataTableRowId[];
|
||||
selectedRowIds?: ReadonlyArray<DataTableRowId>;
|
||||
|
||||
/**
|
||||
* Specify the ids of rows that should not be selectable
|
||||
* @default []
|
||||
*/
|
||||
nonSelectableRowIds?: DataTableRowId[];
|
||||
nonSelectableRowIds?: ReadonlyArray<DataTableRowId>;
|
||||
|
||||
/**
|
||||
* Set to `true` to enable a sticky header
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue