-
Notifications
You must be signed in to change notification settings - Fork 0
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
8eb2409
commit 70f93b5
Showing
8 changed files
with
455 additions
and
451 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { z } from "zod"; | ||
|
||
const IdenticonAvatar = z.object({ | ||
type: z.literal("identicon"), | ||
hash: z.string(), | ||
}); | ||
|
||
const Avatar = z.union([IdenticonAvatar, z.string()]); | ||
|
||
type Avatar = z.infer<typeof Avatar>; | ||
|
||
export default Avatar; |
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,24 @@ | ||
import { z } from "zod"; | ||
|
||
const Rank = z.union([ | ||
z.literal("x"), | ||
z.literal("u"), | ||
z.literal("ss"), | ||
z.literal("s+"), | ||
z.literal("s"), | ||
z.literal("s-"), | ||
z.literal("a+"), | ||
z.literal("a"), | ||
z.literal("a-"), | ||
z.literal("b+"), | ||
z.literal("b"), | ||
z.literal("b-"), | ||
z.literal("c+"), | ||
z.literal("c"), | ||
z.literal("c-"), | ||
z.literal("d+"), | ||
z.literal("d"), | ||
z.literal("z"), | ||
]); | ||
|
||
export default Rank; |
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,9 @@ | ||
import { z } from "zod"; | ||
import Avatar from "./avatar"; | ||
|
||
const User = z.object({ | ||
avatar: Avatar, | ||
name: z.string(), | ||
}); | ||
|
||
export default User; |
Oops, something went wrong.