Unverified Commit 1c2b1713 authored by Jaime Rios's avatar Jaime Rios Committed by GitHub

Update data-fetching.md (#27018)

Improve typing for use with Typescript example

<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order to make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below.
Choose the right checklist for the change that you're making:

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [X] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [X] Make sure the linting passes
parent 5e6b9205
......@@ -185,9 +185,11 @@ You should use `getStaticProps` if:
For TypeScript, you can use the `GetStaticProps` type from `next`:
```ts
import { GetStaticProps } from 'next'
import { GetStaticProps, GetStaticPropsContext } from 'next'
export const getStaticProps: GetStaticProps = async (context) => {
export const getStaticProps: GetStaticProps = async (
context: GetStaticPropsContext
) => {
// ...
}
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment