From 82dc862ab1493afcd074cad4ece4d99303ae5117 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Tue, 17 Dec 2024 06:30:22 +0200 Subject: [PATCH] Add types info --- src/plugins/muc-views/modals/templates/add-muc.js | 11 +++++++---- .../plugins/muc-views/modals/templates/add-muc.d.ts | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/plugins/muc-views/modals/templates/add-muc.js b/src/plugins/muc-views/modals/templates/add-muc.js index 44d8a11180..6a982700c7 100644 --- a/src/plugins/muc-views/modals/templates/add-muc.js +++ b/src/plugins/muc-views/modals/templates/add-muc.js @@ -1,11 +1,11 @@ import DOMPurify from 'dompurify'; -import { __ } from 'i18n'; import { _converse, api } from '@converse/headless'; import { html } from 'lit'; import { unsafeHTML } from 'lit/directives/unsafe-html.js'; import { getAutoCompleteList } from '../../search.js'; +import { __ } from 'i18n'; -const nickname_input = (el) => { +const nickname_input = () => { const i18n_nickname = __('Nickname'); const i18n_required_field = __('This field is required'); return html` @@ -23,6 +23,9 @@ const nickname_input = (el) => { `; }; +/** + * @param {import('../add-muc.js').default} el + */ export default (el) => { const i18n_join = __('Join'); const muc_domain = el.model.get('muc_domain') || api.settings.get('muc_domain'); @@ -61,13 +64,13 @@ export default (el) => { ${unsafeHTML(DOMPurify.sanitize(muc_roomid_policy_hint, { 'ALLOWED_TAGS': ['b', 'br', 'em'] }))} ` : ''} - ${!api.settings.get('locked_muc_nickname') ? nickname_input(el) : ''} + ${!api.settings.get('locked_muc_nickname') ? nickname_input() : ''} `; diff --git a/src/types/plugins/muc-views/modals/templates/add-muc.d.ts b/src/types/plugins/muc-views/modals/templates/add-muc.d.ts index 9f91f47f7b..d2e9304d6a 100644 --- a/src/types/plugins/muc-views/modals/templates/add-muc.d.ts +++ b/src/types/plugins/muc-views/modals/templates/add-muc.d.ts @@ -1,3 +1,3 @@ -declare function _default(el: any): import("lit").TemplateResult<1>; +declare function _default(el: import("../add-muc.js").default): import("lit").TemplateResult<1>; export default _default; //# sourceMappingURL=add-muc.d.ts.map \ No newline at end of file