Skip to content

Commit 826bb5e

Browse files
committed
chore: update types
1 parent b1e9e01 commit 826bb5e

File tree

3 files changed

+223
-8
lines changed

3 files changed

+223
-8
lines changed

package-lock.json

Lines changed: 219 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
"typescript": "^3.9.7"
3131
},
3232
"dependencies": {
33-
"expression-globals-typescript": "^3.0.0"
33+
"expression-globals-typescript": "^3.1.3"
3434
}
3535
}

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ import {
44
Vector2D,
55
Points,
66
PathValue,
7+
SourceText,
78
} from 'expression-globals-typescript';
89

910
// Creating layer and property mocks
1011
const thisLayer = new Layer();
1112
const thisProperty = new PathProperty<PathValue>([[0, 0]]);
13+
const textProperty = new SourceText('string');
1214

1315
// eBox types
1416
type Anchor = 'topLeft' | 'topRight' | 'bottomRight' | 'bottomLeft' | 'center';
@@ -89,9 +91,7 @@ function createBox({
8991
}
9092

9193
function pointsToComp(points: Points): Points {
92-
return points.map(
93-
(point): Vector2D => thisLayer.fromCompToSurface(point) as Vector2D
94-
) as Points;
94+
return points.map((point): Vector2D => thisLayer.fromComp(point)) as Points;
9595
}
9696
function pointsToPath(points: Points, isClosed: boolean) {
9797
return thisProperty.createPath(points, [], [], isClosed);

0 commit comments

Comments
 (0)