Skip to content

Commit

Permalink
docs(README): explain better
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdavipanah committed Dec 12, 2024
1 parent 8a62aeb commit 5b94248
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ This will prefix all keys with `my-namespace::`.

## Typescript

When initializing `KeyvUpstash`, you can specify the type of the values you are storing:
When initializing `KeyvUpstash`, you can specify the type of the values you are storing and you can also specify types when calling methods:

```typescript
import Keyv from "keyv"
Expand All @@ -131,7 +131,7 @@ await keyv.set("user:1", { id: 1, name: "Alice" })
const user = await keyv.get("user:1")
console.log(user.name) // 'Alice'

// You can also specify types when calling methods
// specify types when calling methods
const user = await keyv.get<User>("user:1")
console.log(user.name) // 'Alice'
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "keyv-upstash",
"version": "1.0.7",
"version": "1.0.8",
"description": "Upstash Redis adapter for Keyv",
"type": "module",
"main": "dist/index.cjs",
Expand Down

0 comments on commit 5b94248

Please sign in to comment.