message-and-event-objects.md
948 Bytes
Message and event objects
The message objects and event objects are plain JS objects with no
abstraction. This SDK provides TypeScript types for them, which can be imported
from @line/bot-sdk
.
Please beware that the types only work in TypeScript, and will be removed when built into JavaScript.
import {
// webhook event objects
WebhookEvent,
MessageEvent,
EventSource,
VideoEventMessage,
// message event objects
Message,
TemplateMessage,
TemplateContent,
} from "@line/bot-sdk";
For the actual type definitions, please refer to types.ts directly.
You can also refer to the official specification: