refactor: move all TypeScript interfaces to centralized src/js/types folder
- Create type files with barrel export via @/types alias - Update logic files to use centralized type imports
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { AddAttachmentState } from '@/types';
|
||||
import { showLoader, hideLoader, showAlert } from '../ui.js';
|
||||
import { downloadFile, formatBytes } from '../utils/helpers.js';
|
||||
import { createIcons, icons } from 'lucide';
|
||||
@@ -5,12 +6,6 @@ import { PDFDocument as PDFLibDocument } from 'pdf-lib';
|
||||
|
||||
const worker = new Worker(import.meta.env.BASE_URL + 'workers/add-attachments.worker.js');
|
||||
|
||||
interface AddAttachmentState {
|
||||
file: File | null;
|
||||
pdfDoc: PDFLibDocument | null;
|
||||
attachments: File[];
|
||||
}
|
||||
|
||||
const pageState: AddAttachmentState = {
|
||||
file: null,
|
||||
pdfDoc: null,
|
||||
|
||||
Reference in New Issue
Block a user