forked from Richienb/node-polyfill-webpack-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
59 lines (52 loc) · 1.35 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import {type MergeExclusive} from 'type-fest';
import {type Compiler} from 'webpack';
declare namespace GopeedPolyfillPlugin {
export type Alias =
| 'assert'
| 'buffer'
| 'Buffer'
| 'console'
| 'constants'
| 'crypto'
| 'domain'
| 'events'
| 'http'
| 'https'
| 'os'
| 'path'
| 'process'
| 'punycode'
| 'querystring'
| 'stream'
| '_stream_duplex'
| '_stream_passthrough'
| '_stream_readable'
| '_stream_transform'
| '_stream_writable'
| 'string_decoder'
| 'sys'
| 'timers'
| 'tty'
| 'url'
| 'util'
| 'vm'
| 'zlib';
export type IncludeOptions = {
/**
By default, the modules that were polyfilled in Webpack 4 are mirrored over. However, you can choose to only include certain aliases. For example, you can only have `console` polyfilled.
*/
includeAliases?: readonly Alias[];
};
export type ExcludeOptions = {
/**
By default, the modules that were polyfilled in Webpack 4 are mirrored over. However, if you don't want a module like `console` to be polyfilled you can specify alises to be skipped here.
*/
excludeAliases?: readonly Alias[];
};
export type Options = MergeExclusive<IncludeOptions, ExcludeOptions>;
}
declare class GopeedPolyfillPlugin {
constructor(options?: GopeedPolyfillPlugin.Options);
apply(compiler: InstanceType<typeof Compiler>): void;
}
export = GopeedPolyfillPlugin;