Skip to content

Commit

Permalink
fix(💄): Minor TS improvement (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
wcandillon authored Sep 16, 2020
1 parent 2c75fc0 commit 45fb9a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,15 @@ export const interpolatePath = <T extends number[]>(

export const move = (x: number, y: number) => {
"worklet";
return { type: SVGCommand.MOVE, x, y };
return { type: SVGCommand.MOVE as const, x, y };
};

export const curve = (c: Omit<Curve, "type">) => {
"worklet";
return { type: SVGCommand.CURVE, c1: c.c1, c2: c.c2, to: c.to };
return { type: SVGCommand.CURVE as const, c1: c.c1, c2: c.c2, to: c.to };
};

export const close = () => {
"worklet";
return { type: SVGCommand.CLOSE };
return { type: SVGCommand.CLOSE as const };
};

0 comments on commit 45fb9a2

Please sign in to comment.