|
1 | | -import { Compiler } from 'webpack'; |
| 1 | +declare module 'webpack-ext-reloader' { |
| 2 | + import type { Compiler } from 'webpack'; |
2 | 3 |
|
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 | + } |
9 | 7 |
|
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 | + } |
13 | 14 |
|
14 | | -export declare class ExtensionReloader implements IExtensionReloaderInstance { |
15 | | - constructor(options?: IPluginOptions); |
| 15 | + interface IExtensionReloaderInstance { |
| 16 | + apply(compiler: Compiler): void; |
| 17 | + } |
16 | 18 |
|
17 | | - apply(compiler: Compiler): void; |
18 | | -} |
| 19 | + class ExtensionReloader implements IExtensionReloaderInstance { |
| 20 | + constructor(options?: IPluginOptions); |
19 | 21 |
|
20 | | -export default ExtensionReloader; |
| 22 | + apply(compiler: Compiler): void; |
| 23 | + } |
21 | 24 |
|
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; |
25 | 32 | } |
0 commit comments