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.
Parameters
Section titled “Parameters”global
Section titled “global”The resolved global definition to convert.
Returns
Section titled “Returns”string
TypeScript source string for one flat global interface block.
Example
Section titled “Example”globalConfigToInterface({ global: siteSettings });// → 'export interface SiteSettingsGlobal extends VexDocumentGlobal<"siteSettings"> {\n\tsiteName: string\n\t...\n}'