client server
Summary: Migrating Server, Client and UninitializedClient to TypeScript Reviewed By: passy Differential Revision: D16687855 fbshipit-source-id: 402e4dbcd5d283d3e280d4d8b312662829457886
This commit is contained in:
committed by
Facebook Github Bot
parent
53c1eee641
commit
5f53087c7e
@@ -21,12 +21,12 @@ type State = {
|
||||
| 'checking-for-update'
|
||||
| 'update-available'
|
||||
| 'update-not-available'
|
||||
| 'update-downloaded',
|
||||
error?: string,
|
||||
| 'update-downloaded';
|
||||
error?: string;
|
||||
};
|
||||
|
||||
type Props = {
|
||||
version: string,
|
||||
version: string;
|
||||
};
|
||||
|
||||
export default class AutoUpdateVersion extends Component<Props, State> {
|
||||
@@ -63,11 +63,11 @@ export default class AutoUpdateVersion extends Component<Props, State> {
|
||||
this.setState({updater: 'checking-for-update'});
|
||||
});
|
||||
|
||||
remote.autoUpdater.on('update-available', error => {
|
||||
remote.autoUpdater.on('update-available', () => {
|
||||
this.setState({updater: 'update-available'});
|
||||
});
|
||||
|
||||
remote.autoUpdater.on('update-not-available', error => {
|
||||
remote.autoUpdater.on('update-not-available', () => {
|
||||
this.setState({updater: 'update-not-available'});
|
||||
});
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
import {FlipperBasePlugin} from '../plugin.js';
|
||||
import config from '../fb-stubs/config';
|
||||
import type BaseDevice from '../devices/BaseDevice.js';
|
||||
import type Client from '../Client.js';
|
||||
import type {UninitializedClient} from '../UninitializedClient.js';
|
||||
import type Client from '../Client.tsx';
|
||||
import type {UninitializedClient} from '../UninitializedClient.tsx';
|
||||
import type {PluginNotification} from '../reducers/notifications.tsx';
|
||||
import type {ActiveSheet} from '../reducers/application.tsx';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
import type {FlipperDevicePlugin, FlipperPlugin} from '../plugin';
|
||||
import type {PluginDefinition} from '../dispatcher/plugins';
|
||||
import type Client from '../Client';
|
||||
import type Client from '../Client.tsx';
|
||||
import type {TableBodyRow} from '../ui/components/table/types';
|
||||
|
||||
import {Component, Fragment} from 'react';
|
||||
|
||||
@@ -59,25 +59,25 @@ const AppTitleBar = styled(FlexRow)(({focused}) => ({
|
||||
}));
|
||||
|
||||
type OwnProps = {
|
||||
version: string,
|
||||
version: string;
|
||||
};
|
||||
|
||||
type DispatchFromProps = {
|
||||
toggleLeftSidebarVisible: (visible?: boolean) => void,
|
||||
toggleRightSidebarVisible: (visible?: boolean) => void,
|
||||
setActiveSheet: (sheet: ActiveSheet) => void,
|
||||
setFlipperRating: (rating: number) => void,
|
||||
toggleLeftSidebarVisible: (visible?: boolean) => void;
|
||||
toggleRightSidebarVisible: (visible?: boolean) => void;
|
||||
setActiveSheet: (sheet: ActiveSheet) => void;
|
||||
setFlipperRating: (rating: number) => void;
|
||||
};
|
||||
|
||||
type StateFromProps = {
|
||||
windowIsFocused: boolean,
|
||||
leftSidebarVisible: boolean,
|
||||
rightSidebarVisible: boolean,
|
||||
rightSidebarAvailable: boolean,
|
||||
downloadingImportData: boolean,
|
||||
launcherMsg: LauncherMsg,
|
||||
flipperRating: number | null,
|
||||
share: ShareType | null | undefined,
|
||||
windowIsFocused: boolean;
|
||||
leftSidebarVisible: boolean;
|
||||
rightSidebarVisible: boolean;
|
||||
rightSidebarAvailable: boolean;
|
||||
downloadingImportData: boolean;
|
||||
launcherMsg: LauncherMsg;
|
||||
flipperRating: number | null;
|
||||
share: ShareType | null | undefined;
|
||||
};
|
||||
|
||||
const VersionText = styled(Text)({
|
||||
|
||||
@@ -15,7 +15,7 @@ const Container = styled(FlexRow)({
|
||||
});
|
||||
|
||||
type Props = {
|
||||
launcherMsg: LauncherMsg,
|
||||
launcherMsg: LauncherMsg;
|
||||
};
|
||||
|
||||
function getSeverityColor(severity: 'warning' | 'error'): string {
|
||||
|
||||
@@ -44,12 +44,12 @@ const UserName = styled(Text)({
|
||||
type OwnProps = {};
|
||||
|
||||
type DispatchFromProps = {
|
||||
logout: () => void,
|
||||
setActiveSheet: (activeSheet: ActiveSheet) => void,
|
||||
logout: () => void;
|
||||
setActiveSheet: (activeSheet: ActiveSheet) => void;
|
||||
};
|
||||
|
||||
type StateFromProps = {
|
||||
user: User,
|
||||
user: User;
|
||||
};
|
||||
|
||||
type Props = OwnProps & DispatchFromProps & StateFromProps;
|
||||
|
||||
@@ -90,7 +90,7 @@ const Logo = styled('img')({
|
||||
|
||||
type Props = {};
|
||||
type State = {
|
||||
isMounted: boolean,
|
||||
isMounted: boolean;
|
||||
};
|
||||
|
||||
export default class WelcomeScreen extends PureComponent<Props, State> {
|
||||
|
||||
Reference in New Issue
Block a user