declare namespace AntDesign { type TableColumnType = import('ant-design-vue').TableColumnType; type TableColumnGroupType = import('ant-design-vue').TableColumnGroupType; type TablePaginationConfig = import('ant-design-vue').TablePaginationConfig; type TableColumnCheck = import('@sa/hooks').TableColumnCheck; type TableDataWithIndex = import('@sa/hooks').TableDataWithIndex; type FlatResponseData = import('@sa/axios').FlatResponseData; type TableData = Api.Common.CommonRecord; /** * the custom column key * * if you want to add a custom column, you should add a key to this type */ type CustomColumnKey = 'operate'; type SetTableColumnKey = Omit & { key?: keyof T | CustomColumnKey }; type TableColumn = SetTableColumnKey, T> | SetTableColumnKey, T>; type TableApiFn = ( params: R ) => Promise>>; /** * the type of table operation * * - add: add table item * - edit: edit table item */ type TableOperateType = 'add' | 'edit'; type GetTableData = A extends TableApiFn ? T : never; type AntDesignTableConfig = Pick< import('@sa/hooks').TableConfig, TableColumn>>>, 'apiFn' | 'apiParams' | 'columns' | 'immediate' | 'rowKey' >; }