Skip to content

Commit 377cd3f

Browse files
committed
chore: Update webpack-ext-reloader type definitions
Refactor type declarations in 'typings/webpack-ext-reloader.d.ts' to a more structured format. This change was automatically applied during dependency updates and maintains backward compatibility for the public API.
1 parent c40141e commit 377cd3f

File tree

1 file changed

+25
-18
lines changed

1 file changed

+25
-18
lines changed

typings/webpack-ext-reloader.d.ts

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
1-
import { Compiler } from 'webpack';
1+
declare module 'webpack-ext-reloader' {
2+
import type { Compiler } from 'webpack';
23

3-
export interface IPluginOptions {
4-
port: number;
5-
reloadPage: boolean;
6-
manifest?: string;
7-
entries?: IEntriesOption;
8-
}
4+
interface IEntriesOption {
5+
[key: string]: string | string[];
6+
}
97

10-
export interface IExtensionReloaderInstance {
11-
apply(compiler: Compiler): void;
12-
}
8+
interface IPluginOptions {
9+
port: number;
10+
reloadPage: boolean;
11+
manifest?: string;
12+
entries?: IEntriesOption;
13+
}
1314

14-
export declare class ExtensionReloader implements IExtensionReloaderInstance {
15-
constructor(options?: IPluginOptions);
15+
interface IExtensionReloaderInstance {
16+
apply(compiler: Compiler): void;
17+
}
1618

17-
apply(compiler: Compiler): void;
18-
}
19+
class ExtensionReloader implements IExtensionReloaderInstance {
20+
constructor(options?: IPluginOptions);
1921

20-
export default ExtensionReloader;
22+
apply(compiler: Compiler): void;
23+
}
2124

22-
declare module 'webpack-ext-reloader' {
23-
export default ExtensionReloader;
24-
export = IExtensionReloaderInstance;
25+
namespace ExtensionReloader {
26+
type PluginOptions = IPluginOptions;
27+
type EntriesOption = IEntriesOption;
28+
interface Instance extends IExtensionReloaderInstance {}
29+
}
30+
31+
export = ExtensionReloader;
2532
}

0 commit comments

Comments
 (0)