File tree 2 files changed +13
-11
lines changed
2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ import { ModuleFormat as RollupFormat } from 'rollup'
2
2
3
3
import { Banner } from './utils/get-banner'
4
4
5
+ type Omit < T , K extends keyof T > = Pick < T , Exclude < keyof T , K > >
6
+ type Diff < T extends keyof any , U extends keyof any > = ( { [ P in T ] : P } &
7
+ { [ P in U ] : never } & { [ x : string ] : never } ) [ T ]
8
+ type Overwrite < T , U > = Pick < T , Diff < keyof T , keyof U > > & U
9
+
5
10
export type Format =
6
11
| RollupFormat
7
12
| 'cjs-min'
@@ -209,14 +214,16 @@ export interface Config {
209
214
extendConfig ?: ExtendConfig
210
215
}
211
216
217
+ interface ConfigOutputOverwrite {
218
+ /**
219
+ * Output directory, always a string
220
+ */
221
+ dir : string
222
+ }
223
+
212
224
export interface NormalizedConfig {
213
225
input ?: string | ConfigEntryObject | Array < ConfigEntryObject | string >
214
- output : Overwrite <
215
- ConfigOutput ,
216
- {
217
- dir : string
218
- }
219
- >
226
+ output : Overwrite < ConfigOutput , ConfigOutputOverwrite >
220
227
env ?: Env
221
228
bundleNodeModules ?: boolean | string [ ]
222
229
plugins : {
Original file line number Diff line number Diff line change 1
1
declare module '*.json'
2
2
3
- type Omit < T , K extends keyof T > = Pick < T , Exclude < keyof T , K > >
4
- type Diff < T extends keyof any , U extends keyof any > = ( { [ P in T ] : P } &
5
- { [ P in U ] : never } & { [ x : string ] : never } ) [ T ]
6
- type Overwrite < T , U > = Pick < T , Diff < keyof T , keyof U > > & U
7
-
8
3
declare module 'tinydate' {
9
4
type Tinydate = ( template : string ) => ( date ?: Date ) => string
10
5
const tinydate : Tinydate
You can’t perform that action at this time.
0 commit comments