Teleforge API Reference - v0.1.0
Preparing search index...
web/src
TelegramWebApp
Interface TelegramWebApp
interface
TelegramWebApp
{
BackButton
?:
BackButton
;
CloudStorage
?:
CloudStorage
;
HapticFeedback
?:
HapticFeedback
;
MainButton
?:
MainButton
;
close
()
:
void
;
colorScheme
:
WebAppColorScheme
;
expand
()
:
void
;
initData
:
string
;
initDataUnsafe
:
WebAppInitData
;
isExpanded
:
boolean
;
offEvent
(
event
:
WebAppEvent
,
callback
:
()
=>
void
)
:
void
;
onEvent
(
event
:
WebAppEvent
,
callback
:
()
=>
void
)
:
void
;
openLink
(
url
:
string
,
options
?:
{
try_instant_view
?:
boolean
}
)
:
void
;
openTelegramLink
(
url
:
string
)
:
void
;
platform
:
string
;
ready
()
:
void
;
sendData
(
data
:
string
)
:
void
;
showAlert
(
message
:
string
,
callback
?:
()
=>
void
)
:
void
;
showConfirm
(
message
:
string
,
callback
?:
(
confirmed
:
boolean
)
=>
void
)
:
void
;
showPopup
(
params
:
PopupParams
,
callback
?:
(
id
?:
string
)
=>
void
)
:
void
;
themeParams
:
ThemeParams
;
version
:
string
;
viewportHeight
:
number
;
viewportStableHeight
:
number
;
}
Index
Methods
close
expand
off
Event
on
Event
open
Link
open
Telegram
Link
ready
send
Data
show
Alert
show
Confirm
show
Popup
Properties
Back
Button?
Cloud
Storage?
Haptic
Feedback?
Main
Button?
color
Scheme
init
Data
init
Data
Unsafe
is
Expanded
platform
theme
Params
version
viewport
Height
viewport
Stable
Height
Methods
close
close
()
:
void
Returns
void
expand
expand
()
:
void
Returns
void
off
Event
offEvent
(
event
:
WebAppEvent
,
callback
:
()
=>
void
)
:
void
Parameters
event
:
WebAppEvent
callback
:
()
=>
void
Returns
void
on
Event
onEvent
(
event
:
WebAppEvent
,
callback
:
()
=>
void
)
:
void
Parameters
event
:
WebAppEvent
callback
:
()
=>
void
Returns
void
open
Link
openLink
(
url
:
string
,
options
?:
{
try_instant_view
?:
boolean
}
)
:
void
Parameters
url
:
string
Optional
options
:
{
try_instant_view
?:
boolean
}
Returns
void
open
Telegram
Link
openTelegramLink
(
url
:
string
)
:
void
Parameters
url
:
string
Returns
void
ready
ready
()
:
void
Returns
void
send
Data
sendData
(
data
:
string
)
:
void
Parameters
data
:
string
Returns
void
show
Alert
showAlert
(
message
:
string
,
callback
?:
()
=>
void
)
:
void
Parameters
message
:
string
Optional
callback
:
()
=>
void
Returns
void
show
Confirm
showConfirm
(
message
:
string
,
callback
?:
(
confirmed
:
boolean
)
=>
void
)
:
void
Parameters
message
:
string
Optional
callback
:
(
confirmed
:
boolean
)
=>
void
Returns
void
show
Popup
showPopup
(
params
:
PopupParams
,
callback
?:
(
id
?:
string
)
=>
void
)
:
void
Parameters
params
:
PopupParams
Optional
callback
:
(
id
?:
string
)
=>
void
Returns
void
Properties
Optional
Back
Button
BackButton
?:
BackButton
Optional
Cloud
Storage
CloudStorage
?:
CloudStorage
Optional
Haptic
Feedback
HapticFeedback
?:
HapticFeedback
Optional
Main
Button
MainButton
?:
MainButton
color
Scheme
colorScheme
:
WebAppColorScheme
init
Data
initData
:
string
init
Data
Unsafe
initDataUnsafe
:
WebAppInitData
is
Expanded
isExpanded
:
boolean
platform
platform
:
string
theme
Params
themeParams
:
ThemeParams
version
version
:
string
viewport
Height
viewportHeight
:
number
viewport
Stable
Height
viewportStableHeight
:
number
Settings
Member Visibility
Inherited
Theme
OS
Light
Dark
On This Page
Methods
close
expand
off
Event
on
Event
open
Link
open
Telegram
Link
ready
send
Data
show
Alert
show
Confirm
show
Popup
Properties
Back
Button
Cloud
Storage
Haptic
Feedback
Main
Button
color
Scheme
init
Data
init
Data
Unsafe
is
Expanded
platform
theme
Params
version
viewport
Height
viewport
Stable
Height
Teleforge API Reference - v0.1.0
Loading...