chore: make isPureRenote type guard

This commit is contained in:
anatawa12 2023-10-30 10:47:54 +09:00
parent bfa6d7b525
commit 94f3631a0e
No known key found for this signature in database
GPG Key ID: 9CA909848B8E4EA6
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
import type { MiNote } from '@/models/Note.js';
export function isPureRenote(note: MiNote): boolean {
export function isPureRenote(note: MiNote): note is MiNote & { renoteId: NonNullable<MiNote['renoteId']> } {
if (!note.renoteId) return false;
if (note.text) return false; // it's quoted with text