Skip to content

Commit

Permalink
stash
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed May 21, 2024
1 parent 4abeca0 commit 48b603d
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 9 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ module.exports = {
{
files: ['*.ts'],
extends: ['@metamask/eslint-config-typescript'],
rules: {
'import/no-useless-path-segments': 'off',
}
},

{
Expand Down Expand Up @@ -35,8 +38,8 @@ module.exports = {
],

ignorePatterns: [
'!.eslintrc.js',
'!.prettierrc.js',
'!.eslintrc.cjs',
'!.prettierrc.cjs',
'dist/',
'docs/',
'.yarn/',
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
"type": "git",
"url": "https://github.com/MetaMask/superstruct.git"
},
"type": "module",
"license": "MIT",
"sideEffects": false,
"type": "module",
"exports": {
".": {
"import": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ export type {
Optionalize,
PickBy,
Simplify,
UnionToIntersection
UnionToIntersection,
} from './utils.js';
9 changes: 8 additions & 1 deletion test/typings/optional.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { assert, optional, string, number, object, enums } from '../../src/index.js';
import {
assert,
optional,
string,
number,
object,
enums,
} from '../../src/index.js';
import { test } from '../index.test.js';

test<string | undefined>((value) => {
Expand Down
10 changes: 9 additions & 1 deletion test/typings/size.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { assert, size, string, array, number, map, set } from '../../src/index.js';
import {
assert,
size,
string,
array,
number,
map,
set,
} from '../../src/index.js';
import { test } from '../index.test.js';

test<number>((value) => {
Expand Down
9 changes: 8 additions & 1 deletion test/validation/dynamic/invalid-reference.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { assert, type, dynamic, literal, number, string } from '../../../src/index.js';
import {
assert,
type,
dynamic,
literal,
number,
string,
} from '../../../src/index.js';

const Entity = type({
object: string(),
Expand Down
9 changes: 8 additions & 1 deletion test/validation/dynamic/valid-reference.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { assert, type, dynamic, literal, string, number } from '../../../src/index.js';
import {
assert,
type,
dynamic,
literal,
string,
number,
} from '../../../src/index.js';

const Entity = type({
object: string(),
Expand Down
8 changes: 7 additions & 1 deletion test/validation/union/coercion-object.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { union, string, number, defaulted, object } from '../../../src/index.js';
import {
union,
string,
number,
defaulted,
object,
} from '../../../src/index.js';

const First = string();
const Second = object({ a: number(), b: defaulted(number(), 5) });
Expand Down

0 comments on commit 48b603d

Please sign in to comment.