Hi!
I am using dburles:collection-helpers
in my meteor 2.12 project with typescript. I added this package with meteor add dburles:collection-helpers
and the types with meteor yarn add @types/meteor-dburles-collection-helpers
.
In my TS file:
import { Mongo } from "meteor/mongo";
import SimpleSchema from 'simpl-schema';
...
const BackupJobsSchema = new SimpleSchema({
status: {
type: String,
allowedValues: [
"queued",
"in_progress",
"restarting",
"finished_ok",
"finished_error"
]
},
...
});
const BackupJobs = new Mongo.Collection("backup_jobs");
BackupJobs.attachSchema(BackupJobsSchema);
BackupJobs.helpers({
isRunning() {
return (
this.status === "queued" ||
this.status === "in_progress" ||
this.status === "restarting"
);
}
});
But muy IDE gives me an error in Backup.helpers
: Property ‘helpers’ does not exist on type Collection<Document, Document>
I tried to put the types files from meteor-dburles-collection-helpers
in my own typings-custom
project folder but I got the same error.
Any ideas?