Skip to content

withSchema is not a function.  #1

@juliendore

Description

@juliendore

Hello, I am trying to use zod-schema in order to attach schemas to a collection. However, I am perfectly unable to actually to use withSchema.

Here's my collection file

import { Mongo } from "meteor/mongo";
import { Site, siteZodSchema } from "/imports/modules/zodtypes/sites.zodtypes";

const Sites = new Mongo.Collection<Site>("Sites");

Sites.withSchema(siteZodSchema);

export default Sites;

and I end up with that error : Uncaught TypeError: Sites.withSchema is not a function

am I missing something or doing something wrong ?

Thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions