我用这样的单元来嘲笑localStorage function storageMock() { ....
} 并将localStorage设置为 window.localStorage这是抛出错误的TypeError: Cannot set property localStorage of #<Window> which has only a g
/entity-manager/EntityManager";TypeError: Cannot set property EntityManager of #<Object> whichhas only a getter我试图将typeorm降级到0.2.0,但是我的postgres版本出现了问题。其他人也有同样的问题吗?
我正在使用getter和setter从web缓存中设置字段,但是当我尝试使用setter时,我会得到TypeError。错误是: ERROR TypeError: this.saveCache is not a function getter和setter如下: get saveCache (): any {(localStorage.getItem('saveCache'));
set saveCache(value