react-dnd-scrolling icon indicating copy to clipboard operation
react-dnd-scrolling copied to clipboard

StrengthFuncton wrong type for point argument

Open KirillZhdanov opened this issue 3 years ago • 3 comments

StrengthFuncton wrong type for point argument, currently it's not number as specified, but {x:number, y:number}. I believe it should be smth like:

interface Point {
   x: number;
   y: number:
}

And also I guess StrengthFuncton should be StrengthFunction

export type StrengthFunction = (box: BoxType, point: Point) => number;

KirillZhdanov avatar Nov 23 '22 14:11 KirillZhdanov

which package is the type being defined?

ttt43ttt avatar Nov 23 '22 15:11 ttt43ttt

Here is the path: https://github.com/TechStark/react-dnd-scrolling/blob/develop/types/index.d.ts Screen Shot 2022-11-23 at 21 57 30

KirillZhdanov avatar Nov 23 '22 18:11 KirillZhdanov

@KirillZhdanov would you like to create a PR to fix it?

ttt43ttt avatar Nov 28 '22 08:11 ttt43ttt

@KirillZhdanov Updated in https://github.com/TechStark/react-dnd-scrolling/releases/tag/v1.3.0 Thanks for your reporting.

ttt43ttt avatar Dec 15 '22 06:12 ttt43ttt