Skip to content

No strong types on filters #407

@nunomarks

Description

@nunomarks

Hello!

When using a model function, typescript does not error when using non-existing attributes on the schema.

const Model = papr.model('collection', schema(
  {
    attributeExists: Types.objectId(),
  }));

(async () => {
  await Model.findOne({ attributeNotExists: new ObjectId() });
})();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions