Skip to content

Commit

Permalink
feat(type): add optional text on ChatPhotoMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm committed Dec 31, 2022
1 parent 648b35b commit af83f5b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 4 additions & 2 deletions core/math/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@
"bugs": {
"url": "https://github.com/AliMD/alwatr/issues"
},
"devDependencies": {
"@alwatr/type": "~0.27.0",
"dependencies": {
"tslib": "~2.4.1"
},
"devDependencies": {
"@alwatr/type": "~0.27.0"
}
}
3 changes: 2 additions & 1 deletion core/type/src/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ export type ChatTextMessage = CommonMessage & {
export type ChatPhotoMessage = CommonMessage & {
type: 'photo';
photo: unknown;
text?: string;
};

export type ChatMessage = ChatTextMessage;
export type ChatMessage = ChatTextMessage | ChatPhotoMessage;

export type ChatStorage = AlwatrDocumentStorage<ChatTextMessage>;
7 changes: 0 additions & 7 deletions ui/demo-pwa/src/type.ts

This file was deleted.

0 comments on commit af83f5b

Please sign in to comment.