Skip to content
This repository has been archived by the owner on Jul 4, 2020. It is now read-only.

Commit

Permalink
feat: add types for getContext function
Browse files Browse the repository at this point in the history
  • Loading branch information
sskmy1024y committed Feb 27, 2020
1 parent fd68636 commit d8919bf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@ declare interface Friendship {
friendFlag: boolean
}

declare type LiffContextData = {
type: 'utou' | 'room' | 'group' | 'none',
viewType: 'compact' | 'tall' | 'full',
userId?: string,
utouId?: string,
roomId?: string,
groupId?: string,
}

declare global {
namespace liff {
/**
Expand Down Expand Up @@ -156,6 +165,11 @@ declare global {
*/
function logout(): void

/**
* Gets the screen type (1-on-1 chat, group, or room) and the ID that identifies the screen from which the LIFF application is launched.
*/
function getContext(): LiffContextData

/**
* Opens the specified URL in the in-app browser of LINE or external browser.
*/
Expand Down

0 comments on commit d8919bf

Please sign in to comment.