1 |
|
2 |
|
3 | import { loader } from "webpack";
|
4 |
|
5 | export type Readonly<T> = {
|
6 | readonly [P in keyof T]: T[P];
|
7 | };
|
8 |
|
9 | export interface InterpolateOption {
|
10 | context?: string | undefined;
|
11 | content?: string | Buffer | undefined;
|
12 | regExp?: string | RegExp | undefined;
|
13 | }
|
14 |
|
15 | export interface OptionObject {
|
16 | [key: string]: null | false | true | string;
|
17 | }
|
18 |
|
19 | export type HashType = "sha1" | "md4" | "md5" | "sha256" | "sha512";
|
20 |
|
21 | export type DigestType = "hex" | "base26" | "base32" | "base36" | "base49" | "base52" | "base58" | "base62" | "base64";
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | export function getOptions(loaderContext: loader.LoaderContext): Readonly<OptionObject>;
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 | export function parseQuery(optionString: string): OptionObject;
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | export function stringifyRequest(loaderContext: loader.LoaderContext, resource: string): string;
|
40 |
|
41 | export function getRemainingRequest(loaderContext: loader.LoaderContext): string;
|
42 |
|
43 | export function getCurrentRequest(loaderContext: loader.LoaderContext): string;
|
44 |
|
45 | export function isUrlRequest(url: string, root?: string): boolean;
|
46 |
|
47 | export function parseString(str: string): string;
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | export function urlToRequest(url: string, root?: string): string;
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 | export function interpolateName(loaderContext: loader.LoaderContext, name: string, options?: any): string;
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 | export function getHashDigest(buffer: Buffer, hashType: HashType, digestType: DigestType, maxLength: number): string;
|