chore: improve types

This commit is contained in:
pengzhanbo 2024-10-15 03:42:21 +08:00
parent 7e69d5d838
commit 35e85c5fb4
3 changed files with 7 additions and 7 deletions

View File

@ -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({

View File

@ -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,
}

View File

@ -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: {