Unveränderliche Nachricht mit Autor, Zeitstempel und nicht leerem Text.
interface ChatMessage {
id: RowKey
text: string
timestamp: Date | string
author: ChatUser
status?: 'pending' | 'sent' | 'error'
}| Feld | Bedeutung |
|---|---|
| id | Eindeutige stabile ID. |
| text | Anzuzeigender Text. |
| timestamp | Zeitpunkt der Nachricht. |
| author | Autor der Nachricht. |
| status | Lokaler Nachrichtenstatus. |
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)