Skip to content

Commit

Permalink
Switch off ts-expect-error on flaky immer error
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed Aug 2, 2024
1 parent a4e3b10 commit 8471981
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ export class SubjectMetadataController extends BaseController<
*/
trimMetadataState(): void {
this.update((draftState) => {
// @ts-expect-error ts(2589)
// 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)
return SubjectMetadataController.getTrimmedState(

Check failure on line 240 in packages/permission-controller/src/SubjectMetadataController.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Build (20.x)

Type instantiation is excessively deep and possibly infinite.

Check failure on line 240 in packages/permission-controller/src/SubjectMetadataController.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Build (20.x)

Type instantiation is excessively deep and possibly infinite.

Check failure on line 240 in packages/permission-controller/src/SubjectMetadataController.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Build (20.x)

Type instantiation is excessively deep and possibly infinite.

Check failure on line 240 in packages/permission-controller/src/SubjectMetadataController.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Build (20.x)

Type instantiation is excessively deep and possibly infinite.
draftState,
this.subjectHasPermissions,
Expand Down

0 comments on commit 8471981

Please sign in to comment.