Skip to content

Commit

Permalink
fix: use correct type Options for plugin function arg
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikg committed Oct 19, 2023
1 parent 4543ff4 commit b860137
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-hats-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/vite-plugin-svelte': patch
---

fix(types): use correct type Options for svelte function arg
2 changes: 1 addition & 1 deletion packages/vite-plugin-svelte/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { VitePluginSvelteCache } from './utils/vite-plugin-svelte-cache.js';
import { loadRaw } from './utils/load-raw.js';

/**
* @param {Partial<import('./public.d.ts').PluginOptionsInline>} [inlineOptions]
* @param {Partial<import('./public.d.ts').Options>} [inlineOptions]
* @returns {import('vite').Plugin[]}
*/
export function svelte(inlineOptions) {
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin-svelte/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<PluginOptionsInline> | undefined): import('vite').Plugin[];
export function svelte(inlineOptions?: Partial<Options> | undefined): import('vite').Plugin[];
type Options = Omit<SvelteOptions, 'vitePlugin'> & PluginOptionsInline;

interface PluginOptionsInline extends PluginOptions {
Expand Down

0 comments on commit b860137

Please sign in to comment.