UNPKG

1.73 kBTypeScriptView Raw
1export type Compilation = import("webpack").Compilation;
2export type Module = import("webpack").Module;
3export type LoaderContext = import("webpack").LoaderContext<any>;
4/** @typedef {import("webpack").Compilation} Compilation */
5/** @typedef {import("webpack").Module} Module */
6/** @typedef {import("webpack").LoaderContext<any>} LoaderContext */
7/**
8 * @returns {boolean}
9 */
10export function trueFn(): boolean;
11/**
12 * @param {Compilation} compilation
13 * @param {string | number} id
14 * @returns {null | Module}
15 */
16export function findModuleById(
17 compilation: Compilation,
18 id: string | number
19): null | Module;
20/**
21 * @param {LoaderContext} loaderContext
22 * @param {string | Buffer} code
23 * @param {string} filename
24 * @returns {object}
25 */
26export function evalModuleCode(
27 loaderContext: LoaderContext,
28 code: string | Buffer,
29 filename: string
30): object;
31/**
32 * @param {Module} a
33 * @param {Module} b
34 * @returns {0 | 1 | -1}
35 */
36export function compareModulesByIdentifier(a: Module, b: Module): 0 | 1 | -1;
37export const MODULE_TYPE: "css/mini-extract";
38export const AUTO_PUBLIC_PATH: "__mini_css_extract_plugin_public_path_auto__";
39export const ABSOLUTE_PUBLIC_PATH: "webpack:///mini-css-extract-plugin/";
40export const SINGLE_DOT_PATH_SEGMENT: "__mini_css_extract_plugin_single_dot_path_segment__";
41/**
42 * @param {LoaderContext} loaderContext
43 * @param {string} request
44 * @returns {string}
45 */
46export function stringifyRequest(
47 loaderContext: LoaderContext,
48 request: string
49): string;
50/**
51 * @param {string} filename
52 * @param {string} outputPath
53 * @param {boolean} enforceRelative
54 * @returns {string}
55 */
56export function getUndoPath(
57 filename: string,
58 outputPath: string,
59 enforceRelative: boolean
60): string;