Skip to content

Wrong type definition of args of move function #108

Open
@kouhei

Description

@kouhei

Description

2nd and 3rd args of move function(defined at mock-interactions.js) are expected non-nullable objects have x and y properties.

export function move(node, fromXY, toXY, steps) {
  steps = steps || 5;
  var dx = Math.round((fromXY.x - toXY.x) / steps);
  var dy = Math.round((fromXY.y - toXY.y) / steps);
...

But according to type definition (mock-interactions.d.ts), it is nullable.

declare function move(node: Element, fromXY: object|null, toXY: object|null, ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions