From 580058f67085e1cb6ad8d7cabe805b3e57d07507 Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Tue, 3 Apr 2018 18:28:38 -0700 Subject: [PATCH 1/2] Use csstype for a baseline of CSS definitions --- index.d.ts | 6 ++++-- package.json | 1 + yarn.lock | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 5ce35d1..f5c3700 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,10 +1,12 @@ -export interface CSSProperties { +import * as CSS from 'csstype'; + +export interface CSSProperties extends CSS.Properties { /** * In dev mode, adding a `label` string prop will reflect its value in devtools. Useful * when debugging, and a good alternative to 'semantic' classnames. */ label?: string; - // for now just allow everything + // for now just allow everything as a fallback [propertyName: string]: any; } diff --git a/package.json b/package.json index 49f1a58..988b968 100644 --- a/package.json +++ b/package.json @@ -104,6 +104,7 @@ } }, "dependencies": { + "csstype": "^2.0.0", "fbjs": "^0.8.12", "inline-style-prefixer": "^3.0.6", "object-assign": "^4.1.1", diff --git a/yarn.lock b/yarn.lock index 30abdc9..73c36b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1721,6 +1721,10 @@ css-in-js-utils@^1.0.3: dependencies: hyphenate-style-name "^1.0.2" +csstype@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.0.0.tgz#7d199dd8dca409077e81569eca0c71a74c4f4158" + currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" From f477b163b505e54cda7dccd4f2007e7a8e3fef22 Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Wed, 25 Apr 2018 15:51:45 -0700 Subject: [PATCH 2/2] Upgrade CSSType, remove string index fallback --- index.d.ts | 2 -- package.json | 2 +- yarn.lock | 6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/index.d.ts b/index.d.ts index f5c3700..e02b852 100644 --- a/index.d.ts +++ b/index.d.ts @@ -6,8 +6,6 @@ export interface CSSProperties extends CSS.Properties { * when debugging, and a good alternative to 'semantic' classnames. */ label?: string; - // for now just allow everything as a fallback - [propertyName: string]: any; } export interface StyleAttribute { diff --git a/package.json b/package.json index 988b968..d380254 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ } }, "dependencies": { - "csstype": "^2.0.0", + "csstype": "^2.4.0", "fbjs": "^0.8.12", "inline-style-prefixer": "^3.0.6", "object-assign": "^4.1.1", diff --git a/yarn.lock b/yarn.lock index 73c36b3..ddd1660 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1721,9 +1721,9 @@ css-in-js-utils@^1.0.3: dependencies: hyphenate-style-name "^1.0.2" -csstype@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.0.0.tgz#7d199dd8dca409077e81569eca0c71a74c4f4158" +csstype@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.4.0.tgz#6c7d711cc135dcd90c812a80213eab006fc1acff" currently-unhandled@^0.4.1: version "0.4.1"