summaryrefslogtreecommitdiffstats
path: root/src/features/workspaces/actions.ts
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-09-18 11:15:25 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-18 11:15:25 +0200
commitd4101a48b3eee8b1fb177831aa02a4b4fbec2588 (patch)
treec92f2fbe91197fde8589207463d0d6526b4ff76b /src/features/workspaces/actions.ts
parent5.6.3-nightly.6 [skip ci] (diff)
downloadferdium-app-d4101a48b3eee8b1fb177831aa02a4b4fbec2588.tar.gz
ferdium-app-d4101a48b3eee8b1fb177831aa02a4b4fbec2588.tar.zst
ferdium-app-d4101a48b3eee8b1fb177831aa02a4b4fbec2588.zip
chore: convert various files from JS to TS (#1959)
Diffstat (limited to 'src/features/workspaces/actions.ts')
-rw-r--r--src/features/workspaces/actions.ts30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/features/workspaces/actions.ts b/src/features/workspaces/actions.ts
new file mode 100644
index 000000000..5e7e6e721
--- /dev/null
+++ b/src/features/workspaces/actions.ts
@@ -0,0 +1,30 @@
1import PropTypes from 'prop-types';
2import Workspace from './models/Workspace';
3import { createActionsFromDefinitions } from '../../actions/lib/actions';
4
5export const workspaceActions = createActionsFromDefinitions(
6 {
7 edit: {
8 workspace: PropTypes.instanceOf(Workspace).isRequired,
9 },
10 create: {
11 name: PropTypes.string.isRequired,
12 },
13 delete: {
14 workspace: PropTypes.instanceOf(Workspace).isRequired,
15 },
16 update: {
17 workspace: PropTypes.instanceOf(Workspace).isRequired,
18 },
19 activate: {
20 workspace: PropTypes.instanceOf(Workspace).isRequired,
21 },
22 deactivate: {},
23 toggleWorkspaceDrawer: {},
24 openWorkspaceSettings: {},
25 toggleKeepAllWorkspacesLoadedSetting: {},
26 },
27 PropTypes.checkPropTypes,
28);
29
30export default workspaceActions;