No Description

TextMsg.ts 290B

123456789101112131415
  1. import { MsgBase, MsgType } from './MsgBase';
  2. export class TextMsg extends MsgBase {
  3. type: MsgType = 'text';
  4. // 消息内容
  5. msg: string;
  6. static createMsg(baseMsg: Partial<TextMsg>): TextMsg {
  7. const msg = new TextMsg();
  8. Object.assign(msg, baseMsg);
  9. return msg;
  10. }
  11. }