Skip to content

Commit

Permalink
Merge branch 'main' into wcandillon-patch-52
Browse files Browse the repository at this point in the history
  • Loading branch information
wcandillon authored Dec 18, 2024
2 parents 0e4e74f + b7a55c5 commit 1869fc9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/skia/src/skia/types/RRect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ export interface NonUniformRRect {
export type InputRRect = SkRRect | NonUniformRRect;

// We have an issue to check property existence on JSI backed instances
export const isRRect = (def: SkRect | SkRRect): def is SkRRect =>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(def as any).rect !== undefined;
export const isRRect = (def: unknown): def is SkRRect => {
"worklet";
return (
typeof def === "object" &&
def !== null &&
// eslint-disable-next-line @typescript-eslint/no-explicit-any
typeof (def as any).rect === "object"
);
};

0 comments on commit 1869fc9

Please sign in to comment.