From 9d65415fdc4cab84945040f59cae3047077d8fc7 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Sun, 17 Jun 2018 19:59:02 +0900 Subject: [PATCH] [noImplicitAny: true] src/services/note --- src/services/note/create.ts | 4 ++-- src/services/note/reaction/create.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/note/create.ts b/src/services/note/create.ts index 98415b897..ef03c4e04 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -33,7 +33,7 @@ class NotificationManager { reason: Reason; }> = []; - constructor(user, note) { + constructor(user: IUser, note: any) { this.user = user; this.note = note; } @@ -451,7 +451,7 @@ export default async (user: IUser, data: { // $ne: note._id // } //}); - const existRenote = null; + const existRenote: INote | null = null; //#endregion if (!existRenote) { diff --git a/src/services/note/reaction/create.ts b/src/services/note/reaction/create.ts index 123c091c8..5b30bb5e1 100644 --- a/src/services/note/reaction/create.ts +++ b/src/services/note/reaction/create.ts @@ -36,7 +36,7 @@ export default async (user: IUser, note: INote, reaction: string) => new Promise res(); - const inc = {}; + const inc: {[key: string]: number} = {}; inc[`reactionCounts.${reaction}`] = 1; // Increment reactions count