1

我们必须调整现有代码以适应新的 tslint 规则并切换所有双引号和单引号的位置,例如以下代码段

 this.errorMsg = errorBody 
     +"<hr/><a href='"
     +error.url+"' target='_blank'>HTTP "
     +error.status
     +" "
     +error.statusText
     +"</a>";

应该看

this.errorMsg = errorBody
     +'<hr/><a href="'
     +error.url+'" target="_blank">HTTP '
     +error.status
     +' '
     +error.statusText
     +'</a>';

你的技巧包里有什么特别的吗?

像这样的东西会很棒:

在此处输入图像描述

4

0 回答 0