-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Consider the following schema:
const mySchema = schema(
{
foo: Types.string(),
bar: Types.string()
});
const MyModel = papr.model('mymodels', mySchema);
Now consider some code that queries this model:
const t = MyModel.find(
{ foo: 'baz' },
{
projection: {
foo: 1,
unknown: 1
}
}
);
Currently this projection type will not produce a TS error even though it is projecting properties that do not exist on the schema. This can be problematic in applications, especially because it will not flag misspelled properties (an issue we ran into recently)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed