forked from jbaroudi/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
node-sass.d.ts
56 lines (50 loc) · 1.55 KB
/
node-sass.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
// Type definitions for Node Sass
// Project: https://github.com/sass/node-sass
// Definitions by: Asana <https://asana.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "node-sass" {
interface Importer {
(url: string, prev: string, done: (data: { file: string; contents: string; }) => void): void;
}
interface Options {
file?: string;
data?: string;
importer?: Importer | Importer[];
functions?: { [key: string]: Function };
includePaths?: string[];
indentedSyntax?: boolean;
indentType?: string;
indentWidth?: number;
linefeed?: string;
omitSourceMapUrl?: boolean;
outFile?: string;
outputStyle?: string;
precision?: number;
sourceComments?: boolean;
sourceMap?: boolean | string;
sourceMapContents?: boolean;
sourceMapEmbed?: boolean;
sourceMapRoot?: boolean;
}
interface SassError extends Error {
message: string;
line: number;
column: number;
status: number;
file: string;
}
interface Result {
css: Buffer;
map: Buffer;
stats: {
entry: string;
start: number;
end: number;
duration: number;
includedFiles: string[];
}
}
export function render(options: Options, callback: (err: SassError, result: Result) => any): void;
export function renderSync(options: Options): Result;
}