forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulp-ruby-sass.d.ts
68 lines (61 loc) · 2.29 KB
/
gulp-ruby-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
57
58
59
60
61
62
63
64
65
66
67
68
// Type definitions for gulp-ruby-sass v1.0.5
// Project: https://github.com/sindresorhus/gulp-ruby-sass
// Definitions by: Agnislav Onufrijchuk <https://github.com/agnislav>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts"/>
declare module "gulp-ruby-sass" {
/**
* The interface includes all options that available for sass executable.
* Options are converted from dashed to camelCase
* @interface SassOptions
*/
interface SassOptions {
loadPath?: string | string[];
require?: string;
compass?: boolean;
style?: string;
force?: boolean;
stopOnError?: boolean;
scss?: boolean;
defaultEncoding?: string;
unixNewlines?: boolean;
debugInfo?: boolean;
lineNumbers?: boolean;
lineComments?: boolean;
check?: boolean;
precision?: number;
cacheLocation?: string;
noCache?: boolean;
trace?: boolean;
quiet?: boolean;
// Actually, there should be a string. However due to ts spec, overriding member should be the same type or a subtype.
// http://stackoverflow.com/questions/19605557/incompatible-static-properties-in-three-d-ts-with-latest-typescript
// We need Options.soucemap to be boolean, so here 'any' is used instead of string.
sourcemap?: any;
// All listed below options are acceptable by the sass executable and potentially may be used from js.
// However I doubt are there cases when it's meaningful
watch?: string;
update?: string;
stdin?: boolean;
interactive?: boolean;
}
/**
* The interface includes the node-ruby-sass only options.
* Attention: sourcemap option type differs from the same SassOption's type.
* @interface Options
* @extends SassOptions
*/
interface Options extends SassOptions {
verbose?: boolean;
bundleExec?: boolean;
sourcemap?: boolean;
container?: string;
}
/**
* Object to be exported
* @param {string} source - Filename or directory
* @param {Options} options - Additional processing rules/options
*/
function sass(source: string, options?: Options): NodeJS.ReadableStream;
export = sass;
}