Skip to content

Commit 1bf9ed6

Browse files
authored
Fix using deprecated Client class in TypeScript example documentation (#1303)
Reslove #1276
1 parent 8d6fc79 commit 1bf9ed6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docs/guide/typescript.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,21 @@ there you go.
5858
``` typescript
5959
import {
6060
// main APIs
61-
Client,
61+
messagingApi,
6262
middleware,
63+
64+
// webhook
65+
webhook,
6366

6467
// exceptions
6568
JSONParseError,
6669
SignatureValidationFailed,
67-
68-
// types
69-
TemplateMessage,
70-
WebhookEvent,
7170
} from "@line/bot-sdk";
71+
72+
// For example, you can use MessagingApiClient like this:
73+
const { MessagingApiClient } = messagingApi;
7274
```
7375

7476
Message object and webhook event types can be also imported from `@line/bot-sdk`,
75-
e.g. `TemplateMessage` or `Event`. For declarations of the types, please
77+
e.g. `messagingApi.TemplateMessage` or `webhook.Event`. For declarations of the types, please
7678
refer to [lib/](https://github.com/line/line-bot-sdk-nodejs/blob/master/lib/).

0 commit comments

Comments
 (0)