Skip to content

Commit

Permalink
fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shlokamin committed Feb 21, 2024
1 parent 3a4972a commit 0846fa0
Show file tree
Hide file tree
Showing 21 changed files with 80 additions and 29 deletions.
9 changes: 9 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,14 @@
"styled-components": "5.3.6",
"typeface-open-sans": "0.0.75",
"uuid": "8.3.2"
},
"devDependencies": {
"@opentrons/discovery-client": "link:../discovery-client",
"@types/classnames": "2.2.5",
"@types/file-saver": "2.0.1",
"@types/jszip": "3.1.7",
"@types/mixpanel-browser": "^2.35.6",
"@types/styled-components": "^5.1.26",
"axios": "^0.21.1"
}
}
2 changes: 1 addition & 1 deletion app/src/atoms/Banner/__tests__/Banner.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react'
import { fireEvent } from '@testing-library/react'
import { renderWithProviders } from '@opentrons/components'
import { i18n } from '../../../i18n'
import { Banner } from '..'
import { renderWithProviders } from '../../../__testing-utils__'

const render = (props: React.ComponentProps<typeof Banner>) => {
return renderWithProviders(<Banner {...props} />, {
Expand Down
4 changes: 2 additions & 2 deletions app/src/atoms/Chip/__tests__/Chip.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react'

import { BORDERS, COLORS, renderWithProviders } from '@opentrons/components'

import { BORDERS, COLORS } from '@opentrons/components'
import { renderWithProviders } from '../../../__testing-utils__'
import { Chip } from '..'

const render = (props: React.ComponentProps<typeof Chip>) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import * as React from 'react'
import { fireEvent } from '@testing-library/react'
import { renderWithProviders } from '@opentrons/components'
import { renderWithProviders } from '../../../__testing-utils__'
import { i18n } from '../../../i18n'
import { InlineNotification } from '..'


const render = (props: React.ComponentProps<typeof InlineNotification>) => {
return renderWithProviders(<InlineNotification {...props} />, {
i18nInstance: i18n,
Expand Down
3 changes: 2 additions & 1 deletion app/src/atoms/InputField/__tests__/InputField.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import * as React from 'react'
import { fireEvent } from '@testing-library/react'
import { renderWithProviders } from '@opentrons/components'
import { renderWithProviders } from '../../../__testing-utils__'
import { InputField } from '..'


const render = (props: React.ComponentProps<typeof InputField>) => {
return renderWithProviders(<InputField {...props} />)[0]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { renderWithProviders } from '@opentrons/components'
import { renderWithProviders } from '../../../__testing-utils__'
import { InstrumentContainer } from '..'

const render = (props: React.ComponentProps<typeof InstrumentContainer>) => {
Expand Down
2 changes: 1 addition & 1 deletion app/src/atoms/Interstitial/__tests__/TitleBar.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'
import { fireEvent } from '@testing-library/react'
import { renderWithProviders } from '@opentrons/components'
import { renderWithProviders } from '../../../__testing-utils__'
import { InterstitialTitleBar } from '../InterstitiallTitleBar'

const render = (props: React.ComponentProps<typeof InterstitialTitleBar>) => {
Expand Down
3 changes: 2 additions & 1 deletion app/src/atoms/Link/__tests__/ExternalLink.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react'
import { renderWithProviders, COLORS } from '@opentrons/components'
import { COLORS } from '@opentrons/components'
import { renderWithProviders } from '../../../__testing-utils__'
import { ExternalLink } from '../ExternalLink'

const TEST_URL = 'https://opentrons.com'
Expand Down
1 change: 0 additions & 1 deletion app/src/pages/InstrumentsDashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as React from 'react'
import { useInstrumentsQuery } from '@opentrons/react-api-client'
import { DIRECTION_COLUMN, Flex, SPACING } from '@opentrons/components'
import { PipetteWizardFlows } from '../../organisms/PipetteWizardFlows'
import { onDeviceDisplayRoutes } from '../../App/OnDeviceDisplayApp'
import { Navigation } from '../../organisms/Navigation'
import { AttachedInstrumentMountItem } from '../../organisms/InstrumentMountItem'
import { GripperWizardFlows } from '../../organisms/GripperWizardFlows'
Expand Down
1 change: 0 additions & 1 deletion app/src/pages/ProtocolDashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { useAllProtocolsQuery } from '@opentrons/react-api-client'
import { SmallButton } from '../../atoms/buttons'
import { StyledText } from '../../atoms/text'
import { Navigation } from '../../organisms/Navigation'
import { onDeviceDisplayRoutes } from '../../App/OnDeviceDisplayApp'
import {
getPinnedProtocolIds,
getProtocolsOnDeviceSortKey,
Expand Down
1 change: 0 additions & 1 deletion app/src/pages/RobotDashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {

import { StyledText } from '../../atoms/text'
import { Navigation } from '../../organisms/Navigation'
import { onDeviceDisplayRoutes } from '../../App/OnDeviceDisplayApp'
import {
EmptyRecentRun,
RecentRunProtocolCarousel,
Expand Down
1 change: 0 additions & 1 deletion app/src/pages/RobotSettingsDashboard/RobotSettingsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import { getRobotSettings, updateSetting } from '../../redux/robot-settings'
import { UNREACHABLE } from '../../redux/discovery/constants'
import { Navigation } from '../../organisms/Navigation'
import { useLEDLights } from '../../organisms/Devices/hooks'
import { onDeviceDisplayRoutes } from '../../App/OnDeviceDisplayApp'
import { useNetworkConnection } from '../../resources/networking/hooks/useNetworkConnection'
import { RobotSettingButton } from '../../pages/RobotSettingsDashboard/RobotSettingButton'

Expand Down
2 changes: 2 additions & 0 deletions app/src/redux/reducer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @ts-expect-error pnpm and ts do not like importing sub dependency like this
// fix this after the vite + pnpm migration
import createHistory from 'history/createHashHistory'
import { combineReducers } from 'redux'
import { connectRouter } from 'connected-react-router'
Expand Down
1 change: 1 addition & 0 deletions components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"react-popper": "1.0.0",
"react-remove-scroll": "2.4.3",
"react-select": "5.4.0",
"redux": "4.0.5",
"styled-components": "5.3.6"
},
"browser": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function RobotCoordinateSpace(
...restProps,
}
return animated ? (
// @ts-expect-error Type instantiation is excessively deep and possibly infinite
<AnimatedSvg {...allPassThroughProps}>{children}</AnimatedSvg>
) : (
<Svg {...allPassThroughProps}>{children}</Svg>
Expand All @@ -24,5 +25,4 @@ export function RobotCoordinateSpace(
/**
* These animated components needs to be split out because react-spring and styled-components don't play nice
* @see https://github.com/pmndrs/react-spring/issues/1515 */
// @ts-expect-error Type instantiation is excessively deep and possibly infinite
const AnimatedSvg = styled(animated.svg)<typeof animated.svg>``
2 changes: 2 additions & 0 deletions discovery-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
"dependencies": {
"@types/lodash": "^4.14.191",
"@types/node-fetch": "^2.5.8",
"@types/yargs": "17.0.32",
"escape-string-regexp": "1.0.5",
"is-ip": "3.1.0",
"lodash": "4.17.21",
"mdns-js": "1.0.1",
"node-fetch": "2.6.7",
"redux": "4.0.5",
"reselect": "4.0.0",
"stable": "0.1.8",
"to-regex": "3.0.2",
"yargs": "15.4.0"
Expand Down
3 changes: 3 additions & 0 deletions discovery-client/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,14 @@ Yargs.options({
},
})
.env('OT_DC')
// @ts-expect-error
.middleware([debugLogArgvMiddleware])
// @ts-expect-error
.command(['$0', 'browse'], 'Browse for robots on the network', noop, browse)
.command(
'find [name]',
'Find the IP of a robot by its name',
// @ts-expect-error
yargs => {
yargs.positional('name', {
describe: 'Name of robot to find; if omitted will find first robot',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@testing-library/react": "14.2.1",
"@testing-library/user-event": "13.5.0",
"@types/express": "^4.17.11",
"@types/glob": "7.1.3",
"@types/jest": "^26.0.20",
"@types/jest-when": "^2.7.2",
"@types/lodash": "^4.14.191",
Expand Down
55 changes: 44 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions react-api-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dependencies": {
"@opentrons/api-client": "link:../api-client",
"@opentrons/shared-data": "link:../shared-data",
"axios": "^0.21.1",
"react-query": "3.35.0"
}
}
10 changes: 5 additions & 5 deletions shared-data/js/__tests__/getWellNamePerMultiTip.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import fixture_trash from '@opentrons/shared-data/labware/fixtures/2/fixture_trash.json'
import fixture_96_plate from '@opentrons/shared-data/labware/fixtures/2/fixture_96_plate.json'
import fixture_384_plate from '@opentrons/shared-data/labware/fixtures/2/fixture_384_plate.json'
import fixture_12_trough from '@opentrons/shared-data/labware/fixtures/2/fixture_12_trough.json'
import fixture_24_tuberack from '@opentrons/shared-data/labware/fixtures/2/fixture_24_tuberack.json'
import fixture_trash from '../../labware/fixtures/2/fixture_trash.json'
import fixture_96_plate from '../../labware/fixtures/2/fixture_96_plate.json'
import fixture_384_plate from '../../labware/fixtures/2/fixture_384_plate.json'
import fixture_12_trough from '../../labware/fixtures/2/fixture_12_trough.json'
import fixture_24_tuberack from '../../labware/fixtures/2/fixture_24_tuberack.json'

import { getWellNamePerMultiTip } from '../helpers/getWellNamePerMultiTip'

Expand Down

0 comments on commit 0846fa0

Please sign in to comment.