1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

add eslint-plugin-prettier

This commit is contained in:
Fedor Katurov 2025-01-24 17:51:59 +07:00
parent 0e4d2bf44d
commit ba0604ab9d
69 changed files with 419 additions and 249 deletions

View file

@ -153,13 +153,13 @@ export const NOTIFICATION_TYPES = {
};
export type IMessageNotification = {
type: typeof NOTIFICATION_TYPES['message'];
type: (typeof NOTIFICATION_TYPES)['message'];
content: Partial<IMessage>;
created_at: string;
};
export type ICommentNotification = {
type: typeof NOTIFICATION_TYPES['comment'];
type: (typeof NOTIFICATION_TYPES)['comment'];
content: Partial<IComment>;
created_at: string;
};

View file

@ -5,15 +5,14 @@ import type { SidebarComponents } from '~/constants/sidebar/components';
export type SidebarComponent = keyof SidebarComponents;
// TODO: use it to store props for sidebar
export type SidebarProps<
T extends SidebarComponent
> = SidebarComponents[T] extends FunctionComponent<infer U>
? U extends object
? U extends SidebarComponentProps<T>
? Omit<U, keyof SidebarComponentProps<T>>
export type SidebarProps<T extends SidebarComponent> =
SidebarComponents[T] extends FunctionComponent<infer U>
? U extends object
? U extends SidebarComponentProps<T>
? Omit<U, keyof SidebarComponentProps<T>>
: U
: U
: U
: {};
: {};
export interface SidebarComponentProps<T extends SidebarComponent> {
onRequestClose: () => void;
openSidebar: (name: T, props: SidebarProps<T>) => void;