【发布时间】:2018-10-24 04:09:10
【问题描述】:
编译器选项: “noUnusedLocals”:是的, “noUnusedParameters”:真, 不在功能中工作。例如我收到错误:
export class AllReduxSagas {
[ts] 属性 'someService' 已声明,但从未读取其值。
constructor(private someService: SomeService) {}
watchSaga = function* watchSaga() {
yield takeEvery(ACTION_TYPE.SOME_ACTION, this.someSaga, this.someService);
};
...
}
someService 无法被编译器识别,但是当我删除上述编译器选项时 - 一切正常。 为什么会发生这种情况,以及如何解决这个问题。
【问题讨论】:
标签: angular typescript visual-studio-code redux-saga