Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong type definition of args of move function #108

Open
kouhei opened this issue Jan 31, 2022 · 0 comments
Open

Wrong type definition of args of move function #108

kouhei opened this issue Jan 31, 2022 · 0 comments

Comments

@kouhei
Copy link

kouhei commented Jan 31, 2022

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, ...
@kouhei kouhei changed the title Type definition of arg of move function is wrong Wrong type definition of args of move function Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant