diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 141e10ed4426..32d1cc5640ff 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -243,7 +243,7 @@ if (noteViewInterruptors.length > 0) { }); } -const isRenote = Misskey.note.isRenote(note.value); +const isRenote = Misskey.note.isPureRenote(note.value); const rootEl = shallowRef(); const menuButton = shallowRef(); diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 13afa2a189e5..2b7d2afa0493 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -268,7 +268,7 @@ if (noteViewInterruptors.length > 0) { }); } -const isRenote = Misskey.note.isRenote(note.value); +const isRenote = Misskey.note.isPureRenote(note.value); const rootEl = shallowRef(); const menuButton = shallowRef(); diff --git a/packages/frontend/src/scripts/get-appear-note.ts b/packages/frontend/src/scripts/get-appear-note.ts index 7df48c1f77df..40ce80eac9fc 100644 --- a/packages/frontend/src/scripts/get-appear-note.ts +++ b/packages/frontend/src/scripts/get-appear-note.ts @@ -6,5 +6,5 @@ import * as Misskey from 'misskey-js'; export function getAppearNote(note: Misskey.entities.Note) { - return Misskey.note.isRenote(note) ? note.renote : note; + return Misskey.note.isPureRenote(note) ? note.renote : note; } diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index 97a6684d344c..e3943dd3a021 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -1172,7 +1172,7 @@ declare namespace entities { export { ID, DateString, - Renote, + PureRenote, PageEvent, ModerationLog, ServerStats, @@ -2279,7 +2279,7 @@ type ISigninHistoryRequest = operations['i___signin-history']['requestBody']['co type ISigninHistoryResponse = operations['i___signin-history']['responses']['200']['content']['application/json']; // @public (undocumented) -function isRenote(note: Note): note is Renote; +function isPureRenote(note: Note): note is PureRenote; // @public (undocumented) type IUnpinRequest = operations['i___unpin']['requestBody']['content']['application/json']; @@ -2516,7 +2516,7 @@ type Note = components['schemas']['Note']; declare namespace note { export { - isRenote + isPureRenote } } export { note } @@ -2761,6 +2761,15 @@ type PinnedUsersResponse = operations['pinned-users']['responses']['200']['conte // @public (undocumented) type PromoReadRequest = operations['promo___read']['requestBody']['content']['application/json']; +// Warning: (ae-forgotten-export) The symbol "AllNullRecord" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "NonNullableRecord" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +type PureRenote = Omit & AllNullRecord> & { + files: []; + fileIds: []; +} & NonNullableRecord>; + // @public (undocumented) type QueueCount = components['schemas']['QueueCount']; @@ -2783,15 +2792,6 @@ type QueueStats = { // @public (undocumented) type QueueStatsLog = QueueStats[]; -// Warning: (ae-forgotten-export) The symbol "AllNullRecord" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "NonNullableRecord" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Renote = Omit & AllNullRecord> & { - files: []; - fileIds: []; -} & NonNullableRecord>; - // @public (undocumented) type RenoteMuteCreateRequest = operations['renote-mute___create']['requestBody']['content']['application/json']; diff --git a/packages/misskey-js/src/entities.ts b/packages/misskey-js/src/entities.ts index 1e24e9ce656f..3b0ff5bbfab9 100644 --- a/packages/misskey-js/src/entities.ts +++ b/packages/misskey-js/src/entities.ts @@ -24,7 +24,7 @@ type AllNullRecord = { [P in keyof T]: null; }; -export type Renote = +export type PureRenote = Omit & AllNullRecord> & { files: []; fileIds: []; } diff --git a/packages/misskey-js/src/note.ts b/packages/misskey-js/src/note.ts index 51cd1c2a22d7..5c8298c7e4f5 100644 --- a/packages/misskey-js/src/note.ts +++ b/packages/misskey-js/src/note.ts @@ -1,6 +1,6 @@ -import type { Note, Renote } from './entities.js'; +import type { Note, PureRenote } from './entities.js'; -export function isRenote(note: Note): note is Renote { +export function isPureRenote(note: Note): note is PureRenote { return ( note.renote != null && note.reply == null &&