Skip to content

Commit 91e4f3b

Browse files
committed
fix types of args in various functions
1 parent 288468d commit 91e4f3b

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

source/flux/parts/settings.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export async function setLoginCredentials(username: string, password: string) {
4242
}
4343

4444
export function logInViaCredentials(username: string, password: string) {
45-
return async (dispatch: () => {}) => {
45+
return async (dispatch: any => any) => {
4646
const result = await performLogin(username, password)
4747
dispatch({type: CREDENTIALS_LOGIN, payload: {username, password, result}})
4848

@@ -54,7 +54,7 @@ export function logInViaCredentials(username: string, password: string) {
5454
}
5555

5656
export function logInViaToken(tokenStatus: boolean) {
57-
return async (dispatch: () => {}) => {
57+
return async (dispatch: any => any) => {
5858
await setTokenValid(tokenStatus)
5959
dispatch({type: TOKEN_LOGIN, payload: tokenStatus})
6060

source/flux/parts/sis.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const UPDATE_MEALS_REMAINING = 'sis/UPDATE_MEALS_REMAINING'
1717
export const UPDATE_COURSES = 'sis/UPDATE_COURSES'
1818

1919
export function updateBalances(forceFromServer: boolean = false) {
20-
return async (dispatch: () => {}, getState: any) => {
20+
return async (dispatch: any => any, getState: any) => {
2121
const state = getState()
2222
const balances = await getBalances(state.app.isConnected, forceFromServer)
2323
dispatch({
@@ -29,7 +29,7 @@ export function updateBalances(forceFromServer: boolean = false) {
2929
}
3030

3131
export function updateCourses(forceFromServer: boolean = false) {
32-
return async (dispatch: () => {}, getState: any) => {
32+
return async (dispatch: any => any, getState: any) => {
3333
const state = getState()
3434
const courses = await loadAllCourses(state.app.isConnected, forceFromServer)
3535
dispatch({

source/views/components/cells/textfield.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class CellTextField extends React.Component {
3737

3838
props: {
3939
label?: string,
40-
_ref: () => any,
40+
_ref: any => any,
4141
disabled: boolean,
4242
onChangeText: string => any,
4343
onSubmitEditing: string => any,

source/views/home/edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class Row extends React.Component {
133133
}
134134
}
135135

136-
function EditHomeView(props: {onSaveOrder: () => any, order: string[]}) {
136+
function EditHomeView(props: {onSaveOrder: (ViewType[]) => any, order: string[]}) {
137137
return (
138138
<SortableList
139139
contentContainerStyle={styles.contentContainer}

source/views/sis/balances.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class BalancesView extends React.Component {
3737
credentialsValid: boolean,
3838
message: ?string,
3939

40-
updateBalances: () => any,
40+
updateBalances: boolean => any,
4141
}
4242

4343
refresh = async () => {

0 commit comments

Comments
 (0)