Skip to content

Commit 8ce6a81

Browse files
committed
Update core typings
1 parent 080ea7e commit 8ce6a81

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/core/components/app/app-class.d.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,15 @@ export interface Framework7Plugin {
116116

117117
export interface Framework7Events {
118118
/** Event will be fired on app initialization. Automatically after new Framework7() or after app.init() if you disabled auto init. */
119-
'init': () => void
119+
init: () => void
120+
/** Event will be fired on device preferred color scheme change. It has effect only when `autoDarkTheme` enabled */
121+
darkThemeChange: (isDark: boolean) => void
122+
/** Event will be fired when app goes online */
123+
online: () => void
124+
/** Event will be fired when app goes offline */
125+
offline: () => void
126+
/** Event will be fired on network state change */
127+
connection: (isOnline: boolean) => void
120128
}
121129

122130
interface Framework7 extends Framework7Class<Framework7Events> {
@@ -136,6 +144,8 @@ interface Framework7 extends Framework7Class<Framework7Events> {
136144
rtl : boolean
137145
/** Current app theme. Can be md or ios */
138146
theme : string
147+
/** Indicates whether the dark theme active or not. This property has effect only when `autoDarkTheme` enabled */
148+
darkTheme : boolean
139149
/** Object with app root data passed on intialization */
140150
data : any
141151
/** Object with app root methods */

0 commit comments

Comments
 (0)