From 8c2291bada58e73fe481884b6dfeb5cbefc78ff7 Mon Sep 17 00:00:00 2001 From: Jordi Sala Morales Date: Thu, 18 Apr 2024 07:22:50 +0000 Subject: [PATCH] adjust a few types --- plugin-src/transformers/partials/transformStrokes.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugin-src/transformers/partials/transformStrokes.ts b/plugin-src/transformers/partials/transformStrokes.ts index 3cac58e1..4aaeb759 100644 --- a/plugin-src/transformers/partials/transformStrokes.ts +++ b/plugin-src/transformers/partials/transformStrokes.ts @@ -14,18 +14,16 @@ const isVectorLike = (node: GeometryMixin | VectorLikeMixin): node is VectorLike }; const isIndividualStrokes = ( - node: DefaultShapeMixin | IndividualStrokesMixin + node: GeometryMixin | IndividualStrokesMixin ): node is IndividualStrokesMixin => { return 'strokeTopWeight' in node; }; -const hasFillGeometry = (node: GeometryMixin | (GeometryMixin & VectorLikeMixin)): boolean => { +const hasFillGeometry = (node: GeometryMixin): boolean => { return node.fillGeometry.length > 0; }; -const getNodeStrokes = ( - node: DefaultShapeMixin | (DefaultShapeMixin & IndividualStrokesMixin) -): NodeStrokes => { +const getNodeStrokes = (node: GeometryMixin): NodeStrokes => { return { strokes: node.strokes, strokeWeight: node.strokeWeight, @@ -44,7 +42,7 @@ const getIndividualStrokes = (node: IndividualStrokesMixin): IndividualStrokesMi }; export const transformStrokes = ( - node: DefaultShapeMixin | (DefaultShapeMixin & IndividualStrokesMixin) + node: GeometryMixin | (GeometryMixin & IndividualStrokesMixin) ): Partial => { return { strokes: translateStrokes(