Skip to content

Commit aa82265

Browse files
committed
fix
1 parent e0f18e4 commit aa82265

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

src/server.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -603,10 +603,7 @@ class Server<
603603
const compilerOptions = this.#getCompilerOptions();
604604
const compilerWatchOptions = compilerOptions.watchOptions;
605605
const getWatchOptions = (
606-
watchOptions: WatchOptions & {
607-
aggregateTimeout?: number;
608-
poll?: number | boolean;
609-
} = {},
606+
watchOptions: WatchFiles['options'] = {},
610607
): WatchOptions => {
611608
const getPolling = () => {
612609
if (typeof watchOptions.usePolling !== 'undefined') {
@@ -640,6 +637,7 @@ class Server<
640637

641638
const usePolling = getPolling();
642639
const interval = getInterval();
640+
const { poll: _poll, ...rest } = watchOptions;
643641
return {
644642
ignoreInitial: true,
645643
persistent: true,
@@ -650,7 +648,7 @@ class Server<
650648
// Respect options from compiler watchOptions
651649
usePolling,
652650
interval,
653-
...watchOptions,
651+
...rest,
654652
};
655653
};
656654
const getStaticItem = (

src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ export interface WatchFiles {
9797
paths: string | string[];
9898
options?: WatchOptions & {
9999
aggregateTimeout?: number;
100-
ignored?: WatchOptions['ignored'];
101100
poll?: number | boolean;
102101
};
103102
}

0 commit comments

Comments
 (0)