UNPKG

schoolx-ota-manager

Version:

React Native library for managing OTA updates with GitLab integration

22 lines 1.05 kB
import React, { ComponentType } from "react"; import { OtaConfig, UpdateInfo, UpdateProgress } from "../types"; export interface WithOTAUpdateProps { otaCheckUpdate: () => Promise<UpdateInfo | null>; otaInstallUpdate: () => Promise<boolean>; otaCheckAndInstallUpdate: () => Promise<boolean>; otaCheckOnAppStart: () => Promise<UpdateInfo | null>; otaGetInstalledBuildNumber: () => Promise<number>; otaUpdateInfo?: UpdateInfo | null; otaIsChecking: boolean; otaIsInstalling: boolean; } export declare function withOTAUpdate<P extends object>(WrappedComponent: ComponentType<P & WithOTAUpdateProps>, config: OtaConfig): (props: P) => import("react/jsx-runtime").JSX.Element; interface OTAUpdateProps extends OtaConfig { onProgress?: (progress: UpdateProgress) => void; onUpdateAvailable?: (hasUpdate: boolean) => void; onUpdateCompleted?: (success: boolean) => void; children?: React.ReactNode; } export declare const OTAUpdate: React.FC<OTAUpdateProps>; export {}; //# sourceMappingURL=OTAUpdate.d.ts.map