使用'<>'进行断言被禁止,使用"as"代替? [英] Type assertion using the '<>' is forbidden,use 'as' instead?
本文介绍了使用'<>'进行断言被禁止,使用"as"代替?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的规格中有以下测试用例,
I have the following test case in my spec,
it (should create,()=>{
const url = (<jasmine.spy> http.get).calls.args(0)[0]
expect(url).toBe('/api/get')
});
运行它时,出现以下棉绒错误.
When I run it, I am getting the following lint error.
Type assertion using the '<>' is forbidden, use as instead?
任何人都可以建议帮助.
Can anyone please suggest help.
推荐答案
查看全文