Skip to content

Commit

Permalink
ts fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
magland committed Nov 8, 2023
1 parent 2f0271a commit 4422d85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"dependencies": {
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@figurl/interface": "^0.3.0",
"@fortawesome/fontawesome-svg-core": "^6.1.1",
"@fortawesome/free-regular-svg-icons": "^6.1.2",
"@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/react-fontawesome": "^0.2.0",
"@figurl/interface": "^0.3.0",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@testing-library/jest-dom": "^5.16.4",
Expand Down Expand Up @@ -44,17 +44,17 @@
"scale-color-perceptual": "^1.1.2"
},
"devDependencies": {
"@types/node": "^20.6.1",
"@types/chroma-js": "^2.4.2",
"@types/node": "^20.6.1",
"@types/object-hash": "^3.0.6",
"source-map-explorer": "^2.5.3",
"@typescript-eslint/eslint-plugin": "^5.57.1",
"@typescript-eslint/parser": "^5.57.1",
"@vitejs/plugin-react": "^4.0.0",
"eslint": "^8.38.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.3.4",
"source-map-explorer": "^2.5.3",
"typescript": "^5.0.2",
"vite": "^4.3.2"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ type Props = {
const AverageWaveformsView: FunctionComponent<Props> = ({data, width, height}) => {
const allChannelIds = useMemo(() => {
const allChannelIds: (string | number)[] = []
for (let x of data.averageWaveforms) {
for (let id of x.channelIds) {
for (const x of data.averageWaveforms) {
for (const id of x.channelIds) {
if (!allChannelIds.includes(id)) {
allChannelIds.push(id)
}
Expand Down Expand Up @@ -75,7 +75,7 @@ const AverageWaveformsView: FunctionComponent<Props> = ({data, width, height}) =
channelIds: aw.channelIds,
waveform: subtractChannelMeans(aw.waveform),
waveformStdDev: showWaveformStdev && !showOverlapping ? aw.waveformStdDev : undefined,
waveformPercentiles: showWaveformStdev && !showOverlapping ? subtractChannelMeansFromPercentiles(aw.waveformPercentiles, aw.waveform) : undefined,
waveformPercentiles: showWaveformStdev && !showOverlapping && aw.waveformPercentiles ? subtractChannelMeansFromPercentiles(aw.waveformPercentiles, aw.waveform) : undefined,
waveformColor: getUnitColor(idToNum(aw.unitId))
}
]
Expand Down Expand Up @@ -313,8 +313,8 @@ const combinePlotsForOverlappingView = (plots: PGPlot[]): PGPlot[] => {
// plotProps.width *= 2

const allChannelIdsSet = new Set<number | string>()
for (let plot of plots) {
for (let id of plot.props.channelIds) {
for (const plot of plots) {
for (const id of plot.props.channelIds) {
allChannelIdsSet.add(id)
}
}
Expand Down

0 comments on commit 4422d85

Please sign in to comment.