-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.d.ts
65 lines (61 loc) · 1.89 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
declare module 'gulp-merge-json' {
import * as File from 'vinyl';
interface IGulpMergeJsonOptions {
/**
* Output filename
* @default 'combined.json'
*/
fileName?: string;
/**
* Edit function (add/remove/edit keys during merge)
* @default json => json
*/
edit?: (json: obj, file: File) => obj | void;
/**
* Transform function (edit final merged object)
* @default json => json
*/
transform?: (json: obj) => obj;
/**
* Starting object to merge into (useful for providing default values)
* @default {}
*/
startObj?: obj | obj[];
/** Object to merge after file merging complete (useful for overwriting with special values) */
endObj?: obj | obj[];
/**
* Output module.exports = {MERGED_JSON_DATA}; or {exportModule} = {MERGED_JSON_DATA} when string passed
* @default false
*/
exportModule?: boolean | string;
/**
* Whether to concatenate arrays instead of merging
* @default false
*/
concatArrays?: boolean;
/**
* Whether to merge arrays or overwrite completely
* @default true
*/
mergeArrays?: boolean;
/** Custom merge function for use with mergeWith */
customizer?: (objValue: obj, srcValue: obj, key?: string, object?: obj, source?: obj, stack?: any) => any;
/** Custom JSON reviver function passed to parse */
jsonReviver?: (key: string, value: any) => any;
/** Custom JSON replacer function passed to stringify */
jsonReplacer?: (key: string, value: any) => any;
/**
* String used for white space by stringify
* @default '\t'
*/
jsonSpace?: string;
/**
* Use JSON5 instead of JSON for parse and stringify
* @default false
*/
json5?: boolean;
}
type obj = {[key: string]: any};
const gulp_merge_json: (options: IGulpMergeJsonOptions) => NodeJS.ReadStream;
export = gulp_merge_json;
}