Revert "feat(ui): extend zod with a is typeguard` method"

This reverts commit 0f45933791.
This commit is contained in:
psychedelicious 2024-05-08 19:15:37 +10:00 committed by Kent Keirsey
parent 6c1fd584d2
commit d8557d573b
3 changed files with 0 additions and 18 deletions

View File

@ -1,8 +0,0 @@
import { assert } from 'tsafe';
import { z } from 'zod';
assert(!Object.hasOwn(z.ZodType.prototype, 'is'));
z.ZodType.prototype.is = function (val: unknown): val is z.infer<typeof this> {
return this.safeParse(val).success;
};

View File

@ -1,5 +1,3 @@
import 'extend-zod';
import ReactDOM from 'react-dom/client'; import ReactDOM from 'react-dom/client';
import InvokeAIUI from './app/components/InvokeAIUI'; import InvokeAIUI from './app/components/InvokeAIUI';

View File

@ -1,8 +0,0 @@
import 'zod';
declare module 'zod' {
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
export interface ZodType<Output = any> {
is(val: unknown): val is Output;
}
}