parent
cfadbeb353
commit
f05638ba84
|
|
@ -159,7 +159,6 @@ export function isTableAnnotationLayer(
|
|||
}
|
||||
|
||||
export type RecordAnnotationResult = {
|
||||
columns: string[];
|
||||
records: DataRecord[];
|
||||
};
|
||||
|
||||
|
|
@ -181,7 +180,7 @@ export function isTimeseriesAnnotationResult(
|
|||
export function isRecordAnnotationResult(
|
||||
result: any,
|
||||
): result is RecordAnnotationResult {
|
||||
return Array.isArray(result?.columns) && Array.isArray(result?.records);
|
||||
return Array.isArray(result?.records);
|
||||
}
|
||||
|
||||
export type AnnotationData = { [key: string]: AnnotationResult };
|
||||
|
|
|
|||
|
|
@ -93,7 +93,6 @@ describe('AnnotationLayer type guards', () => {
|
|||
},
|
||||
];
|
||||
const recordAnnotationResult: RecordAnnotationResult = {
|
||||
columns: ['col1', 'col2'],
|
||||
records: [
|
||||
{ a: 1, b: 2 },
|
||||
{ a: 2, b: 3 },
|
||||
|
|
|
|||
|
|
@ -130,7 +130,6 @@ describe('extractAnnotationLabels', () => {
|
|||
];
|
||||
const results: AnnotationData = {
|
||||
'My Interval': {
|
||||
columns: ['col'],
|
||||
records: [{ col: 1 }],
|
||||
},
|
||||
'My Line': [
|
||||
|
|
|
|||
Loading…
Reference in New Issue