Fix TypeScript error in SwipeTabs TouchList type

Use React.TouchList and React.Touch types instead of native DOM types
to resolve type compatibility issue.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-21 23:10:53 +01:00
parent e83d62a240
commit e15b8ecd58

View File

@@ -28,10 +28,10 @@ const EDGE_RESISTANCE = 0.35;
const DEFAULT_THRESHOLD = 0.2;
const DEFAULT_RENDER_WINDOW = 1;
const findTouchById = (touches: TouchList, id: number) => {
const findTouchById = (touches: React.TouchList, id: number): React.Touch | null => {
for (let i = 0; i < touches.length; i += 1) {
const touch = touches[i];
if (touch.identifier === id) {
const touch = touches.item(i);
if (touch && touch.identifier === id) {
return touch;
}
}