Files
Compass/web/lib/app-update.ts
2026-01-19 13:49:18 +01:00

16 lines
398 B
TypeScript

import {registerPlugin} from '@capacitor/core'
interface AppUpdatePlugin {
checkForUpdate(): Promise<{
updateAvailable: boolean
immediateAllowed: boolean
flexibleAllowed: boolean
availableVersionCode: number
}>
startUpdate(options: { type: 'immediate' | 'flexible' }): Promise<void>
}
const AppUpdate = registerPlugin<AppUpdatePlugin>('AppUpdate')
export default AppUpdate