From b77663a3752467b7be3eff8a765a71330548d8e0 Mon Sep 17 00:00:00 2001 From: Balaji Vijayakumar Date: Tue, 25 Oct 2022 18:14:55 +0530 Subject: refactor: convert Sidebar to typescript (#703) --- src/features/todos/actions.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/features') 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 @@ import PropTypes from 'prop-types'; +import { ReactElement } from 'react'; import { createActionsFromDefinitions } from '../../actions/lib/actions'; -export const todoActions = createActionsFromDefinitions( +interface TodoActionsType { + resize: (width: number) => void; + toggleTodosPanel: () => void; + toggleTodosFeatureVisibility: () => void; + setTodosWebview: (webview: ReactElement) => void; + handleHostMessage: (action: string, data: object) => void; + handleClientMessage: ( + channel: string, + message: { action: string; data: object }, + ) => void; + openDevTools: () => void; + reload: () => void; +} + +export const todoActions = createActionsFromDefinitions( { resize: { width: PropTypes.number.isRequired, -- cgit v1.2.3-70-g09d2