DenoDDeno
Powered by
BloxezB
Denoβ€’2y agoβ€’
3 replies
Bloxez

Deno / Zod / ts-zod-decorators

Hi guys - I'm trying to use ts-zod-decorators as a means of validating function arguments.
The library provides two decorators Validate and ZodInput. You can see in this screen clip I provide my deno.json, my little convenience files that bring relevant Zod features together, and then my class, having the method that I want to apply validation to.

I'm getting an error message of "Decorators are not valid here" when I try to apply the decorator to the function argument.

Literally just installed Deno, so on the latest version there.

Any guidance would be much appreciated. I'm pretty intermediate level with Typescript and a newby with Deno.

Having seen the YouTube 1.4 announcement, it looks like we can't use decorators on arguments?
image.png
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Using Zod with ts-zod-decorators
Deno AI HelperDDeno AI Helper / help
2y ago
Decorators on Deno
The NexusTThe Nexus / help
4y ago
Decorators are not valid here.deno-ts(1206)
ZabiZZabi / help
2y ago
Decorators with esbuild-deno-loader
bennypBbennyp / help
11mo ago