Skip to content

Commit

Permalink
adjust a few types
Browse files Browse the repository at this point in the history
  • Loading branch information
jordisala1991 committed Apr 18, 2024
1 parent d9cc7be commit 8c2291b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions plugin-src/transformers/partials/transformStrokes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -44,7 +42,7 @@ const getIndividualStrokes = (node: IndividualStrokesMixin): IndividualStrokesMi
};

export const transformStrokes = (
node: DefaultShapeMixin | (DefaultShapeMixin & IndividualStrokesMixin)
node: GeometryMixin | (GeometryMixin & IndividualStrokesMixin)
): Partial<ShapeAttributes> => {
return {
strokes: translateStrokes(
Expand Down

0 comments on commit 8c2291b

Please sign in to comment.