Skip to content

fix(types): extend CompileOptions interface directly #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 19, 2020
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Plugin, RollupWarning } from 'rollup';
import { PreprocessorGroup } from 'svelte/types/compiler/preprocess';
import { CompileOptions } from 'svelte/types/compiler/interfaces';

interface Css {
code: any;
Expand All @@ -23,7 +24,7 @@ declare class CssWriter {
toString(): string;
}

interface Options {
interface Options extends CompileOptions {
/**
* By default, all .svelte and .html files are compiled
* @default ['.html', '.svelte']
Expand All @@ -40,17 +41,12 @@ interface Options {
* @type {IncludeAndExclude}
*/
include?: string;

/**
* @type {IncludeAndExclude}
*/
exclude?: string;

/**
* By default, the client-side compiler is used. You
* can also use the server-side rendering compiler
*/
generate?: 'dom' | 'ssr' | false;

/**
* Optionally, preprocess components with svelte.preprocess:
* https://svelte.dev/docs#svelte_preprocess
Expand All @@ -73,13 +69,6 @@ interface Options {
*/
css?: (css: CssWriter) => any;


/**
* Compile Svelte components to custom elements (aka web components).
* @default false
*/
customElement?: boolean;

/**
* let Rollup handle all other warnings normally
*/
Expand Down