Skip to content

Commit e21e527

Browse files
committed
move types into thread-types
1 parent 6ca5713 commit e21e527

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

apps/api/src/instrument-records/instrument-records.service.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ import { SubjectsService } from '@/subjects/subjects.service';
3131

3232
import { InstrumentMeasuresService } from './instrument-measures.service';
3333

34-
import type { InitData, RecordType } from './thread-types';
35-
36-
type WorkerMessage = { data: InstrumentRecordsExport; success: true } | { error: string; success: false };
37-
38-
type InitialMessage = { success: true };
34+
import type { InitData, InitialMessage, RecordType, WorkerMessage } from './thread-types';
3935

4036
@Injectable()
4137
export class InstrumentRecordsService {

apps/api/src/instrument-records/thread-types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { InstrumentRecordsExport } from '@opendatacapture/schemas/instrument-records';
2+
13
export type RecordType = {
24
computedMeasures: null | { [key: string]: unknown };
35
date: string;
@@ -39,3 +41,7 @@ export type ChunkCompleteMessage = {
3941
};
4042

4143
export type ParentMessage = ChunkCompleteMessage | InitMessage;
44+
45+
export type WorkerMessage = { data: InstrumentRecordsExport; success: true } | { error: string; success: false };
46+
47+
export type InitialMessage = { success: true };

0 commit comments

Comments
 (0)