Closed Cambrai2 closed 1 year ago
Furthermore, imporing {DemoData} from 'react-big-schedule' throws an error.
However, this can be solved by adding:
export const DemoData: SchedulerData;
to the react-big-schedule > dist > index.d.ts file
Sorry I have not tried with typescript will try it. If you can fix it and raised the pr it would be very much helpful for us. Thanks in advance
I will do so as soon as I can!
heads up, this will be my first pr, so if i make any mistakes please let me know!
Don't worry about that and thanks in advance
Checklist
Describe the bug
When importing the modules in a typescript / nextjs environment, there is an error with importing Scheduler. When imported as the Default import (i.e) outside the bracket, we get this error when running the app:
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
However if its imported as a named export we dont get an app error, but we get a TS error:
Module '"react-big-schedule"' has no exported member 'Scheduler'.
We work within a strict TS environent so any help would be greatly appreciated!
Reproduction Link/Code
https://github.com/Cambrai2/react-big-schedule
Steps to reproduce
reproduceable by running:
npm create t3-app@latest
and importing the react-big-schedule and trying to use.
Operating System
Linux
Browser
Chrome
React version
18.2.0
react-big-schedule version
^4.3.2
Additional Information
No response