-
-
Notifications
You must be signed in to change notification settings - Fork 88
/
index.d.ts
50 lines (35 loc) · 1.18 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
import type { Plugin } from "postcss";
declare type GenerateScopedNameFunction = (name: string, filename: string, css: string) => string;
declare type LocalsConventionFunction = (
originalClassName: string,
generatedClassName: string,
inputFile: string
) => string;
declare class Loader {
constructor(root: string, plugins: Plugin[]);
fetch(file: string, relativeTo: string, depTrace: string): Promise<{ [key: string]: string }>;
finalSource?: string | undefined;
}
declare interface Options {
getJSON?(cssFilename: string, json: { [name: string]: string }, outputFilename?: string): void;
localsConvention?:
| "camelCase"
| "camelCaseOnly"
| "dashes"
| "dashesOnly"
| LocalsConventionFunction;
scopeBehaviour?: "global" | "local";
globalModulePaths?: RegExp[];
generateScopedName?: string | GenerateScopedNameFunction;
hashPrefix?: string;
exportGlobals?: boolean;
root?: string;
Loader?: typeof Loader;
resolve?: (file: string, importer: string) => string | null | Promise<string | null>;
}
declare interface PostcssModulesPlugin {
(options: Options): Plugin;
postcss: true;
}
declare const PostcssModulesPlugin: PostcssModulesPlugin;
export = PostcssModulesPlugin;