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

chore(gatsby): add generic to GatsbyFunctionRequest #35029

Merged
merged 6 commits into from
Mar 14, 2022
Merged

chore(gatsby): add generic to GatsbyFunctionRequest #35029

merged 6 commits into from
Mar 14, 2022

Conversation

mckelveygreg
Copy link
Contributor

Description

Adds a generic to GatsbyFunctionRequest for the body to help more strict typescript usage easier.
The generic defaults to unknown and is also a partial of whatever is passed in to ensure that nothing explodes.

Documentation

Related Issues

Address discussion #33953

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 2, 2022
@imjoshin imjoshin changed the title add generic to GatsbyFunctionRequest chore(gatsby): add generic to GatsbyFunctionRequest Mar 3, 2022
@imjoshin imjoshin added topic: DX Developer Experience (e.g. Fast Refresh, i18n, SSR, page creation, starters) 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 Mar 3, 2022
Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

packages/gatsby/index.d.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@LekoArts LekoArts merged commit bf8392c into gatsbyjs:master Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: DX Developer Experience (e.g. Fast Refresh, i18n, SSR, page creation, starters) 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.

3 participants