21 lines
447 B
TypeScript
21 lines
447 B
TypeScript
export type Row = Record<string, unknown>
|
|
|
|
export type ColumnConfig = {
|
|
key: string
|
|
label?: string
|
|
format?: (value: unknown, row: Row) => string
|
|
isSearchable?: boolean
|
|
type?: string
|
|
}
|
|
type HydraCollection<T> = {
|
|
'hydra:member': T[]
|
|
'hydra:totalItems': number
|
|
}
|
|
export type AnyCollection<T> = HydraCollection<T> & {
|
|
member?: T[]
|
|
items?: T[]
|
|
totalItems?: number
|
|
}
|
|
|
|
export type PaginationItem = number | '...'
|