could you rewrite this ngrx reducer to the current format:

"export function reducer(state = initialState, action): State {
  switch (action.type) {
    // case workspace.ActionTypes.RESET_STATE:
    // case workspace.ActionTypes.SELECT_WORKSPACE:
    //   return initialState;

    case nitTransportStream.ActionTypes.DELETE_NIT_TRANSPORTSTREAM_SUCCESS:
      return Object.assign({}, state, {
        isSaving: false,
        item: null
      });

    case nitTransportStream.ActionTypes.REQUEST_NIT_TRANSPORTSTREAM_DETAILS:
      return Object.assign({}, state, {
        isLoading: true,
      });

    case nitTransportStream.ActionTypes.REQUEST_NIT_TRANSPORTSTREAM_DETAILS_FAIL:
      return Object.assign({}, state, {
        isLoading: false,
      });

    case nitTransportStream.ActionTypes.REQUEST_NIT_TRANSPORTSTREAM_DETAILS_SUCCESS:
      return Object.assign({}, state, {
        isLoading: false,
        item: action.payload.detail,
        descriptors: action.payload.descriptors
      });

    case nitTransportStream.ActionTypes.SELECT_NEW_NIT_TRANSPORTSTREAM:
      return Object.assign({}, state, {
        item: action.payload,
        descriptors: null
      });

    case nitTransportStream.ActionTypes.ADD_NIT_TRANSPORTSTREAM:
    case nitTransportStream.ActionTypes.UPDATE_NIT_TRANSPORTSTREAM:
    case nitTransportStream.ActionTypes.DELETE_NIT_TRANSPORTSTREAM:
      return Object.assign({}, state, {
        isSaving: true
      });

    case nitTransportStream.ActionTypes.ADD_NIT_TRANSPORTSTREAM_SUCCESS:
      const tempPayload: any = action.payload;
      return Object.assign({}, state, {
        isSaving: false,
        item: tempPayload.nitTransportStreamDetail,
        descriptors: Map<string, Descriptor>()
      });

    case nitTransportStream.ActionTypes.ADD_NIT_TRANSPORTSTREAM_FAIL:
    case nitTransportStream.ActionTypes.UPDATE_NIT_TRANSPORTSTREAM_FAIL:
    case nitTransportStream.ActionTypes.DELETE_NIT_TRANSPORTSTREAM_FAIL:
      return Object.assign({}, state, {
        isSaving: false
      });

    case nitTransportStream.ActionTypes.UPDATE_NIT_TRANSPORTSTREAM_SUCCESS:
      const tempPayload1: any = action.payload;
      return Object.assign({}, state, {
        isSaving: false,
        item: tempPayload1.nitTransportStreamDetail
      });

    case descriptor.ActionTypes.ADD_DESCRIPTOR_SUCCESS:
    case descriptor.ActionTypes.UPDATE_DESCRIPTOR_SUCCESS:
      if (action.payload.targetType === 'NitTransportStream' && action.payload.targetId === state.item.id) {
        return Object.assign({}, state, {
          descriptors: state.descriptors.set(action.payload.id, action.payload)
        });
      }
      return state;

    case descriptor.ActionTypes.DELETE_DESCRIPTOR_SUCCESS:
      if (action.payload.targetType === 'NitTransportStream' && action.payload.targetId === state.item.id) {
        return Object.assign({}, state, {
          descriptors: state.descriptors.delete(action.payload.id)
        });
      }
      return state;
    case descriptor.ActionTypes.MOVE_DESCRIPTOR_UP_SUCCESS:
    case descriptor.ActionTypes.MOVE_DESCRIPTOR_DOWN_SUCCESS:
      if (action.payload.targetType === 'NitTransportStream' && action.payload.targetId === state.item.id) {
        let newDescriptors = state.descriptors.set(action.payload.id, action.payload);
        newDescriptors = newDescriptors.set(action['payload2'].id, action['payload2']);
        return Object.assign({}, state, {
          descriptors: newDescriptors,
          isSaving: false,
        });
      }
      return state;

    default:
      return state;
  }
}"