t×tecexpressby TeKOcloud
DEv0.7.1
API & types / VUE

ChatMessage.

Immutable message with an author, timestamp and non-empty text.

ts
interface ChatMessage {
  id: RowKey
  text: string
  timestamp: Date | string
  author: ChatUser
  status?: 'pending' | 'sent' | 'error'
}
FieldMeaning
idUnique stable ID.
textText to display.
timestampMessage timestamp.
authorMessage author.
statusLocal message status.
ts
import type { ChatMessage } from '@tekocloud.de/tecexpress'
const example: ChatMessage = { id: 1, text: 'Hello', timestamp: new Date(), author: { id: 'me', name: 'Alex' } }
console.log(example)