Update prettier to 3.3.3

This commit is contained in:
Fedor Indutny 2024-07-23 17:31:40 -07:00 committed by GitHub
parent 1773ad1e11
commit 24a22bf191
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
109 changed files with 452 additions and 392 deletions

View file

@ -49,9 +49,9 @@ export type ContactAvatarType =
hash?: string;
};
type GroupAvatarIconType = typeof GroupAvatarIcons[number];
type GroupAvatarIconType = (typeof GroupAvatarIcons)[number];
type PersonalAvatarIconType = typeof PersonalAvatarIcons[number];
type PersonalAvatarIconType = (typeof PersonalAvatarIcons)[number];
export type AvatarIconType = GroupAvatarIconType | PersonalAvatarIconType;

View file

@ -84,7 +84,7 @@ export namespace BodyRange {
return ('url' as const) in node;
}
export function isDisplayOnly<
T extends Mention | Link | Formatting | DisplayOnly
T extends Mention | Link | Formatting | DisplayOnly,
>(node: T): node is T & DisplayOnly {
// satisfies keyof DisplayOnly
return ('displayStyle' as const) in node;

View file

@ -82,7 +82,7 @@ export type ActiveDirectCallType = ActiveCallBaseType & {
// GroupCallRemoteParticipantType below (which is based on
// ConversationType).
serviceId?: ServiceIdString;
}
},
];
};

View file

@ -156,7 +156,7 @@ export const ContactNameColors = [
'110',
];
export type ContactNameColorType = typeof ContactNameColors[number];
export type ContactNameColorType = (typeof ContactNameColors)[number];
export type CustomColorType = {
start: { hue: number; saturation: number };
@ -164,10 +164,10 @@ export type CustomColorType = {
deg?: number;
};
export type AvatarColorType = typeof AvatarColors[number];
export type AvatarColorType = (typeof AvatarColors)[number];
export type ConversationColorType =
| typeof ConversationColors[number]
| (typeof ConversationColors)[number]
| 'custom';
export type CustomColorDataType = {

View file

@ -40,7 +40,7 @@ export type LocalizerType = {
? [params?: undefined, options?: LocalizerOptions]
: [
params: ICUStringMessageParamsByKeyType[Key],
options?: LocalizerOptions
options?: LocalizerOptions,
]
): string;
getIntl(): IntlShape;
@ -69,13 +69,13 @@ export enum ScrollBehavior {
type InternalAssertProps<
Result,
Value,
Missing = Omit<Result, keyof Value>
Missing = Omit<Result, keyof Value>,
> = keyof Missing extends never
? Result
: Result & {
[key in keyof Required<Missing>]: [
never,
'AssertProps: missing property'
'AssertProps: missing property',
];
};
@ -87,21 +87,19 @@ export type BytesToStrings<Value> = Value extends Uint8Array
? string
: { [Key in keyof Value]: BytesToStrings<Value[Key]> };
export type JSONWithUnknownFields<Value> = Value extends Record<
string | symbol | number,
unknown
>
? Readonly<
{
[Key in keyof Value]: JSONWithUnknownFields<Value[Key]>;
} & {
// Make sure that rest property is required to handle.
__rest: never;
}
>
: Value extends Array<infer E>
? ReadonlyArray<JSONWithUnknownFields<E>>
: Value;
export type JSONWithUnknownFields<Value> =
Value extends Record<string | symbol | number, unknown>
? Readonly<
{
[Key in keyof Value]: JSONWithUnknownFields<Value[Key]>;
} & {
// Make sure that rest property is required to handle.
__rest: never;
}
>
: Value extends Array<infer E>
? ReadonlyArray<JSONWithUnknownFields<E>>
: Value;
export type WithRequiredProperties<T, P extends keyof T> = Omit<T, P> &
Required<Pick<T, P>>;