forked from FoundKeyGang/FoundKey
Narrow type of isPureRenote
This commit is contained in:
parent
811d5cd0d7
commit
655f7a8dfc
1 changed files with 1 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
import { Note } from '@/models/entities/note.js';
|
||||
|
||||
export function isPureRenote(note: Note): boolean {
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue