-
Notifications
You must be signed in to change notification settings - Fork 1
/
react-native-codepush-manage.d.ts
44 lines (35 loc) · 1.18 KB
/
react-native-codepush-manage.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* Created by nghinv on Thu Jun 11 2020
* Copyright (c) 2020 nghinv@lumi.biz
*/
declare module '@nghinv/react-native-codepush-manage' {
import React, { Component } from 'react';
import { ViewStyle, TextStyle, TouchableOpacityProps, TextProps } from 'react-native';
import codePush, { CodePushOptions } from 'react-native-code-push';
interface CodePushContextType {
status: null | codePush.SyncStatus;
progress: null | number;
}
type StatusTitle = {
Updating: string;
Installing: string;
NeedToRestart: string;
}
interface AppVersionType extends TouchableOpacityProps {
title?: string;
statusTitle?: StatusTitle;
style?: ViewStyle;
titleColor?: string;
titleStyle?: TextStyle;
onPress?: () => void;
enableRestartOnPress?: Boolean;
enableSyncOnPress?: Boolean;
buildDate?: string;
titleProps?: TextProps;
}
export class CodePushProvider extends Component { }
export function useCodePush<T extends CodePushContextType>(): T;
export const withCodePush = (codePushOptions: CodePushOptions) => (WrappedComponent: React.ReactNode) => React.Children;
export class AppVersion extends Component<AppVersionType> {
}
}