diff --git a/packages/devextreme/js/__internal/ui/chat/chat.ts b/packages/devextreme/js/__internal/ui/chat/chat.ts index 8b54e8d167c8..fecd6c0da719 100644 --- a/packages/devextreme/js/__internal/ui/chat/chat.ts +++ b/packages/devextreme/js/__internal/ui/chat/chat.ts @@ -64,14 +64,13 @@ class Chat extends Widget { } _renderMessageList(): void { - const { items = [], dataSource, user } = this.option(); + const { items = [], user } = this.option(); const currentUserId = user?.id; const $messageList = $('
').appendTo(this.element()); this._messageList = this._createComponent($messageList, MessageList, { items, - dataSource, currentUserId, }); } @@ -160,6 +159,6 @@ class Chat extends Widget { } } -registerComponent('dxChat', Chat as ComponentFactory); +registerComponent('dxChat', Chat as unknown as ComponentFactory); export default Chat; diff --git a/packages/devextreme/js/core/component_registrator.d.ts b/packages/devextreme/js/core/component_registrator.d.ts index c9637a60890d..3676d7fcc739 100644 --- a/packages/devextreme/js/core/component_registrator.d.ts +++ b/packages/devextreme/js/core/component_registrator.d.ts @@ -1,7 +1,7 @@ import DOMComponent from './dom_component'; import { UserDefinedElement } from './element'; -type ComponentFactory = { +export type ComponentFactory = { new(element: UserDefinedElement, options?: Record): TComponent; getInstance(element: UserDefinedElement): TComponent; };