Upgrade Prettier to 2.4.1
This commit is contained in:
parent
f204784afe
commit
5619eeca83
176 changed files with 1961 additions and 2465 deletions
|
@ -396,10 +396,10 @@ export async function captureDimensionsAndScreenshot(
|
|||
contentType: MIME.MIMEType
|
||||
) => string;
|
||||
revokeObjectUrl: (path: string) => void;
|
||||
getImageDimensions: (params: {
|
||||
objectUrl: string;
|
||||
logger: LoggerType;
|
||||
}) => { width: number; height: number };
|
||||
getImageDimensions: (params: { objectUrl: string; logger: LoggerType }) => {
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
makeImageThumbnail: (params: {
|
||||
size: number;
|
||||
objectUrl: string;
|
||||
|
|
|
@ -16,7 +16,8 @@ export type QualifiedAddressCreateOptionsType = Readonly<{
|
|||
deviceId: number;
|
||||
}>;
|
||||
|
||||
export type QualifiedAddressStringType = `${UUIDStringType}:${AddressStringType}`;
|
||||
export type QualifiedAddressStringType =
|
||||
`${UUIDStringType}:${AddressStringType}`;
|
||||
|
||||
export class QualifiedAddress {
|
||||
constructor(
|
||||
|
|
|
@ -374,11 +374,8 @@ export async function downloadEphemeralPack(
|
|||
packId: string,
|
||||
packKey: string
|
||||
): Promise<void> {
|
||||
const {
|
||||
stickerAdded,
|
||||
stickerPackAdded,
|
||||
stickerPackUpdated,
|
||||
} = getReduxStickerActions();
|
||||
const { stickerAdded, stickerPackAdded, stickerPackUpdated } =
|
||||
getReduxStickerActions();
|
||||
|
||||
const existingPack = getStickerPack(packId);
|
||||
if (
|
||||
|
@ -762,13 +759,10 @@ export async function copyStickerToAttachments(
|
|||
}
|
||||
|
||||
const { path: stickerPath } = sticker;
|
||||
const absolutePath = window.Signal.Migrations.getAbsoluteStickerPath(
|
||||
stickerPath
|
||||
);
|
||||
const {
|
||||
path,
|
||||
size,
|
||||
} = await window.Signal.Migrations.copyIntoAttachmentsDirectory(absolutePath);
|
||||
const absolutePath =
|
||||
window.Signal.Migrations.getAbsoluteStickerPath(stickerPath);
|
||||
const { path, size } =
|
||||
await window.Signal.Migrations.copyIntoAttachmentsDirectory(absolutePath);
|
||||
|
||||
const { data } = await window.Signal.Migrations.loadAttachmentData({
|
||||
path,
|
||||
|
|
|
@ -5,7 +5,8 @@ import { v4 as generateUUID } from 'uuid';
|
|||
|
||||
import { strictAssert } from '../util/assert';
|
||||
|
||||
export type UUIDStringType = `${string}-${string}-${string}-${string}-${string}`;
|
||||
export type UUIDStringType =
|
||||
`${string}-${string}-${string}-${string}-${string}`;
|
||||
|
||||
export const isValidUuid = (value: unknown): value is UUIDStringType =>
|
||||
typeof value === 'string' &&
|
||||
|
|
|
@ -42,13 +42,12 @@ type InternalAssertProps<
|
|||
Missing = Omit<Result, keyof Value>
|
||||
> = keyof Missing extends never
|
||||
? Result
|
||||
: Result &
|
||||
{
|
||||
[key in keyof Required<Missing>]: [
|
||||
never,
|
||||
'AssertProps: missing property'
|
||||
];
|
||||
};
|
||||
: Result & {
|
||||
[key in keyof Required<Missing>]: [
|
||||
never,
|
||||
'AssertProps: missing property'
|
||||
];
|
||||
};
|
||||
|
||||
export type AssertProps<Result, Value> = InternalAssertProps<Result, Value>;
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ import * as Attachment from '../Attachment';
|
|||
import * as IndexedDB from '../IndexedDB';
|
||||
import type { Message, UserMessage } from '../Message';
|
||||
|
||||
const hasAttachment = (
|
||||
predicate: (value: Attachment.AttachmentType) => boolean
|
||||
) => (message: UserMessage): IndexedDB.IndexablePresence =>
|
||||
IndexedDB.toIndexablePresence(message.attachments.some(predicate));
|
||||
const hasAttachment =
|
||||
(predicate: (value: Attachment.AttachmentType) => boolean) =>
|
||||
(message: UserMessage): IndexedDB.IndexablePresence =>
|
||||
IndexedDB.toIndexablePresence(message.attachments.some(predicate));
|
||||
|
||||
const hasFileAttachment = hasAttachment(Attachment.isFile);
|
||||
const hasVisualMediaAttachment = hasAttachment(Attachment.isVisualMedia);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue