diff options
| author | Haishan <[email protected]> | 2020-12-06 20:12:16 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2020-12-06 21:09:18 +0800 |
| commit | b0b0edab16c99ce9cef0bbb4cd10e05a3cb3ffd7 (patch) | |
| tree | f7b487afda73e507f7130b8057782d406ef71665 /src/custom.d.ts | |
| parent | d2b01d80fb8dae8e3400bb09038d3afbcbd55495 (diff) | |
build: upgrade deps
Diffstat (limited to 'src/custom.d.ts')
| -rw-r--r-- | src/custom.d.ts | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/custom.d.ts b/src/custom.d.ts index 3a9b7ac..9aa0b72 100644 --- a/src/custom.d.ts +++ b/src/custom.d.ts @@ -20,3 +20,47 @@ declare const process = { PUBLIC_URL: string, }, }; + +declare module 'react-table' { + interface TableOptions {} + + interface Empty {} + + interface SortByToggleProps {} + + interface Header { + getHeaderProps(p: SortByToggleProps): { role?: string }; + getSortByToggleProps(): SortByToggleProps; + render(x: string): string; + isSorted: boolean; + isSortedDesc: boolean; + } + + interface HeaderGroup { + getHeaderGroupProps(): { role?: string }; + headers: Header[]; + } + + interface Cell { + getCellProps(): { role?: string }; + + column: { id: string }; + value: number; + } + + interface Row { + cells: Cell[]; + } + + export function useTable( + options: TableOptions, + useSortBy: useSortBy + ): { + headerGroups: HeaderGroup[]; + getTableProps(): { role?: string }; + rows: Row[]; + prepareRow(r: Row): void; + }; + + export function useSortBy(): Empty; +} |
