diff --git a/deno.json b/deno.json index 741af34..2cf2989 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@olli/kvdex", - "version": "3.1.1", + "version": "3.1.2", "exports": { ".": "./mod.ts", "./zod": "./src/ext/zod/mod.ts", diff --git a/src/collection.ts b/src/collection.ts index dfa0089..52d23e7 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -1,7 +1,7 @@ import type { BuilderFn, CheckKeyOf, - CollectionKeys, + CollectionInternals, CollectionOptions, CommitResult, DenoKv, @@ -10,14 +10,12 @@ import type { DenoKvEntryMaybe, DenoKvStrictKey, EncodedEntry, - Encoder, EnqueueOptions, FindManyOptions, FindOptions, HandleOneOptions, HistoryEntry, IdempotentListener, - IdGenerator, IdUpsert, IndexDataEntry, KvId, @@ -155,16 +153,7 @@ export class Collection< private idempotentListener: IdempotentListener; /** Used for internal workings, do not manipulate or rely on these properties. */ - readonly 一internal: { - readonly model: Model; - readonly primaryIndexList: string[]; - readonly secondaryIndexList: string[]; - readonly keys: CollectionKeys; - readonly idGenerator: IdGenerator>; - readonly encoder?: Encoder; - readonly isIndexable: boolean; - readonly keepsHistory: boolean; - }; + readonly 一internal: CollectionInternals; constructor( kv: DenoKv, diff --git a/src/types.ts b/src/types.ts index 35af534..7f4f004 100644 --- a/src/types.ts +++ b/src/types.ts @@ -286,6 +286,22 @@ export type AtomicSetOptions> = /* */ /************************/ +/** Used for internal workings, do not manipulate or rely on these properties. */ +export type CollectionInternals< + TInput, + TOutput extends KvValue, + TOptions extends CollectionOptions, +> = { + readonly model: Model; + readonly primaryIndexList: string[]; + readonly secondaryIndexList: string[]; + readonly keys: CollectionKeys; + readonly idGenerator: IdGenerator>; + readonly encoder?: Encoder; + readonly isIndexable: boolean; + readonly keepsHistory: boolean; +}; + /** Options for creating a new collection */ export type CollectionOptions = & {