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,22 +1,10 @@
|
||||
import { EditAttachmentState, AttachmentInfo } from '@/types';
|
||||
import { showLoader, hideLoader, showAlert } from '../ui.js';
|
||||
import { downloadFile, formatBytes } from '../utils/helpers.js';
|
||||
import { createIcons, icons } from 'lucide';
|
||||
|
||||
const worker = new Worker(import.meta.env.BASE_URL + 'workers/edit-attachments.worker.js');
|
||||
|
||||
interface AttachmentInfo {
|
||||
index: number;
|
||||
name: string;
|
||||
page: number;
|
||||
data: Uint8Array;
|
||||
}
|
||||
|
||||
interface EditAttachmentState {
|
||||
file: File | null;
|
||||
allAttachments: AttachmentInfo[];
|
||||
attachmentsToRemove: Set<number>;
|
||||
}
|
||||
|
||||
const pageState: EditAttachmentState = {
|
||||
file: null,
|
||||
allAttachments: [],
|
||||
|
||||
Reference in New Issue
Block a user