Skip to content

Commit

Permalink
fix ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
smb2268 committed May 15, 2024
1 parent f798a95 commit 7e5759d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 2 additions & 6 deletions app/src/organisms/QuickTransferFlow/SummaryAndSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,13 @@ export function SummaryAndSettings(
const [selectedCategory, setSelectedCategory] = React.useState<string>(
'overview'
)
// if any value from the wizard flow hasn't been set, return null
// this should never happen but allows us to strictly type summary state
// @ts-expect-error figure out how to make this type non-null
// @ts-expect-error TODO figure out how to make this type non-null as we know
// none of these values will be undefined
const initialSummaryState = getInitialSummaryState(wizardFlowState)
const [state] = React.useReducer(
quickTransferSummaryReducer,
initialSummaryState
)
if (Object.values(wizardFlowState).some(value => value == null)) {
return null
}

return (
<Flex>
Expand Down
7 changes: 6 additions & 1 deletion app/src/organisms/QuickTransferFlow/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Mount } from '@opentrons/api-client'
import type { LabwareDefinition2, PipetteV2Specs } from '@opentrons/shared-data'
import type { ACTIONS, CONSOLIDATE, DISTRIBUTE, TRANSFER } from './constants'
import type { ChangeTipOptions } from '@opentrons/step-generation'

export interface QuickTransferWizardState {
pipette?: PipetteV2Specs
Expand All @@ -15,6 +14,12 @@ export interface QuickTransferWizardState {
volume?: number
}
export type PathOption = 'single' | 'multiAspirate' | 'multiDispense'
export type ChangeTipOptions =
| 'always'
| 'once'
| 'never'
| 'perDest'
| 'perSource'

export interface QuickTransferSummaryState {
pipette: PipetteV2Specs
Expand Down

0 comments on commit 7e5759d

Please sign in to comment.