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:
parent
0e4d2bf44d
commit
ba0604ab9d
69 changed files with 419 additions and 249 deletions
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue