类型 'Dictionary<T>' 没有调用签名。打字稿,ngRx

Type 'Dictionary<T>' has no call signature. TypeScript, ngRx

我正在尝试使用 ngRx 准备信用卡应用程序。我已经设置了我的动作、减速器和效果,但是在我的减速器结束时,当我试图访问信用卡 ID 时,我遇到了上述错误。错误是实体没有回调。

    export const getCurrentCreditCard = createSelector(
    getCreditCardFeatureState,
    getCurrentCreditCardId,
    state => state.entities(state.selectedCreditCardId)
    );

代码有点多...请这里是 link 到 git 仓库。 https://github.com/ProgrammeMitch/credit_card_store_ngrx 请帮助

我对ngrx不太熟悉,但错误似乎表明state.entities不是方法,而是Dictionary

我想也许你只需要使用方括号:

state => state.entities[state.selectedCreditCardId]