UNPKG

1.29 kBTypeScriptView Raw
1// Type definitions for gulp-sass 5.0.0
2// Project: https://github.com/dlmanning/gulp-sass
3// Definitions by: Asana <https://asana.com>
4// Yuma Hashimoto <https://github.com/yuma84>
5// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6// TypeScript Version: 2.7
7
8/// <reference types="node"/>
9
10import { Options } from 'node-sass';
11
12interface SassResults {
13 css: string;
14 map: string;
15 stats: {
16 entry: string;
17 start: Date;
18 end: Date;
19 duration: number;
20 includedFiles: string[];
21 }
22}
23
24interface SassOptions extends Options {
25 success?: ((results: SassResults) => any) | undefined;
26 error?: ((err: Error) => any) | undefined;
27 imagePaths?: string[] | undefined;
28}
29
30interface GulpSassOptions extends SassOptions {
31 errLogToConsole?: boolean | undefined;
32 onSuccess?: ((css: string) => any) | undefined;
33 onError?: ((err: Error) => any) | undefined;
34 sync?: boolean | undefined;
35}
36
37interface GulpSass {
38 (opts?: GulpSassOptions): NodeJS.ReadWriteStream;
39 logError(error?: string): void;
40 sync(options?: GulpSassOptions): NodeJS.ReadWriteStream;
41}
42
43type Compiler = any;
44
45interface GulpSassFactory {
46 (compiler: Compiler): GulpSass
47}
48
49declare var _tmp: GulpSassFactory;
50export = _tmp;
51
\No newline at end of file