提交 580a71f1 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

fix overload bug of optional args

上级 a831531d
......@@ -150,8 +150,8 @@ export class Message implements Sayable {
return '{' + this.type() + '}' + content
}
public from(contact?: Contact): void
public from(id?: string): void
public from(contact: Contact): void
public from(id: string): void
public from(): Contact
public from(contact?: Contact|string): Contact|void {
if (contact) {
......@@ -212,10 +212,10 @@ export class Message implements Sayable {
}
return
}
if (!this.obj.room) {
return null
if (this.obj.room) {
return Room.load(this.obj.room)
}
return Room.load(this.obj.room)
return null
}
public content(content?: string): string {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册