adjust type exports

pull/486/head
Evan You 3 years ago
parent 6f3a96f06d
commit 8288168b4f

@ -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'

4
types/index.d.ts vendored

@ -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'

32
types/shared.d.ts vendored

@ -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<string, any>
lastUpdated: number
}
export interface SiteData<ThemeConfig = any> {
@ -49,17 +49,17 @@ export type HeadConfig =
| [string, Record<string, string>]
| [string, Record<string, string>, string]
export interface PageData {
relativePath: string
title: string
description: string
headers: Header[]
frontmatter: Record<string, any>
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
}

Loading…
Cancel
Save