(TypeScript) Type definitions are incomplete for sortable tables.
Describe the bug (required)
Some type definitions are incomplete -- in the column for example.
Property 'getSortByToggleProps' does not exist on type 'HeaderGroup<object>'.ts(2339)
Property 'isSorted' does not exist on type 'HeaderGroup<object>'.ts(2339)
Property 'isSortedDesc' does not exist on type 'HeaderGroup<object>'.ts(2339)
Provide an example via Codesandbox! (required) https://codesandbox.io/s/react-table-incomplete-types-x1es6
Steps To Reproduce (required)
Try to use useSortBy on react-table and consume the getSortByToggleProps function or isSorted and isSortedDesc properties on a TypeScript project.
Expected behavior (Recommended) The types shouldn't error
Screenshots

This bug was reported without any information before and noticed they were also using TypeScript so I could only figure it was TypeScript specific. https://github.com/tannerlinsley/react-table/issues/1481
This issue is being marked as stale (no activity in the last 14 days)
This issue has been detected as stale and automatically closed. It's very likely that your issue has remained here this long because it would require breaking changes to v7. React Table v8 is currently in alpha (soon beta!) and already contains bug fixes, performance improvements and architectural changes that likely address this issue.
- If your v7 issue has been previously labeled as requiring breaking changes, please try the new v8 alpha/beta releases
- If your v7 issue has not already been labeled as a breaking change, open a new issue.
- If this was a v8 issue and was closed by mistake, please reopen or leave a comment below.
https://codesandbox.io/s/react-table-incomplete-types-forked-0hdd1
@samyan The sandbox link seems to be not working. I am facing the same issue with ts. After creating a type defination file also I am getting the below error
Parameter 'headerGroup' implicitly has an 'any' type.ts(7006)Updated:
https://codesandbox.io/s/react-table-incomplete-types-fixed-2r4us
@samyan Hi Bro, this codesandbox link is not working, can you post your code again pls?
https://codesandbox.io/s/react-table-incomplete-types-forked-0hdd1
@samyan The sandbox link seems to be not working. I am facing the same issue with ts. After creating a type defination file also I am getting the below error
Parameter 'headerGroup' implicitly has an 'any' type.ts(7006)Updated: https://codesandbox.io/s/react-table-incomplete-types-fixed-2r4us
@samyan Hi Bro, this codesandbox link is not working, can you post your code again pls?
Link restored. Check again pls.
https://codesandbox.io/s/react-table-incomplete-types-forked-0hdd1
@samyan The sandbox link seems to be not working. I am facing the same issue with ts. After creating a type defination file also I am getting the below error
Parameter 'headerGroup' implicitly has an 'any' type.ts(7006)Updated: https://codesandbox.io/s/react-table-incomplete-types-fixed-2r4us
@samyan Hi Bro, this codesandbox link is not working, can you post your code again pls?
Link restored. Check again pls.
Thx dude.
I had a similar issue with another plugin. The solution i got, was creating folder called types in /src directory and then creating a file called react-table-config.d.ts. Then put the definitions that you can find in: types/react-table.
Now you can check:
Example: https://codesandbox.io/s/react-table-incomplete-types-fixed-2r4us
Regards.
thank you for your method, it was helpful me :))) how did you figure out it ???
I had a similar issue with another plugin. The solution i got, was creating folder called types in /src directory and then creating a file called react-table-config.d.ts. Then put the definitions that you can find in: types/react-table. Now you can check:
Example: https://codesandbox.io/s/react-table-incomplete-types-fixed-2r4us Regards.
thank you for your method, it was helpful me :))) how did you figure out it ???
Going from javascript to typescript, the rest is experience.
Regards.
I had a similar issue with another plugin. The solution i got, was creating folder called types in /src directory and then creating a file called react-table-config.d.ts. Then put the definitions that you can find in: types/react-table. Now you can check:
Example: https://codesandbox.io/s/react-table-incomplete-types-fixed-2r4us Regards.
thank you for your method, it was helpful me :))) how did you figure out it ???
Going from javascript to typescript, the rest is experience.
Regards.
You know, that it was only viewer issue, because runtime all code is work !
I had a similar issue with another plugin. The solution i got, was creating folder called types in /src directory and then creating a file called react-table-config.d.ts. Then put the definitions that you can find in: types/react-table. Now you can check:
Example: https://codesandbox.io/s/react-table-incomplete-types-fixed-2r4us Regards.
thank you for your method, it was helpful me :))) how did you figure out it ???
Going from javascript to typescript, the rest is experience. Regards.
You know, that it was only viewer issue, because runtime all code is work !
Yes, It's right. It simply helps you to know the methods that the library itself has, in addition to visually making the code more elegant.
