mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Changed Immutable version to match Theo
This commit is contained in:
4
types/theo/index.d.ts
vendored
4
types/theo/index.d.ts
vendored
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Pete Petrash <https://github.com/petekp>
|
||||
// Niko Laitinen <https://github.com/laitine>
|
||||
// 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;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"immutable": "4.0.0-rc.12"
|
||||
"immutable": "3.8.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"]);
|
||||
|
||||
Reference in New Issue
Block a user