fix(annotation): Address regression from #24694 (#24874)

This commit is contained in:
John Bodley 2023-08-03 05:33:03 -07:00 committed by GitHub
parent cfadbeb353
commit f05638ba84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 4 deletions

View File

@ -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 };

View File

@ -93,7 +93,6 @@ describe('AnnotationLayer type guards', () => {
},
];
const recordAnnotationResult: RecordAnnotationResult = {
columns: ['col1', 'col2'],
records: [
{ a: 1, b: 2 },
{ a: 2, b: 3 },

View File

@ -130,7 +130,6 @@ describe('extractAnnotationLabels', () => {
];
const results: AnnotationData = {
'My Interval': {
columns: ['col'],
records: [{ col: 1 }],
},
'My Line': [