Skip to content
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

Incorrect typescript definition for afterPageLoad helper #485

Open
IvanMisnik opened this issue Oct 7, 2022 · 2 comments
Open

Incorrect typescript definition for afterPageLoad helper #485

IvanMisnik opened this issue Oct 7, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@IvanMisnik
Copy link

From the documentation afterPageLoad helper accepts callback

(page) => void

as an argument
see: https://www.routify.dev/docs/helpers#after-page-load

but I see an error

Error: Argument of type '(page: ClientNodeApi) => void' is not assignable to parameter of type '(page?: ClientNodeApi) => boolean'.
  Type 'void' is not assignable to type 'boolean'. (ts)

version
Routify: 2.18.8
Svelte: 3.50.1

screenshot
image

@jakobrosenberg
Copy link
Member

Hi @ivmisnik . can I ask what you get if you console.log(page)?

It seems npm run build:typings might be able to fix this.

@IvanMisnik
Copy link
Author

yes, sure
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants