diff --git a/src/node/index.ts b/src/node/index.ts index dd6b048e..bc08b91b 100644 --- a/src/node/index.ts +++ b/src/node/index.ts @@ -4,4 +4,11 @@ export * from './serve/serve' export * from './config' export * from './markdown/markdown' -export type { SiteData, HeadConfig, LocaleConfig, DefaultTheme } from '../../types/shared' +// shared types +export type { + SiteData, + HeadConfig, + Header, + LocaleConfig, + DefaultTheme +} from '../../types/shared' diff --git a/types/index.d.ts b/types/index.d.ts index ea74a292..25a80e9e 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,4 +1,2 @@ -export * from './shared' -export * from './default-theme' -export * from '../dist/node/index' export * from '../dist/client/index' +export * from '../dist/node/index' diff --git a/types/shared.d.ts b/types/shared.d.ts index 2beaf53f..f2af2930 100644 --- a/types/shared.d.ts +++ b/types/shared.d.ts @@ -2,13 +2,13 @@ export { DefaultTheme } from './default-theme' -export interface LocaleConfig { - lang: string - title?: string - description?: string - head?: HeadConfig[] - label?: string - selectText?: string +export interface PageData { + relativePath: string + title: string + description: string + headers: Header[] + frontmatter: Record + lastUpdated: number } export interface SiteData { @@ -49,17 +49,17 @@ export type HeadConfig = | [string, Record] | [string, Record, string] -export interface PageData { - relativePath: string - title: string - description: string - headers: Header[] - frontmatter: Record - lastUpdated: number -} - export interface Header { level: number title: string slug: string } + +export interface LocaleConfig { + lang: string + title?: string + description?: string + head?: HeadConfig[] + label?: string + selectText?: string +}