Skip to content

globalConfigToInterface

globalConfigToInterface(props): string

Defined in: packages/core/src/globals/interfaceGen.ts:20

Converts a resolved GlobalConfig to a TypeScript export interface source string.

The generated interface extends VexDocumentGlobal<"slug"> (which itself extends VexDocument), adding user fields at root level. This produces the flat shape returned by globals.get — no data wrapper.

GlobalConfig

The resolved global definition to convert.

string

TypeScript source string for one flat global interface block.

globalConfigToInterface({ global: siteSettings });
// → 'export interface SiteSettingsGlobal extends VexDocumentGlobal<"siteSettings"> {\n\tsiteName: string\n\t...\n}'