Skip to content

Commit d9ed71b

Browse files
committed
Adapt and fix wrong examples in programmability doc
1 parent d96cb02 commit d9ed71b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

docs/programmability.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ FUNCTION LOAD "#!lua name=library\nredis.register_function{function_name='add',
2525
Load the prior redis function on the _redis server_ before running the example below.
2626

2727
```typescript
28-
import { CommandParser } from '@redis/client/lib/client/parser';
29-
import { NumberReply } from '@redis/client/lib/RESP/types';
30-
import { createClient, RedisArgument } from 'redis';
28+
import { CommandParser, createClient, RedisArgument } from '@redis/client';
29+
import { NumberReply } from '@redis/client/dist/lib/RESP/types.js';
3130

3231
const client = createClient({
3332
functions: {
@@ -58,9 +57,8 @@ await client.library.add('key', '2'); // 3
5857
The following is an end-to-end example of the prior concept.
5958

6059
```typescript
61-
import { CommandParser } from '@redis/client/lib/client/parser';
62-
import { NumberReply } from '@redis/client/lib/RESP/types';
63-
import { createClient, defineScript, RedisArgument } from 'redis';
60+
import { CommandParser, createClient, defineScript, RedisArgument } from '@redis/client';
61+
import { NumberReply } from '@redis/client/dist/lib/RESP/types.js';
6462

6563
const client = createClient({
6664
scripts: {

0 commit comments

Comments
 (0)