From e83edb718ecda3f1f7b23a4600cdbbc8b60617d7 Mon Sep 17 00:00:00 2001 From: nlaitine Date: Fri, 1 Feb 2019 19:38:14 +0200 Subject: [PATCH] Loosen Transform and ValueTransform to string to allow registered custom values --- types/theo/index.d.ts | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/types/theo/index.d.ts b/types/theo/index.d.ts index 3ff3770fdd..ffc5dceaf7 100644 --- a/types/theo/index.d.ts +++ b/types/theo/index.d.ts @@ -35,17 +35,6 @@ export type Format = | "android.xml" | "aura.tokens"; -export type Transform = "raw" | "ios" | "android" | "web"; - -export type ValueTransform = - | "color/rgb" - | "color/hex" - | "color/hex8rgba" - | "color/hex8argb" - | "percentage/float" - | "relative/pixel" - | "relative/pixelValue"; - export function convert(options: ConvertOptions): Promise; export function convertSync(options: ConvertOptions): string; export function registerFormat( @@ -53,11 +42,11 @@ export function registerFormat( format: FormatResultFn | string ): void; export function registerTransform( - name: Transform, - valueTransforms: ValueTransform[] + name: string, + valueTransforms: string[] ): void; export function registerValueTransform( - name: ValueTransform, + name: string, predicate: (prop: Prop) => boolean, transform: (prop: Prop) => string | number ): void; @@ -90,7 +79,7 @@ export interface ConvertOptions { } export interface TransformOptions { - type?: Transform; + type?: string; file: string; data?: string; }