Skip to content

Commit a2e64e4

Browse files
LuniMoonclaude
andcommitted
Fix Flow missing-local-annot errors in AnchorGrid.js
Add type annotations to the rect and proportional parameters in the applyGridRect useCallback, which Flow cannot infer from local context. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent de28ebe commit a2e64e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

newIDE/app/src/BehaviorsEditor/Editors/AnchorGrid.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Tooltip from '@material-ui/core/Tooltip';
55
import LinkIcon from '../../UI/CustomSvgIcons/Link';
66
import UnlinkIcon from '../../UI/CustomSvgIcons/Unlink';
77
import {
8+
type GridRect,
89
propertiesToGridSelection,
910
getEndpointCells,
1011
handleCellClick,
@@ -56,7 +57,7 @@ const AnchorGrid = ({
5657
}
5758

5859
const applyGridRect = React.useCallback(
59-
(rect, proportional) => {
60+
(rect: GridRect | null, proportional: boolean) => {
6061
const properties = gridSelectionToProperties(rect, proportional);
6162
onUpdateProperty('leftEdgeAnchor', properties.leftEdgeAnchor);
6263
onUpdateProperty('rightEdgeAnchor', properties.rightEdgeAnchor);

0 commit comments

Comments
 (0)