From b8601372dea2afbfe8e897a966f4a3e2a97b1835 Mon Sep 17 00:00:00 2001 From: dominikg Date: Thu, 19 Oct 2023 21:02:49 +0200 Subject: [PATCH] fix: use correct type Options for plugin function arg --- .changeset/gorgeous-hats-bathe.md | 5 +++++ packages/vite-plugin-svelte/src/index.js | 2 +- packages/vite-plugin-svelte/types/index.d.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/gorgeous-hats-bathe.md diff --git a/.changeset/gorgeous-hats-bathe.md b/.changeset/gorgeous-hats-bathe.md new file mode 100644 index 000000000..49d304a90 --- /dev/null +++ b/.changeset/gorgeous-hats-bathe.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/vite-plugin-svelte': patch +--- + +fix(types): use correct type Options for svelte function arg diff --git a/packages/vite-plugin-svelte/src/index.js b/packages/vite-plugin-svelte/src/index.js index 49ac59fe9..7b23ad7bf 100644 --- a/packages/vite-plugin-svelte/src/index.js +++ b/packages/vite-plugin-svelte/src/index.js @@ -21,7 +21,7 @@ import { VitePluginSvelteCache } from './utils/vite-plugin-svelte-cache.js'; import { loadRaw } from './utils/load-raw.js'; /** - * @param {Partial} [inlineOptions] + * @param {Partial} [inlineOptions] * @returns {import('vite').Plugin[]} */ export function svelte(inlineOptions) { diff --git a/packages/vite-plugin-svelte/types/index.d.ts b/packages/vite-plugin-svelte/types/index.d.ts index 2e463aab0..ef60a800a 100644 --- a/packages/vite-plugin-svelte/types/index.d.ts +++ b/packages/vite-plugin-svelte/types/index.d.ts @@ -3,7 +3,7 @@ declare module '@sveltejs/vite-plugin-svelte' { import type { CompileOptions, PreprocessorGroup } from 'svelte/compiler'; import type { Warning } from 'svelte/types/compiler/interfaces'; import type { Options as InspectorOptions } from '@sveltejs/vite-plugin-svelte-inspector'; - export function svelte(inlineOptions?: Partial | undefined): import('vite').Plugin[]; + export function svelte(inlineOptions?: Partial | undefined): import('vite').Plugin[]; type Options = Omit & PluginOptionsInline; interface PluginOptionsInline extends PluginOptions {