You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The included types in this package are not compatible with the svelte compiler types. The main thing is the current PreprocessOptions type does not allow returned data from preprocessors.
It's easy enough to ignore the type error but since svelte exports the correct preprocess options type, there's no reason not to use it.
Sample error:
$ tsc --noEmit --allowJs --checkJs
rollup.config.js:80:14 - error TS2345: Argument of type'{ dev: boolean; emitCss: boolean; immutable: boolean; preprocess: { markup: ((options: { content: string; filename: string; }) => Processed | Promise<Processed>) | undefined; style: Preprocessor; }; preserveWhitespace: boolean; }' is not assignable to parameter of type'Options'.
Types of property 'preprocess' are incompatible.
Type '{ markup: ((options: { content: string; filename: string; }) => Processed | Promise<Processed>) | undefined; style: Preprocessor; }' is not assignable to type'PreprocessOptions'.
Property 'markup' is incompatible with index signature.
Type '((options: { content: string; filename: string; }) => Processed | Promise<Processed>) | undefined' is not assignable to type'(...args: any[]) => void'.
Type 'undefined' is not assignable to type'(...args: any[]) => void'.
80 svelte(svelteOpts),
~~~~~~~~~~
Found 1 error.
error Command failed with exit code 1.
The included types in this package are not compatible with the svelte compiler types. The main thing is the current
PreprocessOptions
type does not allow returned data from preprocessors.It's easy enough to ignore the type error but since svelte exports the correct
preprocess
options type, there's no reason not to use it.Sample error:
Versions
rollup-plugin-svelte
:5.2.3
svelte
:5.2.3
typescript
:3.9.7
References
The text was updated successfully, but these errors were encountered: