Skip to content

Commit

Permalink
Change loosened type to string * {}
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Aug 23, 2024
1 parent e3f4128 commit 7af6488
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion COMPONENT_INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ export type DataTableKey<Row = DataTableRow> =
export type DataTableValue = any;

export interface DataTableEmptyHeader<Row = DataTableRow> {
key: DataTableKey<Row> | string;
key: DataTableKey<Row> | (string & {});
empty: boolean;
display?: (item: Value, row: Row) => DataTableValue;
sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
Expand Down
4 changes: 2 additions & 2 deletions docs/src/COMPONENT_API.json
Original file line number Diff line number Diff line change
Expand Up @@ -2722,9 +2722,9 @@
"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: Value, 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>",
"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: 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: Value, row: Row) => DataTableValue;\n sort?: false | ((a: DataTableValue, b: DataTableValue) => number);\n columnMenu?: boolean;\n width?: string;\n minWidth?: string;\n}",
Expand Down
2 changes: 1 addition & 1 deletion src/DataTable/DataTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @typedef {import('./DataTableTypes.d.ts').PropertyPath<Row>} DataTableKey<Row=DataTableRow>
* @typedef {any} DataTableValue
* @typedef {{
* key: DataTableKey<Row> | string;
* key: DataTableKey<Row> | (string & {});
* empty: boolean;
* display?: (item: Value, row: Row) => DataTableValue;
* sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
Expand Down
2 changes: 1 addition & 1 deletion types/DataTable/DataTable.svelte.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type DataTableKey<Row = DataTableRow> =
export type DataTableValue = any;

export interface DataTableEmptyHeader<Row = DataTableRow> {
key: DataTableKey<Row> | string;
key: DataTableKey<Row> | (string & {});
empty: boolean;
display?: (item: Value, row: Row) => DataTableValue;
sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
Expand Down

0 comments on commit 7af6488

Please sign in to comment.