Skip to content

Commit 289e2b6

Browse files
y4anivr1tsuu
andauthored
docs: change import to use type import for GlobalConfig (#11578)
### What? Updated the import statement for `buildConfig` from `import { buildConfig } from 'payload'` to `import type { buildConfig } from 'payload'` to properly handle TypeScript types. ### Why? This change ensures that TypeScript properly treats `buildConfig` as a type rather than a runtime import, following project conventions and ensuring consistency with the rest of the documentation and code. --------- Co-authored-by: Sasha Rakhmatulin <sasha@ritsuko.dev>
1 parent e34cbc3 commit 289e2b6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/configuration/globals.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ It's often best practice to write your Globals in separate files and then import
3636
Here is what a simple Global Config might look like:
3737

3838
```ts
39-
import { GlobalConfig } from 'payload'
39+
import type { GlobalConfig } from 'payload'
4040

4141
export const Nav: GlobalConfig = {
4242
slug: 'nav',
@@ -107,7 +107,7 @@ The behavior of Globals within the [Admin Panel](../admin/overview) can be fully
107107
To configure Admin Options for Globals, use the `admin` property in your Global Config:
108108

109109
```ts
110-
import { GlobalConfig } from 'payload'
110+
import type { GlobalConfig } from 'payload'
111111

112112
export const MyGlobal: GlobalConfig = {
113113
// ...

0 commit comments

Comments
 (0)