fix(frontend): リノートの判定が甘いのを修正 (#14396)
* fix(frontend): リノートの判定が甘いのを修正 * fix * Update Changelog * fix * use type assertion * fix + add comments * lint * misskey-jsに移動 * PureRenote -> Renote * isRenote -> isPureRenote
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
Announcement,
|
||||
EmojiDetailed,
|
||||
MeDetailed,
|
||||
Note,
|
||||
Page,
|
||||
Role,
|
||||
RolePolicies,
|
||||
@@ -16,6 +17,19 @@ export * from './autogen/models.js';
|
||||
export type ID = string;
|
||||
export type DateString = string;
|
||||
|
||||
type NonNullableRecord<T> = {
|
||||
[P in keyof T]-?: NonNullable<T[P]>;
|
||||
};
|
||||
type AllNullRecord<T> = {
|
||||
[P in keyof T]: null;
|
||||
};
|
||||
|
||||
export type PureRenote =
|
||||
Omit<Note, 'renote' | 'renoteId' | 'reply' | 'replyId' | 'text' | 'cw' | 'files' | 'fileIds' | 'poll'>
|
||||
& AllNullRecord<Pick<Note, 'reply' | 'replyId' | 'text' | 'cw' | 'poll'>>
|
||||
& { files: []; fileIds: []; }
|
||||
& NonNullableRecord<Pick<Note, 'renote' | 'renoteId'>>;
|
||||
|
||||
export type PageEvent = {
|
||||
pageId: Page['id'];
|
||||
event: string;
|
||||
|
Reference in New Issue
Block a user