Chore: Remove the deprecated Vector type (#83469)

This commit is contained in:
Ryan McKinley
2024-02-27 12:28:57 -08:00
committed by GitHub
parent 5c60f4d468
commit de75813d8d
27 changed files with 58 additions and 563 deletions
@@ -11,7 +11,7 @@ import { guessFieldTypeFromValue, guessFieldTypeForField, toDataFrameDTO } from
export type MutableField<T = any> = Field<T>;
/** @deprecated */
type MutableVectorCreator = (buffer?: any[]) => any[];
type MutableVectorCreator = (buffer?: unknown[]) => unknown[];
export const MISSING_VALUE = undefined; // Treated as connected in new graph panel
@@ -243,7 +243,7 @@ export class MutableDataFrame<T = any> extends FunctionalVector<T> implements Da
throw new Error('Unable to set value beyond current length');
}
const obj = (value as any) || {};
const obj = (value as Record<string, unknown>) || {};
for (const field of this.fields) {
field.values[index] = obj[field.name];
}
@@ -253,7 +253,7 @@ export class MutableDataFrame<T = any> extends FunctionalVector<T> implements Da
* Get an object with a property for each field in the DataFrame
*/
get(idx: number): T {
const v: any = {};
const v: Record<string, unknown> = {};
for (const field of this.fields) {
v[field.name] = field.values[idx];
}