diff --git a/web/src/compose_pm_pill.ts b/web/src/compose_pm_pill.ts index ae6bac363c..43362a5107 100644 --- a/web/src/compose_pm_pill.ts +++ b/web/src/compose_pm_pill.ts @@ -1,5 +1,6 @@ import $ from "jquery"; +import type {InputPillConfig} from "./input_pill"; import * as input_pill from "./input_pill"; import type {User} from "./people"; import * as people from "./people"; @@ -9,7 +10,7 @@ import * as util from "./util"; export let widget: UserPillWidget; -const pill_config = { +const pill_config: InputPillConfig = { show_user_status_emoji: true, }; diff --git a/web/src/input_pill.ts b/web/src/input_pill.ts index 72c8f50c9f..b7e38b1884 100644 --- a/web/src/input_pill.ts +++ b/web/src/input_pill.ts @@ -21,11 +21,13 @@ export type InputPillItem = { should_add_guest_user_indicator?: boolean; } & T; +export type InputPillConfig = { + show_user_status_emoji?: boolean; +}; + type InputPillCreateOptions = { $container: JQuery; - pill_config?: { - show_user_status_emoji?: boolean; - }; + pill_config?: InputPillConfig | undefined; create_item_from_text: ( text: string, existing_items: InputPillItem[], diff --git a/web/src/user_pill.ts b/web/src/user_pill.ts index e21345d85b..078ed1e67c 100644 --- a/web/src/user_pill.ts +++ b/web/src/user_pill.ts @@ -1,5 +1,5 @@ import * as blueslip from "./blueslip"; -import type {InputPillContainer, InputPillItem} from "./input_pill"; +import type {InputPillConfig, InputPillContainer, InputPillItem} from "./input_pill"; import * as input_pill from "./input_pill"; import {page_params} from "./page_params"; import type {User} from "./people"; @@ -147,9 +147,7 @@ export function append_user(user: User, pills: UserPillWidget): void { export function create_pills( $pill_container: JQuery, - pill_config?: { - show_user_status_emoji?: boolean; - }, + pill_config?: InputPillConfig | undefined, ): input_pill.InputPillContainer { const pills = input_pill.create({ $container: $pill_container,