Files
bentopdf/src/js/state.ts
abdullahalam123 5e72d7ca2d feat(test): add comprehensive test suite and testing infrastructure
- Add vitest configuration with coverage reporting
- Create test setup file with DOM mocks
- Add tests for state management, helpers, and tool configurations
- Update tsconfig and package.json for testing support
- Clean up unused comments and improve code style
2025-10-12 17:47:08 +05:30

17 lines
419 B
TypeScript

export const state = {
activeTool: null,
files: [],
pdfDoc: null,
pdfPages: [],
currentPdfUrl: null,
};
// Resets the state when switching views or completing an operation.
export function resetState() {
state.activeTool = null;
state.files = [];
state.pdfDoc = null;
state.pdfPages = [];
state.currentPdfUrl = null;
document.getElementById('tool-content').innerHTML = '';
}