From 1bc3e7f205e8f33532931f6f725a6f0501eb5c45 Mon Sep 17 00:00:00 2001 From: taoqf Date: Tue, 26 Mar 2019 16:23:13 +0800 Subject: [PATCH 1/4] add types --- index.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..a714e9e --- /dev/null +++ b/index.d.ts @@ -0,0 +1,8 @@ +export interface Style { + [key: string]: string; +} + +export function getPropertyName(name: string): string; +export function getStylesForProperty(name: string, value: string): Style; + +export default function transform(css: Array<[string, string]>, output?: string[], getStylesForProperty?: boolean): Style; From 9a4618af7fd7d0c46768d53b858700f1124a6296 Mon Sep 17 00:00:00 2001 From: Jacob Parker Date: Tue, 9 Apr 2019 16:24:10 +0800 Subject: [PATCH 2/4] Update index.d.ts Co-Authored-By: taoqf --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index a714e9e..ebad116 100644 --- a/index.d.ts +++ b/index.d.ts @@ -5,4 +5,4 @@ export interface Style { export function getPropertyName(name: string): string; export function getStylesForProperty(name: string, value: string): Style; -export default function transform(css: Array<[string, string]>, output?: string[], getStylesForProperty?: boolean): Style; +export default function transform(css: Array<[string, string]>, shorthandBlacklist?: string[]): Style; From 92f7a31f07c42b08555e4e6ec3a6c697d2077439 Mon Sep 17 00:00:00 2001 From: taoqf Date: Tue, 9 Apr 2019 16:27:46 +0800 Subject: [PATCH 3/4] add argument --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index ebad116..e6bee0f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -3,6 +3,6 @@ export interface Style { } export function getPropertyName(name: string): string; -export function getStylesForProperty(name: string, value: string): Style; +export function getStylesForProperty(name: string, value: string, allowShorthand?: boolean): Style; export default function transform(css: Array<[string, string]>, shorthandBlacklist?: string[]): Style; From 0b8f75f319f8fbb30d72de4ba8b80e69f5f402af Mon Sep 17 00:00:00 2001 From: taoqf Date: Mon, 22 Apr 2019 10:56:08 +0800 Subject: [PATCH 4/4] fix: types --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index e6bee0f..5eef97a 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,5 +1,5 @@ export interface Style { - [key: string]: string; + [key: string]: string | number | Style; } export function getPropertyName(name: string): string;