Skip to content

Commit 0ff3957

Browse files
authored
Add all types in the utils submodule as package-level exports (#25)
## Motivation `snaps` repos have continued to expand its usage of `utils` types in the `superstruct` package. Unfortunately, the workaround of importing from `superstruct/dist/utils` is no longer available in the `@metamask/superstruct` fork, so importing new `utils` types will require new version releases going forward. To prevent this from blocking downstream development, this commit adds all currently available types in the `utils` submodule as package-level exports. ## Description - Newly exports the following types: `Assign`, `If`, `IsUnion`, `ObjectType`, `PartialObjectSchema`, `StructSchema`, `TupleSchema` ## References - Closes #26 - Blocking MetaMask/snaps#2445 - Blocking MetaMask/snaps#2514
1 parent 4a2a7b0 commit 0ff3957

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Newly exports the following types: `Assign`, `If`, `IsUnion`, `ObjectType`, `PartialObjectSchema`, `StructSchema`, `TupleSchema` ([#25](https://github.com/MetaMask/superstruct/pull/25)).
13+
1014
## [3.0.0]
1115

1216
### Added

src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,23 @@ export * from './structs/types.js';
66
export * from './structs/utilities.js';
77
export type {
88
AnyStruct,
9+
Assign,
910
EnumSchema,
11+
If,
1012
InferStructTuple,
1113
IsExactMatch,
1214
IsMatch,
1315
IsRecord,
1416
IsTuple,
17+
IsUnion,
1518
ObjectSchema,
19+
ObjectType,
1620
OmitBy,
1721
Optionalize,
22+
PartialObjectSchema,
1823
PickBy,
1924
Simplify,
25+
StructSchema,
26+
TupleSchema,
2027
UnionToIntersection,
2128
} from './utils.js';

0 commit comments

Comments
 (0)