Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Commit 47f8428

Browse files
quicksnapKent C. Dodds
authored and
Kent C. Dodds
committed
fix(TypeScript): add recursive array type to CSS prop (#383)
* Add recursive array type to CSS prop * Remove unused import
1 parent a2dcedf commit 47f8428

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

typings/css-properties.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -1932,3 +1932,7 @@ export interface CSSProperties
19321932
extends CSSPropertiesComplete,
19331933
CSSPropertiesPseudo,
19341934
CSSPropertiesLossy {}
1935+
1936+
export type CSSPropertiesRecursive = CSSProperties | CSSPropertiesArray
1937+
1938+
export interface CSSPropertiesArray extends Array<CSSPropertiesRecursive> {}

typings/glamorous-component.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {CSSProperties} from './css-properties'
1+
import {CSSPropertiesRecursive} from './css-properties'
22

33
import {Component} from './glamorous'
44

@@ -20,7 +20,7 @@ export interface ExtraGlamorousProps {
2020
/**
2121
* Same type as any of the styles provided, will be merged with this component's styles and take highest priority over the component's predefined styles
2222
*/
23-
css?: CSSProperties
23+
css?: CSSPropertiesRecursive
2424
theme?: object
2525
}
2626

0 commit comments

Comments
 (0)