3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-06-17 11:25:03 +00:00

refactor: replace io-ts with zod

This commit is contained in:
Dragory 2024-01-14 14:25:42 +00:00
parent fafaefa1fb
commit 28692962bc
No known key found for this signature in database
161 changed files with 1450 additions and 2105 deletions

View file

@ -1,6 +1,6 @@
import test from "ava";
import * as ioTs from "io-ts";
import { convertDelayStringToMS, convertMSToDelayString, getUrlsInString, tAllowedMentions } from "./utils";
import z from "zod";
import { convertDelayStringToMS, convertMSToDelayString, getUrlsInString, zAllowedMentions } from "./utils";
import { ErisAllowedMentionFormat } from "./utils/erisAllowedMentionsToDjsMentionOptions";
type AssertEquals<TActual, TExpected> = TActual extends TExpected ? true : false;
@ -50,7 +50,7 @@ test("delay strings: reverse conversion (conservative)", (t) => {
});
test("tAllowedMentions matches Eris's AllowedMentions", (t) => {
type TAllowedMentions = ioTs.TypeOf<typeof tAllowedMentions>;
type TAllowedMentions = z.infer<typeof zAllowedMentions>;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const typeTest: AssertEquals<TAllowedMentions, ErisAllowedMentionFormat> = true;
t.pass();