fix: resolve all TypeScript build errors and improve type safety

Comprehensive fix for 26+ TypeScript compilation errors to enable successful builds:

- Update tsconfig.json: Add ES2015/ES2017 libs for iterator support
- Add missing type exports: Create central export location in CSSExtractor.ts
- Fix interface definitions: Add optimizeForPrint to MappingOptions
- Fix access modifiers: Make mapCSSProperty public in CSSToTypstMapper
- Add missing methods: getEnhancedThemeProfile and extractThemeStyles to PopularThemeSupport
- Fix null/undefined type issues: Update return types for proper TypeScript compliance
- Fix NodeList iteration: Convert to Array.from() for ES6 iterator compatibility
- Fix template validator: Resolve condition logic and index signature errors

All TypeScript compilation errors are now resolved while maintaining code functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jarvis committed 2025-08-31 16:10:59 +02:00
1 parent 532bc04455
commit 3fd6dde592
11 files changed
+349 -60

No files matched your search

+2 -2
View File
@@ -82,12 +82,12 @@ export class HybridExportMode {
// Step 2: Detect and extract theme-specific styles
if (options.preserveThemeColors !== false) {
result.themeInfo = await this.themeManager.detectCurrentTheme();
result.themeInfo = await this.themeManager.detectCurrentTheme() || undefined;
if (result.themeInfo) {
const enhancedTheme = await this.themeSupport.getEnhancedThemeProfile(result.themeInfo.theme.name);
if (enhancedTheme) {
const themeStyles = await this.themeSupport.extractThemeStyles(enhancedTheme);
const themeStyles = await this.themeSupport.extractThemeStyles(result.themeInfo.theme.name);
result.extractedStyles.push(...themeStyles);
}
}