-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.d.ts
103 lines (89 loc) · 2.69 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
//
// Type definitions for rollup-plugin-jscc v1.0.x
// Definitions by aMarCruz
//
export = jsccPlugin
declare function jsccPlugin (options: jsccPlugin.Options): import('rollup').Plugin
declare namespace jsccPlugin {
//
type QuoteType = 'single' | 'double' | 'both'
interface Options {
/**
* If `false`, run the plugin as a `transformer`, otherwise run as `loader`
* @default true
*/
asloader?: boolean
/**
* String with the type of quotes to escape in the output of strings:
* 'single', 'double' or 'both'.
*
* It does not affects the output of regexes or strings contained in the
* JSON output of objects.
*/
escapeQuotes?: QuoteType
/**
* Preserves the empty lines of the directives and blocks that were removed.
*
* Use this option with `sourceMap:false` if you are interested only in
* keeping the line numbering.
* @default false
*/
keepLines?: boolean
/**
* Make a hi-res source-map, if `sourceMap:true` (the default).
* @default true
*/
mapHires?: boolean
/**
* String, regex or array of strings or regex matching the start of a directive.
* That is, the characters before the '#', usually the start of comments.
* @default /\/[/*]|<!--/
*/
prefixes?: string | RegExp | Array<string | RegExp>
/**
* Must include a sourceMap?
* @default true
*/
sourcemap?: boolean
/**
* Alias for `sourcemap`
* @deprecated
*/
sourceMap?: boolean
/**
* Include the original source in the sourcemap
* @default true
*/
mapContent?: boolean
/**
* Plain object defining the variables used by jscc during the preprocessing.
*
* Each key is a varname matching the regex `_[0-9A-Z][_0-9A-Z]*`, the value
* can have any type.
*
* It has two predefined, readonly properties:
* - `_FILE` : Name of the source file, relative to the current directory
* - `_VERSION` : The version property in the package.json
*/
values?: { [k: string]: any }
/**
* Array of strings that specifies the file extensions to process.
*
* _Note:_ Do not use wildcards here.
* @default ['js','jsx','ts','tsx','mjs','tag']
*/
extensions?: string | string[]
/**
* [minimatch](https://github.com/isaacs/minimatch) or array of minimatch
* patterns for paths that must be included in the processing.
* @default (none)
*/
include?: string | string[]
/**
* [minimatch](https://github.com/isaacs/minimatch) or array of minimatch
* patterns for paths that should be ignored.
* @default (none)
*/
exclude?: string | string[]
}
}