From 9edfaf06695fa5ecefb217ace86bc7a856b53680 Mon Sep 17 00:00:00 2001 From: Fredrik Nicol Date: Tue, 3 Apr 2018 20:34:36 +0200 Subject: [PATCH] Constrain array length of expand properties --- types/jss/css.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/jss/css.d.ts b/types/jss/css.d.ts index 3e5f81c582..2da9aa04b4 100644 --- a/types/jss/css.d.ts +++ b/types/jss/css.d.ts @@ -36,11 +36,13 @@ export interface JssExpand { attachment: CSSProperties['backgroundAttachment']; color: CSSProperties['backgroundColor']; image: CSSProperties['backgroundImage']; - position: CSSProperties['backgroundPosition'] | number[]; // Can be written using array e.g. `[0 0]` + position: + | CSSProperties['backgroundPosition'] + | [csstype.Properties['backgroundPosition'], csstype.Properties['backgroundPosition']]; // Can be written using array e.g. `[0 0]` repeat: CSSProperties['backgroundRepeat']; size: | CSSProperties['backgroundSize'] - | Array; // Can be written using array e.g. `['center' 'center']` + | [csstype.Properties['backgroundSize'], csstype.Properties['backgroundSize']]; // Can be written using array e.g. `['center' 'center']` } | CSSProperties['background']; border: