Skip to content

Commit

Permalink
add types for hot option
Browse files Browse the repository at this point in the history
  • Loading branch information
rixo committed Oct 21, 2020
1 parent 3663a88 commit 0d1f6e1
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,36 @@ interface Options {
warning: RollupWarning,
handler: (w: RollupWarning | string) => void
) => void;

hot?: {
/**
* Disable state preservation when a component is updated by HMR.
* @default false
*/
noPreserveState: boolean;
/**
* If this string appears anywhere in your component's code, then local
* state won't be preserved, even when noPreserveState is false.
* @default '@!hmr'
*/
noPreserveStateKey: string;
/**
* Prevent doing a full reload on next HMR update after fatal error.
* @default false
*/
noReload: boolean;
/**
* Try to recover after runtime errors in component init.
* @default false
*/
optimistic: boolean;

noDisableCss: boolean;
injectCss: boolean;
cssEjectDelay: number;

nollup: boolean;
}
}

export default function svelte(options?: Options): Plugin;

0 comments on commit 0d1f6e1

Please sign in to comment.