From e3125f41145dd1e072100b7f9f365731476b2d92 Mon Sep 17 00:00:00 2001 From: Aaron Casanova Date: Sat, 17 Dec 2022 21:37:50 -0800 Subject: [PATCH 1/2] Fix isAsync type guard --- deno/lib/README.md | 1 + deno/lib/helpers/parseUtil.ts | 2 +- src/helpers/parseUtil.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/deno/lib/README.md b/deno/lib/README.md index 1267c8b05..9a475763c 100644 --- a/deno/lib/README.md +++ b/deno/lib/README.md @@ -361,6 +361,7 @@ There are a growing number of tools that are built atop or support Zod natively! - [`zodix`](https://github.com/rileytomasek/zodix): Zod utilities for FormData and URLSearchParams in Remix loaders and actions. - [`formik-validator-zod`](https://github.com/glazy/formik-validator-zod): Formik-compliant validator library that simplifies using Zod with Formik. - [`zod-i18n-map`](https://github.com/aiji42/zod-i18n): Useful for translating Zod error messages. +- [`@modular-forms/solid`](https://github.com/fabian-hiller/modular-forms): Modular form library for SolidJS that supports Zod for validation. #### Zod to X diff --git a/deno/lib/helpers/parseUtil.ts b/deno/lib/helpers/parseUtil.ts index 8be51d97c..68e7df6bc 100644 --- a/deno/lib/helpers/parseUtil.ts +++ b/deno/lib/helpers/parseUtil.ts @@ -175,4 +175,4 @@ export const isValid = (x: ParseReturnType): x is OK | DIRTY => export const isAsync = ( x: ParseReturnType ): x is AsyncParseReturnType => - typeof Promise !== undefined && x instanceof Promise; + typeof Promise !== "undefined" && x instanceof Promise; diff --git a/src/helpers/parseUtil.ts b/src/helpers/parseUtil.ts index 3edd467e9..eb6690ef8 100644 --- a/src/helpers/parseUtil.ts +++ b/src/helpers/parseUtil.ts @@ -175,4 +175,4 @@ export const isValid = (x: ParseReturnType): x is OK | DIRTY => export const isAsync = ( x: ParseReturnType ): x is AsyncParseReturnType => - typeof Promise !== undefined && x instanceof Promise; + typeof Promise !== "undefined" && x instanceof Promise; From 89511b1487a55d7e05bf96b6fcd348b1c35f1d85 Mon Sep 17 00:00:00 2001 From: Aaron Casanova Date: Sat, 17 Dec 2022 21:58:18 -0800 Subject: [PATCH 2/2] Remove unexpected README change