Skip to content

Commit

Permalink
fix(types): fix the type of TableApiFn (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
Azir-11 committed Aug 14, 2024
1 parent 5094f0e commit 26c93df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/typings/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ declare namespace Api {
records: T[];
}

/** common search params of table */
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'current' | 'size'>;

/**
* enable status
*
Expand Down
2 changes: 1 addition & 1 deletion src/typings/naive-ui.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ declare namespace NaiveUI {

type TableColumn<T> = TableColumnWithKey<T> | DataTableSelectionColumn<T> | DataTableExpandColumn<T>;

type TableApiFn<T = any, R = Api.SystemManage.CommonSearchParams> = (
type TableApiFn<T = any, R = Api.Common.CommonSearchParams> = (
params: R
) => Promise<FlatResponseData<Api.Common.PaginatingQueryRecord<T>>>;

Expand Down

0 comments on commit 26c93df

Please sign in to comment.