Chore: Remove the deprecated Vector type (#83469)
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user