From a191448b3ddf5b5dc8e773c63382917a88b5508a Mon Sep 17 00:00:00 2001 From: Yannick Bungers Date: Sun, 12 Apr 2020 19:31:51 +0200 Subject: [PATCH] Added Types revision.ts Signed-off-by: Yannick Bungers Signed-off-by: David Mehren --- lib/models/revision.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/models/revision.ts b/lib/models/revision.ts index 2a12cbe50..b41fedbee 100644 --- a/lib/models/revision.ts +++ b/lib/models/revision.ts @@ -121,7 +121,7 @@ export class Revision extends Model { noteId: note.id }, order: [['createdAt', 'DESC']] - }).then(function (revisions) { + }).then(function (revisions: Revision[]) { class RevisionDataActions { // TODO: Fix Type in actions.ts time @@ -129,7 +129,7 @@ export class Revision extends Model { } const data: RevisionDataActions[] = [] - revisions.forEach(function (revision) { + revisions.forEach(function (revision: Revision) { data.push({ time: moment(revision.createdAt).valueOf(), length: revision.length @@ -148,7 +148,7 @@ export class Revision extends Model { noteId: note.id }, order: [['createdAt', 'DESC']] - }).then(function (revisions) { + }).then(function (revisions: Revision[]) { if (revisions.length <= 0) { errorCallback(null, null) return @@ -161,7 +161,7 @@ export class Revision extends Model { [Op.gte]: time } } - }).then(function (count) { + }).then(function (count: number) { if (count <= 0) { errorCallback(null, null) return