From afb1f9758bee1f100c620b7f20573bff54793997 Mon Sep 17 00:00:00 2001 From: Jongsun Suh Date: Fri, 2 Aug 2024 02:06:51 -0400 Subject: [PATCH] Revert "Switch off `ts-expect-error` on flaky immer error" This reverts commit 8471981cf83a33cdf5a1c323f36c1153c98318a0. --- .../permission-controller/src/SubjectMetadataController.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/permission-controller/src/SubjectMetadataController.ts b/packages/permission-controller/src/SubjectMetadataController.ts index cab9758a69..be67943e4e 100644 --- a/packages/permission-controller/src/SubjectMetadataController.ts +++ b/packages/permission-controller/src/SubjectMetadataController.ts @@ -235,8 +235,7 @@ export class SubjectMetadataController extends BaseController< */ trimMetadataState(): void { this.update((draftState) => { - // Do not remove this comment - This error is flaky: Comment out or restore the `ts-expect-error` directive below as needed. - // // @ts-expect-error - Known issue: `Json` causes recursive error in immer `Draft`/`WritableDraft` types (See: https://github.com/MetaMask/utils/issues/168) + // @ts-expect-error ts(2589) return SubjectMetadataController.getTrimmedState( draftState, this.subjectHasPermissions,