Skip to content

Commit

Permalink
fix: add @ts-expect-error comment
Browse files Browse the repository at this point in the history
  • Loading branch information
SegaraRai committed Jun 16, 2024
1 parent d9dc3df commit ecedd50
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/widget/rtl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { JSX as PreactJSX } from "preact";

export function isRTLLanguage(language: string): boolean {
const locale = new Intl.Locale(language);
// @ts-expect-error
// @ts-expect-error textInfo is not in the TypeScript type
const textInfo = locale.getTextInfo?.() ?? locale.textInfo;
return textInfo?.direction === "rtl";
}
Expand All @@ -15,7 +15,7 @@ export function createLogicalComponent<T extends "rect" | "text" | "use">(
const Tag = tagName;
if (!flip) {
return (props: PreactJSX.SVGAttributes<SVGElementTagNameMap[T]>) => (
// @ts-expect-error
// @ts-expect-error Property type mismatch due to the usage of a template
<Tag {...props} />
);
}
Expand All @@ -31,7 +31,7 @@ export function createLogicalComponent<T extends "rect" | "text" | "use">(
? "start"
: textAnchor;

// @ts-expect-error
// @ts-expect-error Property type mismatch due to the usage of a template
return <Tag {...props} x={x} text-anchor={flippedTextAnchor} />;
};
}

0 comments on commit ecedd50

Please sign in to comment.