1 | export = loader;
|
2 | /** @typedef {import("schema-utils/declarations/validate").Schema} Schema */
|
3 | /** @typedef {import("webpack").Compilation} Compilation */
|
4 | /**
|
5 | * @template T
|
6 | * @typedef {Object} LoaderOptions<T>
|
7 | * @property {string} [severityError] Allows to choose how errors are displayed.
|
8 | * @property {import("./index").Minimizer<T> | import("./index").Minimizer<T>[]} [minimizer]
|
9 | * @property {import("./index").Generator<T>[]} [generator]
|
10 | */
|
11 | /**
|
12 | * @template T
|
13 | * @this {import("webpack").LoaderContext<LoaderOptions<T>>}
|
14 | * @param {Buffer} content
|
15 | * @returns {Promise<Buffer | undefined>}
|
16 | */
|
17 | declare function loader<T>(content: Buffer): Promise<Buffer | undefined>;
|
18 | declare class loader<T> {
|
19 | /** @typedef {import("schema-utils/declarations/validate").Schema} Schema */
|
20 | /** @typedef {import("webpack").Compilation} Compilation */
|
21 | /**
|
22 | * @template T
|
23 | * @typedef {Object} LoaderOptions<T>
|
24 | * @property {string} [severityError] Allows to choose how errors are displayed.
|
25 | * @property {import("./index").Minimizer<T> | import("./index").Minimizer<T>[]} [minimizer]
|
26 | * @property {import("./index").Generator<T>[]} [generator]
|
27 | */
|
28 | /**
|
29 | * @template T
|
30 | * @this {import("webpack").LoaderContext<LoaderOptions<T>>}
|
31 | * @param {Buffer} content
|
32 | * @returns {Promise<Buffer | undefined>}
|
33 | */
|
34 | constructor(content: Buffer);
|
35 | resourcePath: string | undefined;
|
36 | resourceQuery: string | undefined;
|
37 | }
|
38 | declare namespace loader {
|
39 | export { raw, Schema, Compilation, LoaderOptions };
|
40 | }
|
41 | declare var raw: boolean;
|
42 | type Schema = import("schema-utils/declarations/validate").Schema;
|
43 | type Compilation = import("webpack").Compilation;
|
44 | /**
|
45 | * <T>
|
46 | */
|
47 | type LoaderOptions<T> = {
|
48 | /**
|
49 | * Allows to choose how errors are displayed.
|
50 | */
|
51 | severityError?: string | undefined;
|
52 | minimizer?:
|
53 | | import("./index").Minimizer<T>
|
54 | | import("./index").Minimizer<T>[]
|
55 | | undefined;
|
56 | generator?: import("./index").Generator<T>[] | undefined;
|
57 | };
|