[BUG] 'FlexMessage' is not assignable to type 'Message' #1109
Closed
Description
Bug Report
Describe the bug
The message model in 'replyMessage' seems not compatible with the type exported with the @line/bot-sdk
To Reproduce
Steps to reproduce the behavior:
- example
import type { FlexMessage } from "@line/bot/sdk"
await this.client.replyMessage({
replyToken: event.replyToken,
messages: [
{
type: "text",
text: response
},
createEndSessionFlexMessage() as FlexMessage
]
});
error
Type 'FlexMessage' is not assignable to type '{ type: "flex"; altText: string; contents: FlexContainer; }'.
Types of property 'contents' are incompatible.
Expected behavior
It should be no type error between two kinds of 'FlexMessage' from model/flexMessage.ts
and types.ts
Environment (please complete the following information):
- OS: [e.g. macOS]
- Node.js Version [e.g. Node 20]
- line-bot-sdk-nodejs version(s) [e.g. 9.5.0]