Skip to content

Commit 6f40cea

Browse files
committed
(typescript) add install options
1 parent 7d52509 commit 6f40cea

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

types/index.d.ts

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Vue, { VNode, Component } from 'vue'
1+
import Vue, { VNode, Component, PluginFunction } from 'vue'
22

33
export type StringNumber = string | number
44

@@ -107,8 +107,44 @@ export interface Slots {
107107
[key: string]: VNode[]
108108
}
109109

110+
export interface AdvancedChatOptions {
111+
props?: {
112+
height: string
113+
'current-user-id': StringNumber
114+
rooms: Rooms
115+
'loading-rooms': boolean
116+
'rooms-loaded': boolean
117+
'room-id': StringNumber
118+
'load-first-room': boolean
119+
messages: Messages
120+
'room-message': string
121+
'messages-loaded': boolean
122+
'room-actions': any[]
123+
'menu-actions': any[]
124+
'message-actions': any[]
125+
'show-add-room': boolean
126+
'show-send-icon': boolean
127+
'show-files': boolean
128+
'show-audio': boolean
129+
'show-emojis': boolean
130+
'show-reaction-emojis': boolean
131+
'show-new-messages-divider': boolean
132+
'show-footer': boolean
133+
'text-messages': {}
134+
'text-formatting': number
135+
'responsive-breakpoint': boolean
136+
'single-room': boolean
137+
theme: string
138+
'accepted-files': string
139+
styles: {}
140+
}
141+
142+
slots?: Slots
143+
}
144+
110145
export default class VueAdvancedChat extends Vue {
111146
rooms: Rooms
112147
messages: Messages
113148
$slots: Slots
149+
static install: PluginFunction<AdvancedChatOptions>
114150
}

0 commit comments

Comments
 (0)