From c71df73355f33a56c1caf2df476793668889d141 Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Thu, 18 Apr 2019 14:29:17 +0900
Subject: [PATCH] Add type annotations

---
 test/streaming.ts | 4 ++--
 test/utils.ts     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/streaming.ts b/test/streaming.ts
index 759472861..a29517148 100644
--- a/test/streaming.ts
+++ b/test/streaming.ts
@@ -32,7 +32,7 @@ describe('Streaming', () => {
 		p.on('message', message => {
 			if (message === 'ok') {
 				(p.channel as any).onread = () => {};
-				initDb(true).then(async connection => {
+				initDb(true).then(async (connection: any) => {
 					Followings = connection.getRepository(Following);
 					done();
 				});
@@ -44,7 +44,7 @@ describe('Streaming', () => {
 		p.kill();
 	});
 
-	const follow = async (follower, followee) => {
+	const follow = async (follower: any, followee: any) => {
 		await Followings.save({
 			id: 'a',
 			createdAt: new Date(),
diff --git a/test/utils.ts b/test/utils.ts
index fbba9a68c..f67baf004 100644
--- a/test/utils.ts
+++ b/test/utils.ts
@@ -76,7 +76,7 @@ export const uploadFile = (user: any, path?: string): Promise<any> => new Promis
 	});
 });
 
-export function connectStream(user: any, channel: string, listener: any, params?: any): Promise<WebSocket> {
+export function connectStream(user: any, channel: string, listener: (message: Record<string, any>) => any, params?: any): Promise<WebSocket> {
 	return new Promise((res, rej) => {
 		const ws = new WebSocket(`ws://localhost/streaming?i=${user.token}`);