- Replace 37 instances of 'any' type with proper TypeScript types - Fix trailing spaces in i18n.test.ts - Add proper interfaces for profanity analysis and matches - Extend Express Request interface with custom properties - Fix error handling in ProfanityFilterService for constraint violations - Update test mocks to satisfy TypeScript strict checking - All 147 tests now pass with 0 linting errors 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
31 lines
No EOL
1 KiB
TypeScript
31 lines
No EOL
1 KiB
TypeScript
/**
|
|
* Main app entry point - uses shared components
|
|
*/
|
|
|
|
import { SharedHeader } from './components/SharedHeader';
|
|
import { SharedFooter } from './components/SharedFooter';
|
|
|
|
// Initialize shared components when DOM is ready
|
|
function initializeApp() {
|
|
// Render header
|
|
const header = SharedHeader.createMainHeader();
|
|
header.render();
|
|
|
|
// Render footer
|
|
const footer = SharedFooter.createStandardFooter();
|
|
footer.render();
|
|
|
|
// The rest of the app logic (map, form, etc.) remains in the existing app.js
|
|
// This just adds the shared components
|
|
}
|
|
|
|
// Wait for DOM and i18n to be ready
|
|
if (document.readyState === 'loading') {
|
|
document.addEventListener('DOMContentLoaded', initializeApp);
|
|
} else {
|
|
initializeApp();
|
|
}
|
|
|
|
// Export for use in other scripts if needed
|
|
(window as Window & typeof globalThis & { SharedHeader?: typeof SharedHeader; SharedFooter?: typeof SharedFooter }).SharedHeader = SharedHeader;
|
|
(window as Window & typeof globalThis & { SharedHeader?: typeof SharedHeader; SharedFooter?: typeof SharedFooter }).SharedFooter = SharedFooter; |