Closed W1ckh3ad closed 1 year ago
Hello,
I' ve found on my journey to migrate some inconvenience handling types. That's why I added this PR.
NOTE: This won't effect any functions or type errors, just makes it more readable.
const textAreaStringSchema = createUniqueFieldSchema(z.string(), "TextArea2"); // VSCode type examples after hovering // before change const textAreaStringSchema: z.ZodBranded<z.ZodString, "TextArea2"> | z.ZodBranded<z.ZodNumber, "TextArea2"> | z.ZodBranded<z.ZodBoolean, "TextArea2"> | z.ZodBranded<z.ZodDate, "TextArea2"> | ... 11 more ... | z.ZodBranded<...> // after change const textAreaStringSchema: z.ZodBranded<z.ZodString, "TextArea2">
EDIT:
After creating the test file for #38 VSCode throws a ts error:
The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.
Applying this change, will fix this.
Ended up fixing this in a PR made today so I'm gonna close but let me know if there are any other issues.
Thanks!
Hello,
I' ve found on my journey to migrate some inconvenience handling types. That's why I added this PR.
NOTE: This won't effect any functions or type errors, just makes it more readable.
EDIT:
After creating the test file for #38 VSCode throws a ts error:
Applying this change, will fix this.