diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/reducer.ts b/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/reducer.ts index fb3e26157ef32a..3931f4b10af994 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/reducer.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/reducer.ts @@ -90,7 +90,7 @@ export const policyDetailsReducer: Reducer = ( if (action.type === 'userChangedPolicyConfig') { const newState = { ...state, policyItem: { ...(state.policyItem as PolicyData) } }; - const newPolicy = (newState.policyItem.inputs[0].config.policy.value = { + const newPolicy: any = (newState.policyItem.inputs[0].config.policy.value = { ...fullPolicy(state), }); diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/types.ts b/x-pack/plugins/endpoint/public/applications/endpoint/types.ts index dda50847169e7f..c7a29f03d1b5a1 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/types.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/types.ts @@ -97,7 +97,7 @@ export interface PolicyListState { /** * Policy details store state */ -export interface PolicyDetailsState { +export type PolicyDetailsState = Immutable<{ /** A single policy item */ policyItem?: PolicyData; /** API error if loading data failed */ @@ -112,7 +112,7 @@ export interface PolicyDetailsState { success: boolean; error?: ServerApiError; }; -} +}>; /** * Endpoint Policy configuration