From 34e6ece8716cd8b33a1b6318427a10d9de11977e Mon Sep 17 00:00:00 2001 From: GleidsonDaniel Date: Tue, 21 Dec 2021 10:11:40 -0300 Subject: [PATCH] chore: init types folder and set redux and BaseScreen interface --- app/types/index.ts | 10 ++++++++++ app/types/redux/index.ts | 28 ++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 app/types/index.ts create mode 100644 app/types/redux/index.ts diff --git a/app/types/index.ts b/app/types/index.ts new file mode 100644 index 000000000..ea8f9adb4 --- /dev/null +++ b/app/types/index.ts @@ -0,0 +1,10 @@ +import { StackNavigationProp } from '@react-navigation/stack'; +import { Dispatch } from 'redux'; + +export interface BaseScreen { + navigation: StackNavigationProp; + dispatch: Dispatch; + theme: string; +} + +export * from './redux'; diff --git a/app/types/redux/index.ts b/app/types/redux/index.ts new file mode 100644 index 000000000..a52e979f3 --- /dev/null +++ b/app/types/redux/index.ts @@ -0,0 +1,28 @@ +import { SetActiveUsers } from '../../actions/activeUsers'; +import { ActiveUsers } from '../../reducers/activeUsers'; + +export interface ApplicationState { + settings: any; + login: any; + meteor: any; + server: any; + selectedUsers: any; + createChannel: any; + app: any; + room: any; + rooms: any; + sortPreferences: any; + share: any; + customEmojis: any; + activeUsers: ActiveUsers; + usersTyping: any; + inviteLinks: any; + createDiscussion: any; + inquiry: any; + enterpriseModules: any; + encryption: any; + permissions: any; + roles: any; +} + +export type ApplicationActions = SetActiveUsers;