diff --git a/src/database.ts b/src/database.ts index cc823e6..fe364b1 100644 --- a/src/database.ts +++ b/src/database.ts @@ -4,6 +4,7 @@ import * as R from 'fp-ts/lib/Record'; import * as TE from 'fp-ts/lib/TaskEither'; import * as t from 'io-ts'; +import type { ReadonlyRecord } from 'fp-ts/lib/ReadonlyRecord'; import { pipe } from 'fp-ts/lib/function'; type StoreName = string; @@ -11,10 +12,10 @@ type Store = { key: string, codec: StoreC }; export type DBSchema = { version: number; - stores: Record>; + stores: ReadonlyRecord>; }; -export type DBSchemas = Array>; +export type DBSchemas = ReadonlyArray>; export type DatabaseInfo = { database: IDBDatabase, schema: DBSchema }; export type IndexedDbError = DOMException | Error;