Skip to content

Commit

Permalink
docs: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-R44 committed Jan 6, 2024
1 parent 874eacb commit fcea658
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/content/docs/extend/custom_lock_store.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ summary: Learn how to create a custom lock driver for Verrou

# Create a custom lock driver

Extending Verrou with your own cache driver is easy. What you need is a class that implements the `LockStore` interface accessible from `verrou/types`. The interface is defined as follows:
Extending Verrou with your own cache driver is easy. What you need is a class that implements the `LockStore` interface accessible from `@verrou/core/types`. The interface is defined as follows:

```ts
interface LockStore {
Expand All @@ -16,7 +16,7 @@ interface LockStore {
}
```

Feel free to take a lot at [the existing drivers](https://github.com/Julien-R44/verrou/tree/develop/src/drivers) implementations for inspiration.
Feel free to take a look at [the existing drivers](https://github.com/Julien-R44/verrou/tree/develop/src/drivers) implementations for inspiration.

Once you defined you driver, you can create a factory function that will be used by Verrou to create instances of your driver at runtime. The factory function must be something like this:

Expand Down Expand Up @@ -47,9 +47,9 @@ const verrou = new Verrou({
If you want to test your driver and its compliance, Verrou is shipped with a test suite for [Japa](https://japa.dev/docs) that you can use. Note that you will also need to have `@japa/assert` installed. Then, you can use it like this:

```ts
// title: tests/my_driver.spec.ts
// title: tests/my_store.spec.ts
import { test } from '@japa/runner'
import { MyDriver } from '../src/my_driver.js'
import { MyStore } from '../src/my_store.js'
import { registerStoreTestSuite } from '@verrou/core/test_suite'

test.group('My Store', (group) => {
Expand Down

0 comments on commit fcea658

Please sign in to comment.