fix(lint): use SvelteMap instead of native Map
- commit
- 27eb0fa82c2cf34460cf193eaaea7e620b9c4609
- author
- Kit · · 2026-01-24 05:28 UTC
- parent
- 128e01c
- signature
- SSH Unverified
SHA256:H91DFuEG4jpk5edzLA4aUKkpv4zv9Q339ipRmkph6TkThe key is unknown
1 file · +2 -2
M src/lib/components/chat-room.svelte +2 -2
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | import type { Id } from '../../convex/_generated/dataModel'; | |
| 6 | 6 | import type { Message, EnrichedMessage, SafeUser } from '../types/chat'; | |
| 7 | 7 | import { onMount, tick } from 'svelte'; | |
| 8 | - | import { SvelteSet } from 'svelte/reactivity'; | |
| 8 | + | import { SvelteSet, SvelteMap } from 'svelte/reactivity'; | |
| 9 | 9 | import { browser } from '$app/environment'; | |
| 10 | 10 | import { draggable } from '$lib/actions/draggable'; | |
| 11 | 11 | import { resizable } from '$lib/actions/resizable'; | |
| @@ -394,7 +394,7 @@ | |||
| 394 | 394 | mentionObserver.disconnect(); | |
| 395 | 395 | } | |
| 396 | 396 | // Precompute message timestamp map to avoid O(n) lookup in callback | |
| 397 | - | const messageTimestampMap = new Map<string, number>(); | |
| 397 | + | const messageTimestampMap = new SvelteMap<string, number>(); | |
| 398 | 398 | for (const msg of visibleMessages) { | |
| 399 | 399 | messageTimestampMap.set(msg.id, msg.timestamp); | |
| 400 | 400 | } | |
| @@ -5,7 +5,7 @@ | |||||
| 5 | import type { Id } from '../../convex/_generated/dataModel'; | 5 | import type { Id } from '../../convex/_generated/dataModel'; | ||
| 6 | import type { Message, EnrichedMessage, SafeUser } from '../types/chat'; | 6 | import type { Message, EnrichedMessage, SafeUser } from '../types/chat'; | ||
| 7 | import { onMount, tick } from 'svelte'; | 7 | import { onMount, tick } from 'svelte'; | ||
| 8 | - | import { SvelteSet } from 'svelte/reactivity'; | 8 | + | import { SvelteSet, SvelteMap } from 'svelte/reactivity'; |
| 9 | import { browser } from '$app/environment'; | 9 | import { browser } from '$app/environment'; | ||
| 10 | import { draggable } from '$lib/actions/draggable'; | 10 | import { draggable } from '$lib/actions/draggable'; | ||
| 11 | import { resizable } from '$lib/actions/resizable'; | 11 | import { resizable } from '$lib/actions/resizable'; | ||
| @@ -394,7 +394,7 @@ | |||||
| 394 | mentionObserver.disconnect(); | 394 | mentionObserver.disconnect(); | ||
| 395 | } | 395 | } | ||
| 396 | // Precompute message timestamp map to avoid O(n) lookup in callback | 396 | // Precompute message timestamp map to avoid O(n) lookup in callback | ||
| 397 | - | const messageTimestampMap = new Map<string, number>(); | 397 | + | const messageTimestampMap = new SvelteMap<string, number>(); |
| 398 | for (const msg of visibleMessages) { | 398 | for (const msg of visibleMessages) { | ||
| 399 | messageTimestampMap.set(msg.id, msg.timestamp); | 399 | messageTimestampMap.set(msg.id, msg.timestamp); | ||
| 400 | } | 400 | } | ||