Added types in TouchHistoryMath (#48730)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48730

Changelog:
[General][Changed] - Added types in TouchHistoryMath

Reviewed By: rshest

Differential Revision: D68271085

fbshipit-source-id: b5ce3134d7bd7cb23b94761079d1d7753aaa97c1
This commit is contained in:
Dawid Małecki
2025-01-17 07:27:42 -08:00
committed by Facebook GitHub Bot
parent e39776b1b8
commit b9df812b67
2 changed files with 27 additions and 1 deletions
@@ -151,6 +151,32 @@ const TouchHistoryMath = {
},
noCentroid: -1,
} as {
centroidDimension: (
touchHistory: TouchHistoryMath,
touchesChangedAfter: number,
isXAxis: boolean,
ofCurrent: boolean,
) => number,
currentCentroidXOfTouchesChangedAfter: (
touchHistory: TouchHistoryMath,
touchesChangedAfter: number,
) => number,
currentCentroidYOfTouchesChangedAfter: (
touchHistory: TouchHistoryMath,
touchesChangedAfter: number,
) => number,
previousCentroidXOfTouchesChangedAfter: (
touchHistory: TouchHistoryMath,
touchesChangedAfter: number,
) => number,
previousCentroidYOfTouchesChangedAfter: (
touchHistory: TouchHistoryMath,
touchesChangedAfter: number,
) => number,
currentCentroidX: (touchHistory: TouchHistoryMath) => number,
currentCentroidY: (touchHistory: TouchHistoryMath) => number,
noCentroid: number,
};
module.exports = TouchHistoryMath;
@@ -5539,7 +5539,7 @@ exports[`public API should not change unintentionally Libraries/Interaction/Touc
) => number,
currentCentroidX: (touchHistory: TouchHistoryMath) => number,
currentCentroidY: (touchHistory: TouchHistoryMath) => number,
noCentroid: $FlowFixMe,
noCentroid: number,
};
declare module.exports: TouchHistoryMath;
"