From 9b67951536f25fe66073e6f5e5af91133424fed6 Mon Sep 17 00:00:00 2001 From: Guillaume Roux Date: Thu, 13 Jun 2024 11:22:17 +0200 Subject: [PATCH] silence typescript error --- packages/snaps-simulator/src/features/simulation/slice.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/snaps-simulator/src/features/simulation/slice.ts b/packages/snaps-simulator/src/features/simulation/slice.ts index 5965889af0..f66d0ef6b6 100644 --- a/packages/snaps-simulator/src/features/simulation/slice.ts +++ b/packages/snaps-simulator/src/features/simulation/slice.ts @@ -15,7 +15,7 @@ import type { SnapRpcHookArgs, VirtualFile, } from '@metamask/snaps-utils'; -import type { Draft, PayloadAction } from '@reduxjs/toolkit'; +import type { PayloadAction } from '@reduxjs/toolkit'; import { createAction, createSelector, @@ -118,9 +118,8 @@ const slice = createSlice({ state.icon = action.payload; }, setSnapInterface: (state, action: PayloadAction) => { - // `immer` does not work well with generic types, so we have to cast. - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion - state.snapInterface = action.payload as Draft; + // @ts-expect-error `immer` does not work well with generic types. + state.snapInterface = action.payload; }, setSnapInterfaceState: (state, action: PayloadAction) => { if (state.snapInterface) {