From 8848574df03b558c776862ebb3a10674712d015e Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 29 Aug 2018 06:30:48 +0900 Subject: [PATCH] Fix type --- src/ai.ts | 5 +++-- src/modules/reversi/back.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ai.ts b/src/ai.ts index b1ce4e7..fe66e94 100644 --- a/src/ai.ts +++ b/src/ai.ts @@ -7,13 +7,14 @@ import config from './config'; import IModule from './module'; import MessageLike from './message-like'; import { FriendDoc } from './friend'; +import { User } from './misskey/user'; const ReconnectingWebSocket = require('../node_modules/reconnecting-websocket/dist/reconnecting-websocket-cjs.js'); /** * 藍 */ export default class 藍 { - public account: any; + public account: User; /** * ホームストリーム @@ -40,7 +41,7 @@ export default class 藍 { public friends: loki.Collection; - constructor(account: any, modules: IModule[]) { + constructor(account: User, modules: IModule[]) { this.account = account; this.modules = modules; diff --git a/src/modules/reversi/back.ts b/src/modules/reversi/back.ts index 51af0d7..597e0f6 100644 --- a/src/modules/reversi/back.ts +++ b/src/modules/reversi/back.ts @@ -10,6 +10,7 @@ import * as request from 'request-promise-native'; import Reversi, { Color } from 'misskey-reversi'; import config from '../../config'; import serifs from '../../serifs'; +import { User } from '../../misskey/user'; const db = {}; @@ -25,7 +26,7 @@ const titles = [ ]; class Session { - private account: any; + private account: User; private game: any; private form: any; private o: Reversi; @@ -41,7 +42,7 @@ class Session { */ private startedNote: any = null; - private get user(): any { + private get user(): User { return this.game.user1Id == this.account.id ? this.game.user2 : this.game.user1; }