diff options
author | 2022-10-25 18:14:55 +0530 | |
---|---|---|
committer | 2022-10-25 12:44:55 +0000 | |
commit | b77663a3752467b7be3eff8a765a71330548d8e0 (patch) | |
tree | 16aad95e8d781684b543482f5b4423674f45be08 /src/features/todos/actions.ts | |
parent | Transform 'AuthLayoutContainer' component hierarchy to tsx (#699) (diff) | |
download | ferdium-app-b77663a3752467b7be3eff8a765a71330548d8e0.tar.gz ferdium-app-b77663a3752467b7be3eff8a765a71330548d8e0.tar.zst ferdium-app-b77663a3752467b7be3eff8a765a71330548d8e0.zip |
refactor: convert Sidebar to typescript (#703)
Diffstat (limited to 'src/features/todos/actions.ts')
-rw-r--r-- | src/features/todos/actions.ts | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/features/todos/actions.ts b/src/features/todos/actions.ts index 04e299e71..b47a076b9 100644 --- a/src/features/todos/actions.ts +++ b/src/features/todos/actions.ts | |||
@@ -1,7 +1,22 @@ | |||
1 | import PropTypes from 'prop-types'; | 1 | import PropTypes from 'prop-types'; |
2 | import { ReactElement } from 'react'; | ||
2 | import { createActionsFromDefinitions } from '../../actions/lib/actions'; | 3 | import { createActionsFromDefinitions } from '../../actions/lib/actions'; |
3 | 4 | ||
4 | export const todoActions = createActionsFromDefinitions( | 5 | interface TodoActionsType { |
6 | resize: (width: number) => void; | ||
7 | toggleTodosPanel: () => void; | ||
8 | toggleTodosFeatureVisibility: () => void; | ||
9 | setTodosWebview: (webview: ReactElement) => void; | ||
10 | handleHostMessage: (action: string, data: object) => void; | ||
11 | handleClientMessage: ( | ||
12 | channel: string, | ||
13 | message: { action: string; data: object }, | ||
14 | ) => void; | ||
15 | openDevTools: () => void; | ||
16 | reload: () => void; | ||
17 | } | ||
18 | |||
19 | export const todoActions = createActionsFromDefinitions<TodoActionsType>( | ||
5 | { | 20 | { |
6 | resize: { | 21 | resize: { |
7 | width: PropTypes.number.isRequired, | 22 | width: PropTypes.number.isRequired, |