mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
chore: improve types
This commit is contained in:
parent
7e69d5d838
commit
35e85c5fb4
@ -1,4 +1,4 @@
|
||||
import type { DocsearchPluginOptions } from '@vuepress/plugin-docsearch'
|
||||
import type { DocSearchPluginOptions } from '@vuepress/plugin-docsearch'
|
||||
import type { SearchPluginOptions } from '@vuepress-plume/plugin-search'
|
||||
import type { App } from 'vuepress'
|
||||
import { getLocaleConfig } from '@vuepress/helper'
|
||||
@ -20,8 +20,8 @@ export function resolveSearchOptions(
|
||||
|
||||
export function resolveDocsearchOptions(
|
||||
app: App,
|
||||
{ locales, ...options }: DocsearchPluginOptions = {},
|
||||
): DocsearchPluginOptions {
|
||||
{ locales, ...options }: DocSearchPluginOptions = {},
|
||||
): DocSearchPluginOptions {
|
||||
return {
|
||||
...options,
|
||||
locales: getLocaleConfig({
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { DocsearchLocaleOptions } from '@vuepress/plugin-docsearch'
|
||||
import type { DocSearchLocaleOptions } from '@vuepress/plugin-docsearch'
|
||||
import type { SearchLocaleOptions } from '@vuepress-plume/plugin-search'
|
||||
import type { PlumeThemeLocaleData, PresetLocale } from '../../shared/index.js'
|
||||
import { enLocale, enPresetLocale, enSearchLocale } from './en.js'
|
||||
@ -14,7 +14,7 @@ export const PRESET_LOCALES: Record<string, PresetLocale> = {
|
||||
'/en/': enPresetLocale,
|
||||
}
|
||||
|
||||
export const DOCSEARCH_LOCALES: Record<string, DocsearchLocaleOptions> = {
|
||||
export const DOCSEARCH_LOCALES: Record<string, DocSearchLocaleOptions> = {
|
||||
'/zh/': zhDocsearchLocale,
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { DocsearchLocaleOptions } from '@vuepress/plugin-docsearch'
|
||||
import type { DocSearchLocaleOptions } from '@vuepress/plugin-docsearch'
|
||||
import type { SearchLocaleOptions } from '@vuepress-plume/plugin-search'
|
||||
import type { PlumeThemeLocaleData, PresetLocale } from '../../shared/index.js'
|
||||
|
||||
@ -47,7 +47,7 @@ export const zhPresetLocale: PresetLocale = {
|
||||
category: '分类',
|
||||
}
|
||||
|
||||
export const zhDocsearchLocale: DocsearchLocaleOptions = {
|
||||
export const zhDocsearchLocale: DocSearchLocaleOptions = {
|
||||
placeholder: '搜索文档',
|
||||
translations: {
|
||||
button: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user