frontend/ts/adapter.ts (raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import {Message, Author} from "./message" export class AdapterData { public protocol: string; public directMessages: Map<string, Message>; public messages: Map<string, Message>; public profileCache: Map<string, Author>; constructor(protocol: string) { this.protocol = protocol; this.messages = new Map<string, Message>(); this.directMessages = new Map<string, Message>(); this.profileCache = new Map<string, Author>(); } } export class AdapterState { public data: Map<string, AdapterData> = new Map<string, AdapterData>(); static _instance: AdapterState = new AdapterState(); } |