forked from FoundKeyGang/FoundKey
Michcio
c282ed7683
As side effect of that, a non-null assertion can be removed. Co-authored-by: Johann150 <johann.galle@protonmail.com>
5 lines
310 B
TypeScript
5 lines
310 B
TypeScript
import { Note } from '@/models/entities/note.js';
|
|
|
|
export function isPureRenote(note: Note): note is Note & { renoteId: string, text: null, fileIds: null | never[], hasPoll: false } {
|
|
return note.renoteId != null && note.text == null && (note.fileIds == null || note.fileIds.length === 0) && !note.hasPoll;
|
|
}
|