fix: correct TypeScript types for roaring bitmap API

- Change EntityIdMapper to use StorageAdapter interface instead of BaseStorage
- Use RoaringBitmap32.orMany() for multiple bitmap OR operations
- Use manual reduction for AND operations (no andMany available)
- Fixes TypeScript compilation errors
This commit is contained in:
David Snelling 2025-10-13 16:42:45 -07:00
parent aeffd32fe0
commit f35cfd4f19
2 changed files with 9 additions and 5 deletions

View file

@ -13,10 +13,10 @@
* @module utils/entityIdMapper
*/
import type { BaseStorage } from '../storage/baseStorage.js'
import type { StorageAdapter } from '../coreTypes.js'
export interface EntityIdMapperOptions {
storage: BaseStorage
storage: StorageAdapter
storageKey?: string
}
@ -30,7 +30,7 @@ export interface EntityIdMapperData {
* Maps entity UUIDs to integer IDs for use with Roaring Bitmaps
*/
export class EntityIdMapper {
private storage: BaseStorage
private storage: StorageAdapter
private storageKey: string
// Bidirectional maps