Skip to content

Commit ab944eb

Browse files
author
Hyunje Jun
committed
Fix type of postback.params
It's actually an object. A typo in devdocs will be fixed soon.
1 parent 3f30db2 commit ab944eb

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

types/global.d.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@ declare namespace Line {
4343
export type LeaveEvent = { type: "leave" } & EventBase;
4444
export type PostbackEvent = {
4545
type: "postback",
46-
postback: {
47-
data: string,
48-
params?: string,
49-
},
46+
postback: Postback,
5047
} & ReplyableEvent;
5148
export type BeaconEvent = ReplyableEvent & {
5249
type: "beacon",
@@ -84,6 +81,15 @@ declare namespace Line {
8481
stickerId: string,
8582
} & EventMessageBase;
8683

84+
export type Postback = {
85+
data: string,
86+
params?: {
87+
date?: string,
88+
time?: string,
89+
datetime?: string,
90+
},
91+
};
92+
8793
export type Message =
8894
TextMessage | ImageMessage | VideoMessage | AudioMessage |
8995
LocationMessage | StickerMessage | ImageMapMessage |

0 commit comments

Comments
 (0)