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

fix(types): navigate doesn't return anything #38590

Merged
merged 1 commit into from
Jan 3, 2024
Merged

Conversation

RJWadley
Copy link
Contributor

@RJWadley RJWadley commented Sep 29, 2023

Description

Gatsby's navigate() function uses @reach/router's navigate() function, but the latter returns a Promise, while the former does not. This PR updates the type of the gatsby's navigate() function to accurately reflect this.

Documentation

The documentation is already correct:
https://www.gatsbyjs.org/docs/gatsby-link/#how-to-use-the-navigate-helper-function
https://reach.tech/router/api/navigate

Related Issues

fixes #22151 (which has gone stale)
related to issue #25123
related to pull request #24214

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Sep 29, 2023
@pieh pieh added topic: TypeScript Issues and PRs related to TS in general, public typings or gatsby-plugin-typescript and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jan 3, 2024
@pieh pieh merged commit 6cb6ffb into gatsbyjs:master Jan 3, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: TypeScript Issues and PRs related to TS in general, public typings or gatsby-plugin-typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

navigate() does not return a Promise
2 participants