jedmund-svelte/src/global.d.ts
Justin Edmund 9da0232d45 fix: replace any types in logger and utilities (14 errors)
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)
2025-11-24 01:55:25 -08:00

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
}