Convert ReactWrapperView to TypeScript

This commit is contained in:
Evan Hahn 2022-06-03 16:33:39 +00:00 committed by GitHub
parent bb9a270bfd
commit 63189f3f91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 325 additions and 364 deletions

View file

@ -1,27 +1,26 @@
// Copyright 2021 Signal Messenger, LLC
// Copyright 2021-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { MessageAttributesType } from '../model-types.d';
import type { AttachmentType } from './Attachment';
import type { MIMEType } from './MIME';
export type MessageAttributesType = {
attachments: Array<AttachmentType>;
conversationId: string;
id: string;
// eslint-disable-next-line camelcase
received_at: number;
// eslint-disable-next-line camelcase
received_at_ms: number;
// eslint-disable-next-line camelcase
sent_at: number;
};
export type MediaItemMessageType = Pick<
MessageAttributesType,
| 'attachments'
| 'conversationId'
| 'id'
| 'received_at'
| 'received_at_ms'
| 'sent_at'
>;
export type MediaItemType = {
attachment: AttachmentType;
contentType?: MIMEType;
index: number;
loop?: boolean;
message: MessageAttributesType;
message: MediaItemMessageType;
objectURL?: string;
thumbnailObjectUrl?: string;
};