@@ -12,6 +12,7 @@ interface RecursiveKeyValuePair<K extends keyof any = string, V = string> {
12
12
[ key : string ] : V | RecursiveKeyValuePair < K , V >
13
13
}
14
14
type ResolvableTo < T > = T | ( ( utils : PluginUtils ) => T )
15
+ type CSSRuleObject = RecursiveKeyValuePair < string , string | string [ ] >
15
16
16
17
interface PluginUtils {
17
18
colors : DefaultColors
@@ -242,15 +243,15 @@ type ValueType =
242
243
export interface PluginAPI {
243
244
// for registering new static utility styles
244
245
addUtilities (
245
- utilities : RecursiveKeyValuePair | RecursiveKeyValuePair [ ] ,
246
+ utilities : CSSRuleObject | CSSRuleObject [ ] ,
246
247
options ?: Partial < {
247
248
respectPrefix : boolean
248
249
respectImportant : boolean
249
250
} >
250
251
) : void
251
252
// for registering new dynamic utility styles
252
253
matchUtilities < T > (
253
- utilities : KeyValuePair < string , ( value : T ) => RecursiveKeyValuePair > ,
254
+ utilities : KeyValuePair < string , ( value : T ) => CSSRuleObject > ,
254
255
options ?: Partial < {
255
256
respectPrefix : boolean
256
257
respectImportant : boolean
@@ -261,15 +262,15 @@ export interface PluginAPI {
261
262
) : void
262
263
// for registering new static component styles
263
264
addComponents (
264
- components : RecursiveKeyValuePair | RecursiveKeyValuePair [ ] ,
265
+ components : CSSRuleObject | CSSRuleObject [ ] ,
265
266
options ?: Partial < {
266
267
respectPrefix : boolean
267
268
respectImportant : boolean
268
269
} >
269
270
) : void
270
271
// for registering new dynamic component styles
271
272
matchComponents < T > (
272
- components : KeyValuePair < string , ( value : T ) => RecursiveKeyValuePair > ,
273
+ components : KeyValuePair < string , ( value : T ) => CSSRuleObject > ,
273
274
options ?: Partial < {
274
275
respectPrefix : boolean
275
276
respectImportant : boolean
@@ -279,7 +280,7 @@ export interface PluginAPI {
279
280
} >
280
281
) : void
281
282
// for registering new base styles
282
- addBase ( base : RecursiveKeyValuePair | RecursiveKeyValuePair [ ] ) : void
283
+ addBase ( base : CSSRuleObject | CSSRuleObject [ ] ) : void
283
284
// for registering custom variants
284
285
addVariant ( name : string , definition : string | string [ ] | ( ( ) => string ) | ( ( ) => string ) [ ] ) : void
285
286
// for looking up values in the user’s theme configuration
0 commit comments