@@ -4,7 +4,7 @@ import React, { useState } from "react";
4
4
import type { APIDataset , APIDataLayer } from "types/api_flow_types" ;
5
5
import type { BoundingBoxType } from "oxalis/constants" ;
6
6
import { MappingStatusEnum } from "oxalis/constants" ;
7
- import type { Tracing , AnnotationType , HybridTracing } from "oxalis/store" ;
7
+ import type { OxalisState , Tracing , AnnotationType , HybridTracing } from "oxalis/store" ;
8
8
import { getResolutionInfo , getMappingInfo } from "oxalis/model/accessors/dataset_accessor" ;
9
9
import { getVolumeTracingById } from "oxalis/model/accessors/volumetracing_accessor" ;
10
10
import { startExportTiffJob } from "admin/admin_rest_api" ;
@@ -112,11 +112,10 @@ export async function handleStartExport(
112
112
dataset : APIDataset ,
113
113
layerInfos : LayerInfos ,
114
114
boundingBox : BoundingBoxType ,
115
- startedExports : never [ ] ,
116
- setStartedExports ?: React . Dispatch < React . SetStateAction < never [ ] > > ,
115
+ startedExports : string [ ] ,
116
+ setStartedExports ?: React . Dispatch < React . SetStateAction < string [ ] > > ,
117
117
) {
118
118
if ( setStartedExports ) {
119
- // @ts -expect-error ts-migrate(2769) FIXME: No overload matches this call.
120
119
setStartedExports ( startedExports . concat ( exportKey ( layerInfos ) ) ) ;
121
120
}
122
121
@@ -139,22 +138,19 @@ export async function handleStartExport(
139
138
}
140
139
141
140
function ExportBoundingBoxModal ( { handleClose, dataset, boundingBox, tracing } : Props ) {
142
- const [ startedExports , setStartedExports ] = useState ( [ ] ) ;
141
+ const [ startedExports , setStartedExports ] = useState < string [ ] > ( [ ] ) ;
143
142
const isMergerModeEnabled = useSelector (
144
- // @ts -expect-error ts-migrate(2339) FIXME: Property 'temporaryConfiguration' does not exist o... Remove this comment to see the full error message
145
- ( state ) => state . temporaryConfiguration . isMergerModeEnabled ,
143
+ ( state : OxalisState ) => state . temporaryConfiguration . isMergerModeEnabled ,
146
144
) ;
147
145
const activeMappingInfos = useSelector (
148
- // @ts -expect-error ts-migrate(2339) FIXME: Property 'temporaryConfiguration' does not exist o... Remove this comment to see the full error message
149
- ( state ) => state . temporaryConfiguration . activeMappingByLayer ,
146
+ ( state : OxalisState ) => state . temporaryConfiguration . activeMappingByLayer ,
150
147
) ;
151
148
152
149
const allLayerInfos = dataset . dataSource . dataLayers . map ( ( layer : APIDataLayer ) =>
153
150
getLayerInfos ( layer , tracing , activeMappingInfos , isMergerModeEnabled ) ,
154
151
) ;
155
152
const exportButtonsList = allLayerInfos . map ( ( layerInfos ) => {
156
153
const parenthesesInfos = [
157
- // @ts -expect-error ts-migrate(2345) FIXME: Argument of type 'string' is not assignable to par... Remove this comment to see the full error message
158
154
startedExports . includes ( exportKey ( layerInfos ) ) ? "started" : null ,
159
155
layerInfos . mappingName != null ? `using mapping "${ layerInfos . mappingName } "` : null ,
160
156
! layerInfos . hasMag1 ? "resolution 1 missing" : null ,
@@ -169,7 +165,6 @@ function ExportBoundingBoxModal({ handleClose, dataset, boundingBox, tracing }:
169
165
}
170
166
disabled = {
171
167
// The export is already running or...
172
- // @ts -expect-error ts-migrate(2345) FIXME: Argument of type 'string' is not assignable to par... Remove this comment to see the full error message
173
168
startedExports . includes ( exportKey ( layerInfos ) ) || // The layer has no mag 1 or...
174
169
! layerInfos . hasMag1 || // Merger mode is enabled and this layer is the volume tracing layer.
175
170
( isMergerModeEnabled && layerInfos . tracingId != null )
0 commit comments