groqd icon indicating copy to clipboard operation
groqd copied to clipboard

Dereferencing gives type error

Open Bijig0 opened this issue 1 year ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

Code Sandbox link

No response

Bug report

Trying out a copy paste example from the docs and getting a type error


  const query = q("*", { isArray: true })
    .filterByType("inventory")
    .grab$({
      data: q.object({
        heroImageUrl: q("types").filter().deref().grabOne("url", q.string()),
      }),
    });


Type 'ArrayQuery<ZodString>' is missing the following properties from type 'ZodType<any, any, any>': _type, _output, _input, _def, and 31 more.ts(2740)

Bijig0 avatar Jun 23 '24 07:06 Bijig0