mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
eslint: Fix @typescript-eslint/no-unnecessary-type-assertion.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
04013cdec1
commit
2dca29ce5a
@@ -196,7 +196,7 @@ export async function check_form_contents(
|
||||
}
|
||||
|
||||
export async function get_element_text(element: ElementHandle): Promise<string> {
|
||||
const text = await (await element.getProperty("innerText"))!.jsonValue();
|
||||
const text = await (await element.getProperty("innerText")).jsonValue();
|
||||
assert.ok(typeof text === "string");
|
||||
return text;
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ export function emails_to_full_names_string(emails: string[]): string {
|
||||
}
|
||||
|
||||
export function get_user_time(user_id: number): string | undefined {
|
||||
const user_timezone = get_by_user_id(user_id)!.timezone;
|
||||
const user_timezone = get_by_user_id(user_id).timezone;
|
||||
if (user_timezone) {
|
||||
try {
|
||||
return new Date().toLocaleTimeString(user_settings.default_language, {
|
||||
@@ -869,7 +869,7 @@ export function sender_info_for_recent_view_row(sender_ids: number[]): SenderInf
|
||||
const senders_info = [];
|
||||
for (const id of sender_ids) {
|
||||
// TODO: Better handling for optional values w/o the assertion.
|
||||
const person = get_by_user_id(id)!;
|
||||
const person = get_by_user_id(id);
|
||||
const sender: SenderInfo = {
|
||||
...person,
|
||||
avatar_url_small: small_avatar_url_for_person(person),
|
||||
|
||||
Reference in New Issue
Block a user