Skip to content

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.

@mckelveygreg mckelveygreg requested a review from LekoArts March 11, 2022 18:37
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