Skip to content

Commit 92610b7

Browse files
piehLekoArts
andauthored
docs: specify gatsby versions supporting particular TS features (#34945)
Co-authored-by: Lennart <[email protected]>
1 parent 929673d commit 92610b7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/docs/how-to/custom-configuration/typescript.md

+8
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ export const query = graphql`
8585

8686
### `gatsby-browser.tsx` / `gatsby-ssr.tsx`
8787

88+
> Support added in `[email protected]`
89+
8890
You can also write `gatsby-browser` and `gatsby-ssr` in TypeScript. You have the types `GatsbyBrowser` and `GatsbySSR` available to type your API functions. Here are two examples:
8991

9092
```tsx:title=gatsby-browser.tsx
@@ -155,6 +157,8 @@ const getServerData: GetServerData<ServerDataProps> = async props => {
155157

156158
### `gatsby-config.ts`
157159

160+
> Support added in `[email protected]`
161+
158162
You can import the type `GatsbyConfig` to type your config object. **Please note:** There are currently no type hints for `plugins` and you'll need to check the [current limitations](#current-limitations) and see if they apply to your `gatsby-config` file.
159163

160164
```ts:title=gatsby-config.ts
@@ -172,6 +176,8 @@ export default config
172176

173177
### `gatsby-node.ts`
174178

179+
> Support added in `[email protected]`
180+
175181
You can import the type `GatsbyNode` to type your APIs by accessing keys on `GatsbyNode`, e.g. `GatsbyNode["sourceNodes"]`. **Please note:** You'll need to check the [current limitations](#current-limitations) and see if they apply to your `gatsby-node` file.
176182

177183
```ts:title=gatsby-node.ts
@@ -211,6 +217,8 @@ export const sourceNodes: GatsbyNode["sourceNodes"] = async ({
211217

212218
### Local Plugins
213219

220+
> Support added in `[email protected]`
221+
214222
All the files mentioned above can also be written and used inside a [local plugin](/docs/creating-a-local-plugin/).
215223

216224
## `tsconfig.json`

0 commit comments

Comments
 (0)