Skip to content

Commit

Permalink
fix(annotation): Address regression from #24694 (#24874)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-bodley authored Aug 3, 2023
1 parent cfadbeb commit f05638b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ export function isTableAnnotationLayer(
}

export type RecordAnnotationResult = {
columns: string[];
records: DataRecord[];
};

Expand All @@ -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 };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ describe('AnnotationLayer type guards', () => {
},
];
const recordAnnotationResult: RecordAnnotationResult = {
columns: ['col1', 'col2'],
records: [
{ a: 1, b: 2 },
{ a: 2, b: 3 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ describe('extractAnnotationLabels', () => {
];
const results: AnnotationData = {
'My Interval': {
columns: ['col'],
records: [{ col: 1 }],
},
'My Line': [
Expand Down

0 comments on commit f05638b

Please sign in to comment.