You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generic types can cause a lot of complex TypeScript errors that are difficult to resolve, so I recommend we avoid them unless they are necessary. This seems equivalent & easier to maintain:
interfaceIBaseChatMessage{type: 'msg';body: string;id: string;time: number;sender: unknown;attachments?: unknown[];}/** * The interface of a chat message in the chat model. */exportinterfaceIChatMessageextendsIBaseChatMessage{sender: IUser;attachments?: IAttachment[];}/** * The interface of a chat message in the YChat shared document. */exportinterfaceIYMessageextendsIBaseChatMessage{sender: string;attachments?: string[];}
Originally posted by @dlqqq in #148 (comment)
For the context, this would be in replacement of the
IChatMessage
interface and theIYMessage
interface.The text was updated successfully, but these errors were encountered: