-
-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
739b9a4
commit f178218
Showing
346 changed files
with
825 additions
and
750 deletions.
There are no files selected for viewing
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
library/src/error/ValiError.ts → library/src/error/ValiError/ValiError.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import type { PathItem } from '../types'; | ||
import type { PathItem } from '../../types'; | ||
|
||
/** | ||
* Issue reason type. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './ValiError'; |
2 changes: 1 addition & 1 deletion
2
library/src/error/flatten.test.ts → library/src/error/flatten/flatten.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
library/src/error/flatten.ts → library/src/error/flatten/flatten.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './flatten'; |
4 changes: 2 additions & 2 deletions
4
library/src/methods/coerce.test.ts → library/src/methods/coerce/coerce.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
library/src/methods/coerce.ts → library/src/methods/coerce/coerce.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
library/src/methods/coerceAsync.test.ts → ...ry/src/methods/coerce/coerceAsync.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
library/src/methods/coerceAsync.ts → library/src/methods/coerce/coerceAsync.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './coerce'; | ||
export * from './coerceAsync'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,12 @@ | ||
export * from './coerce'; | ||
export * from './coerceAsync'; | ||
export * from './keyof'; | ||
export { merge } from './merge'; | ||
export * from './mergeAsync'; | ||
export { omit } from './omit'; | ||
export * from './omitAsync'; | ||
export * from './merge'; | ||
export * from './omit'; | ||
export * from './parse'; | ||
export * from './parseAsync'; | ||
export * from './partial'; | ||
export * from './partialAsync'; | ||
export * from './pick'; | ||
export * from './pickAsync'; | ||
export * from './required'; | ||
export * from './requiredAsync'; | ||
export * from './safeParse'; | ||
export * from './safeParseAsync'; | ||
export * from './transform'; | ||
export * from './transformAsync'; | ||
export * from './unwrap'; | ||
export * from './useDefault'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './keyof'; |
4 changes: 2 additions & 2 deletions
4
library/src/methods/keyof.test.ts → library/src/methods/keyof/keyof.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './merge'; | ||
export * from './mergeAsync'; |
8 changes: 4 additions & 4 deletions
8
library/src/methods/merge.test.ts → library/src/methods/merge/merge.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
library/src/methods/mergeAsync.test.ts → library/src/methods/merge/mergeAsync.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { ObjectSchema, ObjectSchemaAsync } from '../../schemas'; | ||
|
||
/** | ||
* Merges schema objects types. | ||
*/ | ||
export type MergeSchemaObjects< | ||
TObjectSchemas extends (ObjectSchema<any> | ObjectSchemaAsync<any>)[] | ||
> = TObjectSchemas extends [infer TFirstObjectSchema] | ||
? TFirstObjectSchema extends ObjectSchema<any> | ObjectSchemaAsync<any> | ||
? TFirstObjectSchema['object'] | ||
: never | ||
: TObjectSchemas extends [ | ||
infer TFirstObjectSchema, | ||
...infer TRestObjectSchemas | ||
] | ||
? TFirstObjectSchema extends ObjectSchema<any> | ObjectSchemaAsync<any> | ||
? TRestObjectSchemas extends (ObjectSchema<any> | ObjectSchemaAsync<any>)[] | ||
? { | ||
[TKey in Exclude< | ||
keyof TFirstObjectSchema['object'], | ||
keyof MergeSchemaObjects<TRestObjectSchemas> | ||
>]: TFirstObjectSchema['object'][TKey]; | ||
} & MergeSchemaObjects<TRestObjectSchemas> | ||
: never | ||
: never | ||
: never; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './omit'; | ||
export * from './omitAsync'; |
8 changes: 4 additions & 4 deletions
8
library/src/methods/omit.test.ts → library/src/methods/omit/omit.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 4 additions & 15 deletions
19
library/src/methods/omit.ts → library/src/methods/omit/omit.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
library/src/methods/omitAsync.test.ts → library/src/methods/omit/omitAsync.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { ObjectSchema, ObjectSchemaAsync } from '../../schemas'; | ||
|
||
/** | ||
* Object keys type. | ||
*/ | ||
export type ObjectKeys< | ||
TObjectSchema extends ObjectSchema<any> | ObjectSchemaAsync<any> | ||
> = [keyof TObjectSchema['object'], ...(keyof TObjectSchema['object'])[]]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './parse'; | ||
export * from './parseAsync'; |
2 changes: 1 addition & 1 deletion
2
library/src/methods/parse.test.ts → library/src/methods/parse/parse.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
library/src/methods/parse.ts → library/src/methods/parse/parse.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
library/src/methods/parseAsync.test.ts → library/src/methods/parse/parseAsync.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
library/src/methods/parseAsync.ts → library/src/methods/parse/parseAsync.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './partial'; | ||
export * from './partialAsync'; |
6 changes: 3 additions & 3 deletions
6
library/src/methods/partial.test.ts → library/src/methods/partial/partial.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
library/src/methods/partialAsync.test.ts → .../src/methods/partial/partialAsync.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './pick'; | ||
export * from './pickAsync'; |
6 changes: 3 additions & 3 deletions
6
library/src/methods/pick.test.ts → library/src/methods/pick/pick.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.