-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fullpage_api doesn't exist on window #404
Comments
Where are you trying to execute it? If you are inside the render function of the fullpage component you can use |
Can you try adding this on declare global {
interface Window {
fullpage_api:any;
}
} |
Did try this, |
It's with underscore: |
I'll be happy to merge a pull request if you think that's an option. Note however that the variable @cmswalker what are your thoughts on this? |
Hi Everyone, I am quite late to the game. @alvarotrigo I think the problem is, in a typescript world, you have to do one of two things which are both problematic from a developer standpoint:
So in my mind the simple solution is to export fullpage_api as a variable from within the library. This way developers do not need to know about the inner workings of fullpage.js and can just use the library (in typescript) the way they expect it. |
@denisdanielyan if that's possible, that sounds great! |
Description
I am using Next.js and typescript. When I try to access fullpage_api, it gives me following error:
'Property 'fullpage_api' does not exist on type 'Window & typeof globalThis'
Although it works when running locally, build fails.
Versions
Fullpage Version 0.1.36
The text was updated successfully, but these errors were encountered: