generated from Richienb/node-module-boilerplate
-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathindex.d.ts
66 lines (58 loc) · 1.42 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
60
61
62
63
64
65
66
import {type MergeExclusive} from 'type-fest';
import {type Compiler} from 'webpack';
declare namespace NodePolyfillPlugin {
export type Alias =
| 'assert'
| 'buffer'
| 'Buffer'
| 'console'
| 'constants'
| 'crypto'
| 'domain'
| 'events'
| 'fs'
| 'http'
| 'https'
| 'os'
| 'path'
| 'process'
| 'punycode'
| 'querystring'
| 'stream'
| '_stream_duplex'
| '_stream_passthrough'
| '_stream_readable'
| '_stream_transform'
| '_stream_writable'
| 'string_decoder'
| 'sys'
| 'timers'
| 'timers/promises'
| 'tty'
| 'url'
| 'util'
| 'vm'
| 'zlib';
export type OnlyAliasesOptions = {
/**
You can choose to only include certain aliases, ignoring the defaults. For example, you can have only `console` polyfilled.
*/
onlyAliases?: readonly Alias[];
};
export type AdditionalExcludeAliasesOptions = {
/**
You can choose to add certain aliases to the list of polyfilled modules. For example, you can choose to polyfill `console`.
*/
additionalAliases?: readonly Alias[];
/**
If you don't want a module to be polyfilled, you can specify aliases to be skipped here.
*/
excludeAliases?: readonly Alias[];
};
export type Options = MergeExclusive<OnlyAliasesOptions, AdditionalExcludeAliasesOptions>;
}
declare class NodePolyfillPlugin {
constructor(options?: NodePolyfillPlugin.Options);
apply(compiler: InstanceType<typeof Compiler>): void;
}
export = NodePolyfillPlugin;