Skip to content

Commit

Permalink
Added types in TouchHistoryMath (#48730)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #48730

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

Reviewed By: rshest

Differential Revision: D68271085

fbshipit-source-id: b5ce3134d7bd7cb23b94761079d1d7753aaa97c1
  • Loading branch information
coado authored and facebook-github-bot committed Jan 17, 2025
1 parent e39776b commit b9df812
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions packages/react-native/Libraries/Interaction/TouchHistoryMath.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Original file line number Diff line number Diff line change
Expand Up @@ -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;
"
Expand Down

0 comments on commit b9df812

Please sign in to comment.