From 347deb3cec8c23eb58531b0e25adfa6686a82099 Mon Sep 17 00:00:00 2001 From: Azir <2075125282@qq.com> Date: Tue, 13 Aug 2024 16:50:13 +0800 Subject: [PATCH] fix(types): fix the type of TableApiFn --- src/typings/api.d.ts | 3 +++ src/typings/naive-ui.d.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/typings/api.d.ts b/src/typings/api.d.ts index bb3d8757..9e88ca68 100644 --- a/src/typings/api.d.ts +++ b/src/typings/api.d.ts @@ -15,6 +15,9 @@ declare namespace Api { total: number; } + /** common search params of table */ + type CommonSearchParams = Pick; + /** common params of paginating query list data */ interface PaginatingQueryRecord extends PaginatingCommonParams { records: T[]; diff --git a/src/typings/naive-ui.d.ts b/src/typings/naive-ui.d.ts index b13d8d1f..1765fe46 100644 --- a/src/typings/naive-ui.d.ts +++ b/src/typings/naive-ui.d.ts @@ -26,7 +26,7 @@ declare namespace NaiveUI { type TableColumn = TableColumnWithKey | DataTableSelectionColumn | DataTableExpandColumn; - type TableApiFn = ( + type TableApiFn = ( params: R ) => Promise>>;