From 21b170642e89bb8a96d812057230526a744b7e3c Mon Sep 17 00:00:00 2001 From: Isaac Way Date: Sun, 12 Mar 2023 17:09:34 -0500 Subject: [PATCH] Removes enum deprecation warning --- src/logging.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/logging.ts b/src/logging.ts index ee4a0ef..828fab7 100644 --- a/src/logging.ts +++ b/src/logging.ts @@ -19,16 +19,8 @@ export function duplicateTypeError() { ); } -export function printWarningsForSchema(type: RTFSupportedZodTypes) { - if ( - !shownWarnings.enum && - type._def.typeName === ZodFirstPartyTypeKind.ZodEnum - ) { - err( - "support for z.enum() is deprecated and will be removed in future versions. Prefer z.string() / z.number() etc for dropdowns, selects, and radio buttons. \nSee https://github.com/iway1/react-ts-form/blob/main/field-examples.md for examples" - ); - shownWarnings.enum = true; - } +export function printWarningsForSchema(_type: RTFSupportedZodTypes) { + // placeholder in case we need future schema warnings } export function printUseEnumWarning() {