Skip to content

Commit

Permalink
Revert superstruct imports causing build errors to `@metamask/super…
Browse files Browse the repository at this point in the history
…struct`
  • Loading branch information
MajorLift committed Jul 29, 2024
1 parent 4c37099 commit b691559
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/assert.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { string, assert as superstructAssert } from 'superstruct';
import { string, assert as superstructAssert } from '@metamask/superstruct';

import {
assert,
Expand Down
4 changes: 2 additions & 2 deletions src/assert.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Struct } from 'superstruct';
import { assert as assertSuperstruct } from 'superstruct';
import type { Struct } from '@metamask/superstruct';
import { assert as assertSuperstruct } from '@metamask/superstruct';

import { getErrorMessage } from './errors';

Expand Down
4 changes: 2 additions & 2 deletions src/json.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/consistent-type-definitions */

import type { Infer } from 'superstruct';
import { boolean, number, optional, string } from 'superstruct';
import type { Infer } from '@metamask/superstruct';
import { boolean, number, optional, string } from '@metamask/superstruct';
import { expectAssignable, expectNotAssignable } from 'tsd';

import type { Json } from '.';
Expand Down
2 changes: 1 addition & 1 deletion src/json.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
max,
number,
optional,
} from 'superstruct';
} from '@metamask/superstruct';

import {
assert,
Expand Down
7 changes: 4 additions & 3 deletions src/json.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type {
Context,
Infer,
ObjectSchema,
Simplify,
Optionalize,
Simplify,
} from '@metamask/superstruct';
import {
any,
Expand All @@ -23,8 +25,7 @@ import {
union,
unknown,
Struct,
} from 'superstruct';
import type { Context, Infer } from 'superstruct';
} from '@metamask/superstruct';

import type { AssertionErrorConstructor } from './assert';
import { assertStruct } from './assert';
Expand Down

0 comments on commit b691559

Please sign in to comment.