-
Notifications
You must be signed in to change notification settings - Fork 57
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
Evgeny Zakharov
committed
May 15, 2022
1 parent
ca8eb77
commit fd0b387
Showing
9 changed files
with
34 additions
and
32 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -18,3 +18,4 @@ node_modules | |
dist | ||
package-lock.json | ||
/*.d.ts | ||
!z.d.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
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 |
---|---|---|
@@ -1,5 +1,24 @@ | ||
/* eslint-disable import/export */ | ||
import * as z from './z' | ||
|
||
export * from './z' | ||
export { z } | ||
/* | ||
* Here, we override Zod exports with our custom entities | ||
* It's one of the recommended ways to extend Zod: | ||
* https://github.com/colinhacks/zod/issues/465#issuecomment-847479217 | ||
*/ | ||
|
||
export * from 'zod' | ||
|
||
export { defaultErrorMap, setErrorMap } from './error-map' | ||
export type { ZodErrorMap } from './error-map' | ||
|
||
export { ZodIssueCode, addIssueToContext } from './issues' | ||
export type { | ||
ZodIssue, | ||
ZodIssueOptionalMessage, | ||
ZodInvalidDateStringDayIssue, | ||
ZodTooBigIssue, | ||
ZodTooSmallIssue, | ||
} from './issues' | ||
|
||
export * from './type-names' | ||
export * from './date-string' |
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
/* | ||
* It's sad, but TS can't merge "z" exports properly - it becomes "any" | ||
* For that reason, we have a manually created declaration file with working re-exports | ||
*/ | ||
export * from './dist/z-without-namespace' | ||
export * as z from './dist/z-without-namespace' |