Column type
I have this function to define the columns of a table.
how to define the type of these columns?
1 Reply
harsh-harlequinOP•2y ago
the shape of data:
and also how to defined the data of a table that is generic, and is used in multi places.
the error: Type 'TableData' is not assignable to type 'AttendaceRecord[]'.
Type 'StudentsTableData' is not assignable to type 'AttendaceRecord[]'.
Type 'StudentRecord' is not assignable to type 'AttendaceRecord'.
Property 'attendance_date' is missing in type 'StudentRecord' but required in type '{ id: number; attendance_date: string; }'.ts(2322)
types.d.ts(42, 3): 'attendance_date' is declared here.
table.d.ts(33, 5): The expected type comes from property 'data' which is declared here on type 'TableOptions<AttendaceRecord>'