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

TypeScript: Add recursive array type to CSS prop #383

Merged
merged 2 commits into from
Feb 17, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions typings/css-properties.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1932,3 +1932,7 @@ export interface CSSProperties
extends CSSPropertiesComplete,
CSSPropertiesPseudo,
CSSPropertiesLossy {}

export type CSSPropertiesRecursive = CSSProperties | CSSPropertiesArray

export interface CSSPropertiesArray extends Array<CSSPropertiesRecursive> {}
4 changes: 2 additions & 2 deletions typings/glamorous-component.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {CSSProperties} from './css-properties'
import {CSSProperties, CSSPropertiesRecursive} from './css-properties'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still use CSSProperties in this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope; I've removed and updated


import {Component} from './glamorous'

Expand All @@ -20,7 +20,7 @@ export interface ExtraGlamorousProps {
/**
* 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
*/
css?: CSSProperties
css?: CSSPropertiesRecursive
theme?: object
}

Expand Down