Skip to content

Commit

Permalink
Fix type of postback.params
Browse files Browse the repository at this point in the history
It's actually an object. A typo in devdocs will be fixed soon.
  • Loading branch information
Hyunje Jun committed Sep 19, 2017
1 parent 3f30db2 commit ab944eb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ declare namespace Line {
export type LeaveEvent = { type: "leave" } & EventBase;
export type PostbackEvent = {
type: "postback",
postback: {
data: string,
params?: string,
},
postback: Postback,
} & ReplyableEvent;
export type BeaconEvent = ReplyableEvent & {
type: "beacon",
Expand Down Expand Up @@ -84,6 +81,15 @@ declare namespace Line {
stickerId: string,
} & EventMessageBase;

export type Postback = {
data: string,
params?: {
date?: string,
time?: string,
datetime?: string,
},
};

export type Message =
TextMessage | ImageMessage | VideoMessage | AudioMessage |
LocationMessage | StickerMessage | ImageMapMessage |
Expand Down

0 comments on commit ab944eb

Please sign in to comment.