diff --git a/types/theo/index.d.ts b/types/theo/index.d.ts index 870123fadc..3747a69fcf 100644 --- a/types/theo/index.d.ts +++ b/types/theo/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Pete Petrash // Niko Laitinen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.2.4 +// TypeScript Version: 3.2 import { Collection, Map, List, OrderedMap } from "immutable"; @@ -70,6 +70,8 @@ export type FormatResultFn = (result: ImmutableStyleMap) => string; export interface StyleMap { aliases: Aliases; + global?: Props; + imports?: string[]; props: Props; meta: Meta; options: object; diff --git a/types/theo/package.json b/types/theo/package.json index 6c119dd781..33339a3f75 100644 --- a/types/theo/package.json +++ b/types/theo/package.json @@ -1,6 +1,6 @@ { "private": true, "dependencies": { - "immutable": "4.0.0-rc.12" + "immutable": "3.8.2" } } diff --git a/types/theo/theo-tests.ts b/types/theo/theo-tests.ts index 154817793f..d7692e4265 100644 --- a/types/theo/theo-tests.ts +++ b/types/theo/theo-tests.ts @@ -21,11 +21,12 @@ theo.registerFormat( ); theo.registerValueTransform( - "relative/pixelValue", - prop => prop.get("category") === "sizing", + "easing/web", + prop => prop.get("category") === "easing", prop => { - // @ts-ignore: prop can be undefined - const value = prop.get("value").toString(); - return parseFloat(value.replace(/rem/g, "")) * 16; + const [x1, y1, x2, y2] = prop.get("value").toArray(); + return `cubic-bezier(${x1}, ${y1}, ${x2}, ${y2})`; } ); + +theo.registerTransform("web", ["color/rgb", "easing/web"]);