Skip to content

Commit

Permalink
fix: add PointValue type to have x and y numbers and fix schema
Browse files Browse the repository at this point in the history
  • Loading branch information
yu-smc committed Sep 20, 2024
1 parent 41007d5 commit 36db7da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/@types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ export type PointMode = typeof POINT_MODE[keyof typeof POINT_MODE]

//e.g. 1.2.0 is described as [1, 2, 0]
export type SemanticVersion = [number, number, number]

export type PointValue = {
x: number,
y: number
}
4 changes: 2 additions & 2 deletions src/infrastructure/dataSchemas/plotDataSchema.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//NOTE: Includes the actual data collected from a figure: axis values, axis scale, data point values and so
//NOTE: Do not include any data which depends on StarryDigitizer app(e.g. setting axis by 2 points or 4 points etc...)

import { SemanticVersion } from '@/@types/types'
import { PointValue, SemanticVersion } from '@/@types/types'
//TODO: move definition of type Coord to more global directoly (e.g. @types)
import { Coord } from '@/domain/models/dataset/datasetInterface'

Expand Down Expand Up @@ -36,7 +36,7 @@ export interface PlotDataSchema {
name: string
axisSetId: number
points: Array<{
value: number
value: PointValue
coord: Coord
}>
}>
Expand Down

0 comments on commit 36db7da

Please sign in to comment.