0
如果我有這個常量,其中的值是所有的功能:打字稿類型包含另一種類型的密鑰,但有不同的值類型
export const staffingReducers = {
calendar: calendarReducer,
navigation: navigationReducer,
shifts: shiftsReducer,
};
我有一個接口定義爲這樣:
export interface StaffingState {
calendar: CalendarState;
navigation: NavigationState;
shifts: ShiftState;
selectedId: number;
}
我想強制執行,我的人員編制人員與StaffingState具有相同的密鑰。這可能嗎?
這就是我一直在尋找,我要的錯誤!謝謝! –