question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Property 'datetime' does not exist on type 'ZodString'.

See original GitHub issue

Since i am new to zod, i’ve been reading the documentation for a while and found the z.string().datetime() method.

However, when I tried that method on my project, I got an error that’s says Property 'datetime' does not exist on type 'ZodString'. image

do you guys have any workaround for this problem?

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:2
  • Comments:9

github_iconTop GitHub Comments

16reactions
jakewtaylorcommented, Nov 22, 2022

This caught me out the other day, the docs are reflecting the main branch here, but the latest package on NPM is 2 months old - the datetime() method was added more recently, in #1494. Dunno why it hasn’t been published though - could be good reason. Maybe @colinhacks could chip in?

4reactions
mauriciabadcommented, Dec 8, 2022

I see 2 important problems here:

  1. Documentation should be only about released code. It doesn’t make any sense that it explains how to use a function that’s not implemented.
  2. The npm release process is ineffective. The code has been merged 1 month ago but not released yet.
Read more comments on GitHub >

github_iconTop Results From Across the Web

colinhacks/zod: TypeScript-first schema validation ... - GitHub
Zod is a TypeScript-first schema declaration and validation library. I'm using the term "schema" to broadly refer to any data type, from a...
Read more >
Property 'date' does not exist on type '{} | { date: string
I am using the npm modules query-string to parse a query string into a object of key/value pairs. But i am not sure...
Read more >
Property does not exist on type String in TypeScript | bobbyhadz
The "Property does not exist on type String" error occurs when we try to access a property that does not exist on the...
Read more >
Data validation with automatic typing using zod - CodeX Team
Have TypeScript types to represent the data we want. 3. So that we don't have to maintain both types and code for validation...
Read more >
property 'startswith' does not exist on type 'string' - You.com
When i try to compile provided code i get following error. transactions.ts(158,24): error TS2339: Property 'find' does not exist on type 'UnspentTxOut[]'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found