You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@return
*/
export function findFreePosition(source: Shape, element: Shape, position: Point, getNextPosition: (element: Element, position: Point, connectedAtPosition: Element) => Element): Point;
return type of getNextPosition seems need to be Point, but now is Element
Steps to Reproduce
return findFreePosition(
source,
element,
position,
generateGetNextPosition(nextPositionDirection),
)
will report compilation errors in ts :
Argument of type '(element: Element, previousPosition: Point, connectedAtPosition: Element) => Point' is not assignable to parameter of type '(element: Element, position: Point, connectedAtPosition: Element) => Element'.
Type 'Point' is not assignable to type 'Element'.
Property 'id' is missing in type 'Point' but required in type '{ id: string; businessObject?: any; }'.
Describe the Bug
in diagram-js\lib\features\auto-place\AutoPlaceUtil.d.ts
/**
*/
export function findFreePosition(source: Shape, element: Shape, position: Point, getNextPosition: (element: Element, position: Point, connectedAtPosition: Element) => Element): Point;
return type of getNextPosition seems need to be Point, but now is Element
Steps to Reproduce
return findFreePosition(
source,
element,
position,
generateGetNextPosition(nextPositionDirection),
)
will report compilation errors in ts :
Argument of type '(element: Element, previousPosition: Point, connectedAtPosition: Element) => Point' is not assignable to parameter of type '(element: Element, position: Point, connectedAtPosition: Element) => Element'.
Type 'Point' is not assignable to type 'Element'.
Property 'id' is missing in type 'Point' but required in type '{ id: string; businessObject?: any; }'.
71 generateGetNextPosition(nextPositionDirection),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered: