Phase 1 Batch 2: Logger & Simple Utilities Replaced any types with proper TypeScript types across 3 files: - logger.ts: Created LogContext type, added RequestEvent import from SvelteKit - Defined LogContext = Record<string, string | number | boolean | null | undefined> - Changed all context parameters from Record<string, any> to LogContext - Changed event parameter in createRequestLogger from any to RequestEvent - extractEmbeds.ts: Used TiptapNode type from editor.ts - Changed content and node parameters from any to TiptapNode - global.d.ts: Improved SVG module declarations - Changed *.svg from any to string (raw SVG content) - Changed *.svg?component from any to Component<any> (Svelte component) Progress: 199 → 185 errors (91 → 77 any-type errors)
20 lines
361 B
TypeScript
20 lines
361 B
TypeScript
declare module '*.svg' {
|
|
const content: string
|
|
export default content
|
|
}
|
|
|
|
declare module '*.svg?component' {
|
|
import type { Component } from 'svelte'
|
|
const content: Component
|
|
export default content
|
|
}
|
|
|
|
declare module '*.svg?src' {
|
|
const content: string
|
|
export default content
|
|
}
|
|
|
|
declare module '*.svg?url' {
|
|
const content: string
|
|
export default content
|
|
}
|