Autoformat using Prettier
This commit is contained in:
parent
320a8d31c1
commit
648a7ab1bb
|
@ -76,7 +76,7 @@ const toSection = (
|
|||
case 'thisMonth':
|
||||
return {
|
||||
type: firstMessageWithSection.type,
|
||||
messages: messages,
|
||||
messages,
|
||||
};
|
||||
case 'yearMonth':
|
||||
return {
|
||||
|
@ -94,11 +94,11 @@ const toSection = (
|
|||
}
|
||||
};
|
||||
|
||||
type GenericMessageWithSection<T> = {
|
||||
interface GenericMessageWithSection<T> {
|
||||
order: number;
|
||||
type: T;
|
||||
message: Message;
|
||||
};
|
||||
}
|
||||
type MessageWithStaticSection = GenericMessageWithSection<StaticSectionType>;
|
||||
type MessageWithYearMonthSection = GenericMessageWithSection<
|
||||
YearMonthSectionType
|
||||
|
|
|
@ -57,7 +57,7 @@ describe('HTML', () => {
|
|||
},
|
||||
];
|
||||
|
||||
TESTS.forEach((test) => {
|
||||
TESTS.forEach(test => {
|
||||
(test.skipped ? it.skip : it)(`should handle ${test.name}`, () => {
|
||||
const preText = test.preText || 'Hello ';
|
||||
const postText = test.postText || ' World!';
|
||||
|
|
|
@ -66,16 +66,20 @@ type SharedMessageProperties = Readonly<{
|
|||
timestamp: number;
|
||||
}>;
|
||||
|
||||
type ExpirationTimerUpdate = Readonly<{
|
||||
expirationTimerUpdate?: Readonly<{
|
||||
expireTimer: number;
|
||||
fromSync: boolean;
|
||||
source: string; // PhoneNumber
|
||||
}>;
|
||||
}>;
|
||||
type ExpirationTimerUpdate = Partial<
|
||||
Readonly<{
|
||||
expirationTimerUpdate: Readonly<{
|
||||
expireTimer: number;
|
||||
fromSync: boolean;
|
||||
source: string; // PhoneNumber
|
||||
}>;
|
||||
}>
|
||||
>;
|
||||
|
||||
type Message4 = Partial<Readonly<{
|
||||
hasAttachments: IndexableBoolean;
|
||||
hasVisualMediaAttachments: IndexableBoolean;
|
||||
hasFileAttachments: IndexableBoolean;
|
||||
}>>;
|
||||
type Message4 = Partial<
|
||||
Readonly<{
|
||||
hasAttachments: IndexableBoolean;
|
||||
hasVisualMediaAttachments: IndexableBoolean;
|
||||
hasFileAttachments: IndexableBoolean;
|
||||
}>
|
||||
>;
|
||||
|
|
|
@ -6,6 +6,6 @@ import { Model } from './Model';
|
|||
export interface Collection<T> {
|
||||
models: Array<Model<T>>;
|
||||
// tslint:disable-next-line no-misused-new
|
||||
new(): Collection<T>;
|
||||
new (): Collection<T>;
|
||||
fetch(options: object): JQuery.Deferred<any, any, any>;
|
||||
}
|
||||
|
|
|
@ -8,18 +8,20 @@ import * as IndexedDB from '../IndexedDB';
|
|||
import { Message } from '../Message';
|
||||
|
||||
export const initializeAttachmentMetadata = async (
|
||||
message: Message,
|
||||
message: Message
|
||||
): Promise<Message> => {
|
||||
if (message.type === 'verified-change') {
|
||||
return message;
|
||||
}
|
||||
|
||||
const hasAttachments = IndexedDB.toIndexableBoolean(message.attachments.length > 0);
|
||||
const hasAttachments = IndexedDB.toIndexableBoolean(
|
||||
message.attachments.length > 0
|
||||
);
|
||||
const [hasVisualMediaAttachments, hasFileAttachments] = partition(
|
||||
message.attachments,
|
||||
Attachment.isVisualMedia,
|
||||
Attachment.isVisualMedia
|
||||
)
|
||||
.map((attachments) => attachments.length > 0)
|
||||
.map(attachments => attachments.length > 0)
|
||||
.map(IndexedDB.toIndexableBoolean);
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue