diff options
Diffstat (limited to 'apps/web/src/types')
| -rw-r--r-- | apps/web/src/types/global.d.ts | 19 | ||||
| -rw-r--r-- | apps/web/src/types/modules.d.ts | 64 |
2 files changed, 83 insertions, 0 deletions
diff --git a/apps/web/src/types/global.d.ts b/apps/web/src/types/global.d.ts new file mode 100644 index 00000000..f99e4cc3 --- /dev/null +++ b/apps/web/src/types/global.d.ts @@ -0,0 +1,19 @@ +/// <reference types="react" /> +/// <reference types="react-dom" /> + +// Global React types +declare global { + namespace JSX { + interface IntrinsicElements { + [elemName: string]: any; + } + } +} + +// React module declarations +declare module 'react' { + export * from '@types/react'; +} + +// Ensure this file is treated as a module +export {};
\ No newline at end of file diff --git a/apps/web/src/types/modules.d.ts b/apps/web/src/types/modules.d.ts new file mode 100644 index 00000000..945b23fb --- /dev/null +++ b/apps/web/src/types/modules.d.ts @@ -0,0 +1,64 @@ +// Type declarations for external modules without @types packages + +declare module 'lucide-react' { + import { FC, SVGProps } from 'react'; + + export interface IconProps extends SVGProps<SVGSVGElement> { + size?: string | number; + strokeWidth?: string | number; + } + + export const Scissors: FC<IconProps>; + export const ArrowLeftToLine: FC<IconProps>; + export const ArrowRightToLine: FC<IconProps>; + export const Trash2: FC<IconProps>; + export const Snowflake: FC<IconProps>; + export const Copy: FC<IconProps>; + export const SplitSquareHorizontal: FC<IconProps>; + export const Pause: FC<IconProps>; + export const Play: FC<IconProps>; + export const Video: FC<IconProps>; + export const Music: FC<IconProps>; + export const TypeIcon: FC<IconProps>; + export const Magnet: FC<IconProps>; + export const Lock: FC<IconProps>; + export const ChevronLeft: FC<IconProps>; + export const Download: FC<IconProps>; + export const Keyboard: FC<IconProps>; + export const SkipBack: FC<IconProps>; + export const SkipForward: FC<IconProps>; + // Add other icons as needed +} + +declare module 'sonner' { + export interface ToastOptions { + duration?: number; + position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center'; + style?: React.CSSProperties; + className?: string; + description?: string; + action?: { + label: string; + onClick: () => void; + }; + cancel?: { + label: string; + onClick?: () => void; + }; + id?: string | number; + onDismiss?: (toast: any) => void; + onAutoClose?: (toast: any) => void; + } + + export interface Toast { + success: (message: string, options?: ToastOptions) => void; + error: (message: string, options?: ToastOptions) => void; + info: (message: string, options?: ToastOptions) => void; + warning: (message: string, options?: ToastOptions) => void; + loading: (message: string, options?: ToastOptions) => void; + custom: (jsx: React.ReactNode, options?: ToastOptions) => void; + } + + export const toast: Toast; + export const Toaster: React.FC<any>; +}
\ No newline at end of file |
