Type the crypto, settings, and component any sites. [skip build]
Checks / checks (push) Successful in 2m4s
Trigger cinny-mobile / dispatch (push) Successful in 2s

This commit is contained in:
2026-11-02 03:56:07 +11:00
parent 6c8a085ae1
commit 9d17b14a9e
26 changed files with 68 additions and 49 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ export const promiseFulfilledResult = <T>(
if (settledResult.status === 'fulfilled') return settledResult.value;
return undefined;
};
export const promiseRejectedResult = <T>(settledResult: PromiseSettledResult<T>): any => {
export const promiseRejectedResult = <T>(settledResult: PromiseSettledResult<T>): unknown => {
if (settledResult.status === 'rejected') return settledResult.reason;
return undefined;
};
+1 -1
View File
@@ -72,7 +72,7 @@ export const getLoginTermUrl = (params: UIAParams): string | undefined => {
if (terms.policies === null) return undefined;
if ('privacy_policy' in terms.policies && typeof terms.policies.privacy_policy === 'object') {
if (terms.policies.privacy_policy === null) return undefined;
const langToPolicy = terms.policies.privacy_policy as Record<string, any>;
const langToPolicy = terms.policies.privacy_policy as Record<string, { url?: string }>;
const url = langToPolicy.en?.url;
if (typeof url === 'string') return url;
+4 -3
View File
@@ -165,9 +165,10 @@ export const uploadContent = async (
const mxc = data.content_uri;
if (mxc) onSuccess(mxc);
else onError(new MatrixError(data));
} catch (e: any) {
const error = typeof e?.message === 'string' ? e.message : undefined;
const errcode = typeof e?.name === 'string' ? e.message : undefined;
} catch (e) {
const err = e as { message?: string; name?: string };
const error = typeof err?.message === 'string' ? err.message : undefined;
const errcode = typeof err?.name === 'string' ? err.message : undefined;
onError(new MatrixError({ error, errcode }));
}
};
+2 -1
View File
@@ -1,4 +1,5 @@
import {
AccountDataEvents,
EventTimeline,
EventTimelineSet,
EventType,
@@ -52,7 +53,7 @@ export const getStateEvents = (room: Room, eventType: StateEvent): MatrixEvent[]
export const getAccountData = (
mx: MatrixClient,
eventType: AccountDataEvent,
): MatrixEvent | undefined => mx.getAccountData(eventType as any);
): MatrixEvent | undefined => mx.getAccountData(eventType as keyof AccountDataEvents);
export const getMDirects = (mDirectEvent: MatrixEvent): Set<string> => {
const roomIds = new Set<string>();