felipebarcelospro / drift-kv

A powerful ORM for Deno KV with integrated support for database operations, real-time subscriptions, task queues, plugin system, and typed queries
https://felipebarcelospro.github.io/drift-kv/
MIT License
4 stars 0 forks source link

fix(kv): Add proper Deno KV client type casting #2

Open felipebarcelospro opened 1 month ago

felipebarcelospro commented 1 month ago

Describe the bug The current implementation uses an unsafe type casting for the Deno KV client, which could lead to type-safety issues and potential runtime errors.

To Reproduce

  1. Initialize Drift with Deno KV client in index.ts
  2. Current implementation uses unsafe type casting
  3. This type casting bypasses TypeScript's type safety
  4. Could cause runtime errors if types don't match

Expected behavior Proper type definitions and integration between Deno KV and Drift KV types, ensuring type safety without unsafe casting.

Environment:

Additional context The issue can be found in the Drift initialization section of index.ts.

github-actions[bot] commented 1 month ago

👋 Thanks for opening your first issue in Drift KV! We'll review it soon.

Meanwhile, please make sure you've read our contributing guidelines.