diff --git a/deno.json b/deno.json index 0924a30..278191d 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@olli/kvdex", - "version": "3.0.0", + "version": "3.0.1", "exports": { ".": "./mod.ts", "./zod": "./src/ext/zod/mod.ts", diff --git a/src/kvdex.ts b/src/kvdex.ts index 29dde2c..8ceaa1f 100644 --- a/src/kvdex.ts +++ b/src/kvdex.ts @@ -79,9 +79,9 @@ import { AtomicWrapper } from "./atomic_wrapper.ts"; * @param schemaDefinition - The schema definition used to build collections and create the database schema. * @returns A Kvdex instance with attached schema. */ -export function kvdex( - options: T, -): Kvdex> & Schema { +export function kvdex( + options: KvdexOptions, +): Kvdex> & Schema { // Set listener activated flag and queue handlers map let listener: Promise; const queueHandlers = new Map[]>(); @@ -117,7 +117,7 @@ export function kvdex( options.kv, queueHandlers, idempotentListener, - ) as Schema; + ) as Schema; // Create KvDex object const db = new Kvdex( diff --git a/src/types.ts b/src/types.ts index 08ea624..31e8b16 100644 --- a/src/types.ts +++ b/src/types.ts @@ -635,12 +635,12 @@ export type Schema = T extends undefined }; /** Database options */ -export type KvdexOptions = { +export type KvdexOptions = { /** The KV instance that will power the database. */ kv: DenoKv; /** Schema definition containing the database collections */ - schema?: SchemaDefinition; + schema?: T; }; /*******************/