File tree 1 file changed +29
-1
lines changed
1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,34 @@ export type BannerOrFooter =
44
44
}
45
45
| ( ( ctx : { format : Format } ) => { js ?: string ; css ?: string } | undefined )
46
46
47
+ type Autocomplete < Keys extends string > = Keys | Omit < string , Keys >
48
+ export type BrowserTarget =
49
+ | 'chrome'
50
+ | 'deno'
51
+ | 'edge'
52
+ | 'firefox'
53
+ | 'hermes'
54
+ | 'ie'
55
+ | 'ios'
56
+ | 'node'
57
+ | 'opera'
58
+ | 'rhino'
59
+ | 'safari'
60
+ export type EsTarget =
61
+ | 'es3'
62
+ | 'es5'
63
+ | 'es6'
64
+ | 'es2015'
65
+ | 'es2016'
66
+ | 'es2017'
67
+ | 'es2018'
68
+ | 'es2019'
69
+ | 'es2020'
70
+ | 'es2021'
71
+ | 'es2022'
72
+ | 'esnext'
73
+ export type Target = Autocomplete < BrowserTarget | EsTarget >
74
+
47
75
/**
48
76
* The options available in tsup.config.ts
49
77
* Not all of them are available from CLI flags
@@ -65,7 +93,7 @@ export type Options = {
65
93
*
66
94
* default to `node14`
67
95
*/
68
- target ?: string | string [ ]
96
+ target ?: Target | Target [ ]
69
97
minify ?: boolean | 'terser'
70
98
terserOptions ?: MinifyOptions
71
99
minifyWhitespace ?: boolean
You can’t perform that action at this time.
0 commit comments