forked from qiniu/typed-less-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
less.d.ts
56 lines (52 loc) · 1.36 KB
/
less.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
declare namespace Less {
interface FileContent {
filename: string;
contents: string;
}
interface FileContentWithError {
error: Error;
filename: string;
contents: string;
}
interface FileManager {
new (): FileManager;
getPath?(filename: string): string;
tryAppendLessExtension?(filename: string): string;
alwaysMakePathsAbsolute?(): boolean;
isPathAbsolute(path: string): boolean;
join?(basePath: string, laterPath: string): string;
pathDiff?(path: string, basePath: string): string;
supportsSync?(
filename: string,
currentDirectory: string,
options: Record<string, unknown>,
environment: unknown
): boolean;
supports?(
filename: string,
currentDirectory: string,
options: Record<string, unknown>,
environment: unknown
): boolean;
loadFile(
filename: string,
currentDirectory: string,
options: Record<string, unknown>,
environment: unknown,
callback: Function
): Promise<FileContent>;
loadFileSync(
filename: string,
currentDirectory: string,
options: Record<string, unknown>,
environment: unknown,
callback: Function
): FileContentWithError;
}
interface PluginManager {
addFileManager(manager: Less.FileManager): void;
}
}
interface LessStatic {
FileManager: Less.FileManager;
}