mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
Update value types
This commit is contained in:
parent
bd6f52cbae
commit
69de338796
4 changed files with 15 additions and 15 deletions
|
@ -934,7 +934,7 @@ export type DataTableValue = any;
|
||||||
export interface DataTableEmptyHeader<Row = DataTableRow> {
|
export interface DataTableEmptyHeader<Row = DataTableRow> {
|
||||||
key: DataTableKey<Row> | (string & {});
|
key: DataTableKey<Row> | (string & {});
|
||||||
empty: boolean;
|
empty: boolean;
|
||||||
display?: (item: Value, row: Row) => DataTableValue;
|
display?: (item: DataTableValue, row: Row) => DataTableValue;
|
||||||
sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
|
sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
|
||||||
columnMenu?: boolean;
|
columnMenu?: boolean;
|
||||||
width?: string;
|
width?: string;
|
||||||
|
@ -944,7 +944,7 @@ export interface DataTableEmptyHeader<Row = DataTableRow> {
|
||||||
export interface DataTableNonEmptyHeader<Row = DataTableRow> {
|
export interface DataTableNonEmptyHeader<Row = DataTableRow> {
|
||||||
key: DataTableKey<Row>;
|
key: DataTableKey<Row>;
|
||||||
value: DataTableValue;
|
value: DataTableValue;
|
||||||
display?: (item: Value, row: Row) => DataTableValue;
|
display?: (item: DataTableValue, row: Row) => DataTableValue;
|
||||||
sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
|
sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
|
||||||
columnMenu?: boolean;
|
columnMenu?: boolean;
|
||||||
width?: string;
|
width?: string;
|
||||||
|
@ -965,7 +965,7 @@ export type DataTableRowId = any;
|
||||||
export interface DataTableCell<Row = DataTableRow> {
|
export interface DataTableCell<Row = DataTableRow> {
|
||||||
key: DataTableKey<Row> | (string & {});
|
key: DataTableKey<Row> | (string & {});
|
||||||
value: DataTableValue;
|
value: DataTableValue;
|
||||||
display?: (item: Value, row: DataTableRow) => DataTableValue;
|
display?: (item: DataTableValue, row: DataTableRow) => DataTableValue;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -2726,14 +2726,14 @@
|
||||||
"ts": "type DataTableValue = any"
|
"ts": "type DataTableValue = any"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "{\n key: DataTableKey<Row> | (string & {});\n empty: boolean;\n display?: (item: Value, row: Row) => DataTableValue;\n sort?: false | ((a: DataTableValue, b: DataTableValue) => number);\n columnMenu?: boolean;\n width?: string;\n minWidth?: string;\n}",
|
"type": "{\n key: DataTableKey<Row> | (string & {});\n empty: boolean;\n display?: (item: DataTableValue, row: Row) => DataTableValue;\n sort?: false | ((a: DataTableValue, b: DataTableValue) => number);\n columnMenu?: boolean;\n width?: string;\n minWidth?: string;\n}",
|
||||||
"name": "DataTableEmptyHeader<Row=DataTableRow>",
|
"name": "DataTableEmptyHeader<Row=DataTableRow>",
|
||||||
"ts": "interface DataTableEmptyHeader<Row=DataTableRow> {\n key: DataTableKey<Row> | (string & {});\n empty: boolean;\n display?: (item: Value, row: Row) => DataTableValue;\n sort?: false | ((a: DataTableValue, b: DataTableValue) => number);\n columnMenu?: boolean;\n width?: string;\n minWidth?: string;\n}"
|
"ts": "interface DataTableEmptyHeader<Row=DataTableRow> {\n key: DataTableKey<Row> | (string & {});\n empty: boolean;\n display?: (item: DataTableValue, row: Row) => DataTableValue;\n sort?: false | ((a: DataTableValue, b: DataTableValue) => number);\n columnMenu?: boolean;\n width?: string;\n minWidth?: string;\n}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "{\n key: DataTableKey<Row>;\n value: DataTableValue;\n display?: (item: Value, row: Row) => DataTableValue;\n sort?: false | ((a: DataTableValue, b: DataTableValue) => number);\n columnMenu?: boolean;\n width?: string;\n minWidth?: string;\n}",
|
"type": "{\n key: DataTableKey<Row>;\n value: DataTableValue;\n display?: (item: DataTableValue, row: Row) => DataTableValue;\n sort?: false | ((a: DataTableValue, b: DataTableValue) => number);\n columnMenu?: boolean;\n width?: string;\n minWidth?: string;\n}",
|
||||||
"name": "DataTableNonEmptyHeader<Row=DataTableRow>",
|
"name": "DataTableNonEmptyHeader<Row=DataTableRow>",
|
||||||
"ts": "interface DataTableNonEmptyHeader<Row=DataTableRow> {\n key: DataTableKey<Row>;\n value: DataTableValue;\n display?: (item: Value, row: Row) => DataTableValue;\n sort?: false | ((a: DataTableValue, b: DataTableValue) => number);\n columnMenu?: boolean;\n width?: string;\n minWidth?: string;\n}"
|
"ts": "interface DataTableNonEmptyHeader<Row=DataTableRow> {\n key: DataTableKey<Row>;\n value: DataTableValue;\n display?: (item: DataTableValue, row: Row) => DataTableValue;\n sort?: false | ((a: DataTableValue, b: DataTableValue) => number);\n columnMenu?: boolean;\n width?: string;\n minWidth?: string;\n}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "DataTableNonEmptyHeader<Row> | DataTableEmptyHeader<Row>",
|
"type": "DataTableNonEmptyHeader<Row> | DataTableEmptyHeader<Row>",
|
||||||
|
@ -2751,9 +2751,9 @@
|
||||||
"ts": "type DataTableRowId = any"
|
"ts": "type DataTableRowId = any"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "{\n key: DataTableKey<Row> | (string & {});\n value: DataTableValue;\n display?: (item: Value, row: DataTableRow) => DataTableValue;\n}",
|
"type": "{\n key: DataTableKey<Row> | (string & {});\n value: DataTableValue;\n display?: (item: DataTableValue, row: DataTableRow) => DataTableValue;\n}",
|
||||||
"name": "DataTableCell<Row=DataTableRow>",
|
"name": "DataTableCell<Row=DataTableRow>",
|
||||||
"ts": "interface DataTableCell<Row=DataTableRow> {\n key: DataTableKey<Row> | (string & {});\n value: DataTableValue;\n display?: (item: Value, row: DataTableRow) => DataTableValue;\n}"
|
"ts": "interface DataTableCell<Row=DataTableRow> {\n key: DataTableKey<Row> | (string & {});\n value: DataTableValue;\n display?: (item: DataTableValue, row: DataTableRow) => DataTableValue;\n}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"generics": ["Row", "Row extends DataTableRow = DataTableRow"],
|
"generics": ["Row", "Row extends DataTableRow = DataTableRow"],
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* @typedef {{
|
* @typedef {{
|
||||||
* key: DataTableKey<Row> | (string & {});
|
* key: DataTableKey<Row> | (string & {});
|
||||||
* empty: boolean;
|
* empty: boolean;
|
||||||
* display?: (item: Value, row: Row) => DataTableValue;
|
* display?: (item: DataTableValue, row: Row) => DataTableValue;
|
||||||
* sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
|
* sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
|
||||||
* columnMenu?: boolean;
|
* columnMenu?: boolean;
|
||||||
* width?: string;
|
* width?: string;
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
* @typedef {{
|
* @typedef {{
|
||||||
* key: DataTableKey<Row>;
|
* key: DataTableKey<Row>;
|
||||||
* value: DataTableValue;
|
* value: DataTableValue;
|
||||||
* display?: (item: Value, row: Row) => DataTableValue;
|
* display?: (item: DataTableValue, row: Row) => DataTableValue;
|
||||||
* sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
|
* sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
|
||||||
* columnMenu?: boolean;
|
* columnMenu?: boolean;
|
||||||
* width?: string;
|
* width?: string;
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
* @typedef {{
|
* @typedef {{
|
||||||
* key: DataTableKey<Row> | (string & {});
|
* key: DataTableKey<Row> | (string & {});
|
||||||
* value: DataTableValue;
|
* value: DataTableValue;
|
||||||
* display?: (item: Value, row: DataTableRow) => DataTableValue;
|
* display?: (item: DataTableValue, row: DataTableRow) => DataTableValue;
|
||||||
* }} DataTableCell<Row=DataTableRow>
|
* }} DataTableCell<Row=DataTableRow>
|
||||||
* @slot {{ row: Row; }} expanded-row
|
* @slot {{ row: Row; }} expanded-row
|
||||||
* @slot {{ header: DataTableNonEmptyHeader; }} cell-header
|
* @slot {{ header: DataTableNonEmptyHeader; }} cell-header
|
||||||
|
|
6
types/DataTable/DataTable.svelte.d.ts
vendored
6
types/DataTable/DataTable.svelte.d.ts
vendored
|
@ -9,7 +9,7 @@ export type DataTableValue = any;
|
||||||
export interface DataTableEmptyHeader<Row = DataTableRow> {
|
export interface DataTableEmptyHeader<Row = DataTableRow> {
|
||||||
key: DataTableKey<Row> | (string & {});
|
key: DataTableKey<Row> | (string & {});
|
||||||
empty: boolean;
|
empty: boolean;
|
||||||
display?: (item: Value, row: Row) => DataTableValue;
|
display?: (item: DataTableValue, row: Row) => DataTableValue;
|
||||||
sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
|
sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
|
||||||
columnMenu?: boolean;
|
columnMenu?: boolean;
|
||||||
width?: string;
|
width?: string;
|
||||||
|
@ -19,7 +19,7 @@ export interface DataTableEmptyHeader<Row = DataTableRow> {
|
||||||
export interface DataTableNonEmptyHeader<Row = DataTableRow> {
|
export interface DataTableNonEmptyHeader<Row = DataTableRow> {
|
||||||
key: DataTableKey<Row>;
|
key: DataTableKey<Row>;
|
||||||
value: DataTableValue;
|
value: DataTableValue;
|
||||||
display?: (item: Value, row: Row) => DataTableValue;
|
display?: (item: DataTableValue, row: Row) => DataTableValue;
|
||||||
sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
|
sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
|
||||||
columnMenu?: boolean;
|
columnMenu?: boolean;
|
||||||
width?: string;
|
width?: string;
|
||||||
|
@ -40,7 +40,7 @@ export type DataTableRowId = any;
|
||||||
export interface DataTableCell<Row = DataTableRow> {
|
export interface DataTableCell<Row = DataTableRow> {
|
||||||
key: DataTableKey<Row> | (string & {});
|
key: DataTableKey<Row> | (string & {});
|
||||||
value: DataTableValue;
|
value: DataTableValue;
|
||||||
display?: (item: Value, row: DataTableRow) => DataTableValue;
|
display?: (item: DataTableValue, row: DataTableRow) => DataTableValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
type $RestProps = SvelteHTMLElements["div"];
|
type $RestProps = SvelteHTMLElements["div"];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue