aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-12-02 01:48:00 +0300
committereug-vs <eug-vs@keemail.me>2020-12-02 01:48:00 +0300
commitfe32a86c9d388d35e146d71a88c3bf19b022f669 (patch)
tree529e7556155c140be8fa533ca8fdee6c0699ec12
parent1497c063bb7714e633603b1752fd18b635c868d9 (diff)
downloadmongo-cronjob-fe32a86c9d388d35e146d71a88c3bf19b022f669.tar.gz
fix: separate Context type from schema
-rw-r--r--lib/model.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/model.ts b/lib/model.ts
index 218b8ef..f93928e 100644
--- a/lib/model.ts
+++ b/lib/model.ts
@@ -17,7 +17,7 @@ export interface EventModel<Context> extends Model<Event<Context>> {
const CronJob = cron.CronJob;
-const createEventModel = <Context extends Schema>(name: string, contextSchema: Context): EventModel<Context> => {
+const createEventModel = <Context>(name: string, contextSchema: Schema): EventModel<Context> => {
const schema = createEventSchema(contextSchema);
// Schema methods