From 0652c078d109be9ec60e82ac3e5a71627fea0d34 Mon Sep 17 00:00:00 2001 From: Jethary Date: Wed, 18 Dec 2024 13:32:18 -0500 Subject: [PATCH] make type --- .../src/ui/steps/actions/actions.ts | 17 +++++++++-------- protocol-designer/src/ui/steps/actions/types.ts | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/protocol-designer/src/ui/steps/actions/actions.ts b/protocol-designer/src/ui/steps/actions/actions.ts index 93976fc4dfe..4343760c455 100644 --- a/protocol-designer/src/ui/steps/actions/actions.ts +++ b/protocol-designer/src/ui/steps/actions/actions.ts @@ -17,20 +17,21 @@ import type { AnalyticsEventAction } from '../../../analytics/actions' import type { TerminalItemId, SubstepIdentifier } from '../../../steplist/types' import type { AddStepAction, + ClearWellSelectionLabwareKeyAction, HoverOnStepAction, HoverOnSubstepAction, - SelectTerminalItemAction, HoverOnTerminalItemAction, - SetWellSelectionLabwareKeyAction, - ClearWellSelectionLabwareKeyAction, - SelectStepAction, + hoverSelectionAction, + Mode, + selectDropdownItemAction, + Selection, SelectMultipleStepsAction, SelectMultipleStepsForGroupAction, + SelectStepAction, + SelectTerminalItemAction, + SetWellSelectionLabwareKeyAction, ToggleViewSubstepAction, ViewSubstep, - hoverSelectionAction, - selectDropdownItemAction, - Selection, } from './types' // adds an incremental integer ID for Step reducers. @@ -57,7 +58,7 @@ export const hoverSelection = (args: Selection): hoverSelectionAction => ({ }) export const selectDropdownItem = (args: { selection: Selection | null - mode: 'add' | 'clear' + mode: Mode }): selectDropdownItemAction => ({ type: 'SELECT_DROPDOWN_ITEM', payload: { diff --git a/protocol-designer/src/ui/steps/actions/types.ts b/protocol-designer/src/ui/steps/actions/types.ts index a25e056667f..52556930d1d 100644 --- a/protocol-designer/src/ui/steps/actions/types.ts +++ b/protocol-designer/src/ui/steps/actions/types.ts @@ -32,6 +32,7 @@ export interface DuplicateMultipleStepsAction { } } +export type Mode = 'clear' | 'add' export interface Selection { id: string | null text: string | null