From d8ec69887791bcd7fef8a42752c6d4362d605771 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 29 Aug 2018 06:37:14 +0900 Subject: [PATCH] Fix type annotations --- src/message-like.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/message-like.ts b/src/message-like.ts index f4e0ce0..530acda 100644 --- a/src/message-like.ts +++ b/src/message-like.ts @@ -1,5 +1,6 @@ import 藍 from './ai'; import Friend from './friend'; +import { User } from './misskey/user'; const delay = require('timeout-as-promise'); export default class MessageLike { @@ -7,23 +8,23 @@ export default class MessageLike { private messageOrNote: any; public isMessage: boolean; - public get id() { + public get id(): string { return this.messageOrNote.id; } - public get user() { + public get user(): User { return this.messageOrNote.user; } - public get userId() { + public get userId(): string { return this.messageOrNote.userId; } - public get text() { + public get text(): string { return this.messageOrNote.text; } - public get replyId() { + public get replyId(): string { return this.messageOrNote.replyId; }