代码中有Array扩展代码,会导致编辑器显示异常

在2.1.1编辑器中,项目内有如下代码:
interface Array {
erase(item: T): T;
}

Array.prototype.erase = function (this: T[], item: T): T[] {
let index = this.indexOf(item);
if (index == -1) return null;
return this.splice(index, 1);
}
然后在编辑器随便选择一个材质,这个时候点击材质文件,材质属性无法正常显示,编辑器的资源管理器也不会再刷新,导致编辑器无法正常使用。
以下是测试项目:
test.zip (2.5 MB)