add hasText type guard for notes

This commit is contained in:
Hazelnoot 2025-05-12 13:12:37 -04:00
parent 00cfeca3d7
commit 61aaa586fe

View file

@ -264,3 +264,7 @@ export type IMentionedRemoteUsers = {
username: string;
host: string;
}[];
export function hasText(note: MiNote): note is MiNote & { text: string } {
return note.text != null;
}