The error message for props is not that it's missing the required columns property but that it's missing properties from PaginationProps, which in actuality allows for the properties to be omitted.
Type '{ data: never[]; }' is not assignable to type 'Props<Person, { fullName: string; age: number; }>'.
Type '{ data: never[]; }' is not assignable to type '{ paginate: true; currentPage: number; totalPages: number; onChangePage: (page: number) => Promise<unknown>; } & { data: Person[]; columns: DataGridColumns<Person, { fullName: string; age: number; }>; }'.
Type '{ data: never[]; }' is missing the following properties from type '{ paginate: true; currentPage: number; totalPages: number; onChangePage: (page: number) => Promise<unknown>; }': paginate, currentPage, totalPages, onChangePage
π Expected behavior
I should be told that I'm missing the columns property. In actuality this type is even more complex, and the bad error message makes it difficult to know which properties are actually missing without looking at the source code. Something like this would be more correct:
Type '{ data: never[]; }' is imissing the following properties from type 'Props': columns
The text was updated successfully, but these errors were encountered:
apoco commentedJun 2, 2022
•
edited
Bug Report
Playground link with relevant code
The error message for
propsis not that it's missing the requiredcolumnsproperty but that it's missing properties fromPaginationProps, which in actuality allows for the properties to be omitted.I should be told that I'm missing the
columnsproperty. In actuality this type is even more complex, and the bad error message makes it difficult to know which properties are actually missing without looking at the source code. Something like this would be more correct:The text was updated successfully, but these errors were encountered: