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

Documentation - $afterPageLoad (callback) requires a return value of boolean, but doc does not state so #245

Open
Tommertom opened this issue Jun 7, 2022 · 0 comments

Comments

@Tommertom
Copy link

Tommertom commented Jun 7, 2022

When you enable typescript, the linter complains that afterPageLoad function cannot return void. So you have to add a return true (or false?) in the function.

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(2345)

See helper documentation

Other typescript issue ( getDirection (path1, path2)):

$: lastRoute = $route.last

$route is of type never, so typescript won't eat this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant