diff options
author | 2021-09-18 11:15:25 +0200 | |
---|---|---|
committer | 2021-09-18 11:15:25 +0200 | |
commit | d4101a48b3eee8b1fb177831aa02a4b4fbec2588 (patch) | |
tree | c92f2fbe91197fde8589207463d0d6526b4ff76b /src/features/workspaces/actions.ts | |
parent | 5.6.3-nightly.6 [skip ci] (diff) | |
download | ferdium-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.ts | 30 |
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 @@ | |||
1 | import PropTypes from 'prop-types'; | ||
2 | import Workspace from './models/Workspace'; | ||
3 | import { createActionsFromDefinitions } from '../../actions/lib/actions'; | ||
4 | |||
5 | export 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 | |||
30 | export default workspaceActions; | ||