[英]NGRX reducer problem : Argument of type "X" is not assignable to parameter of type "Y"
[英]Error on drag and drop action on protractor typescript, Argument of type '“{x: 540, y: 504}”' is not assignable to parameter of type 'ILocation'
我需要有关此脚本的帮助,我在打字稿上的拖放操作遇到此错误。 任何想法如何解决这个问题?
browser.actions().
mouseDown(element(by.id('waze_map1')), '{x: 191, y: 56}').
mouseMove(element(by.id('waze_map1')), '{x: 540, y: 504}').
mouseUp().
perform();
发生了错误:
Argument of type '"{x: 540, y: 504}"' is not assignable to parameter of type 'ILocation'.ts(2345)
ILocation接口是{x:number,y:number}
但是您尝试设置字符串
变化:
browser.actions().
mouseDown(element(by.id('waze_map1')), '{x: 191, y: 56}').
mouseMove(element(by.id('waze_map1')), '{x: 540, y: 504}').
mouseUp().
perform();
至
browser.actions().
mouseDown(element(by.id('waze_map1')), '{x: 191, y: 56}').
mouseMove(element(by.id('waze_map1')), {x: 540, y: 504}).
mouseUp().
perform();
。 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.