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

+3 -3
View File
@@ -67,7 +67,7 @@ export class PluginSpecificStyleHandler {
// Extract Dataview table styles
const dataviewTables = document.querySelectorAll('.dataview.table-view-table');
for (const table of dataviewTables) {
for (const table of Array.from(dataviewTables)) {
const computedStyle = getComputedStyle(table);
styles.push({
selector: '.dataview.table-view-table',
@@ -162,7 +162,7 @@ export class PluginSpecificStyleHandler {
// Extract Templater command styles
const templaterCommands = document.querySelectorAll('.cm-templater-command, .templater-command');
for (const command of templaterCommands) {
for (const command of Array.from(templaterCommands)) {
const computedStyle = getComputedStyle(command);
styles.push({
selector: '.templater-command',
@@ -630,7 +630,7 @@ export class PluginSpecificStyleHandler {
for (const mutation of mutations) {
if (mutation.type === 'childList') {
for (const node of mutation.addedNodes) {
for (const node of Array.from(mutation.addedNodes)) {
if (node instanceof Element) {
// Check if added element contains plugin-specific classes
for (const [_, plugin] of this.registeredPlugins) {